A former FBI boss has been named special counsel to oversee an inquiry into Russia's alleged meddling in the election and any Trump campaign ties.
In naming Robert Mueller, the deputy attorney general said it was in the public interest to have an outsider.
The appointment has been widely praised by politicians from both sides.
Calls for a special prosecutor had mounted since President Donald Trump fired the most recent FBI director, James Comey, last week.
The FBI and Congress are looking into potential links between Mr Trump's campaign team and Russia.
US intelligence agencies believe Moscow tried to tip the election in favour of the Republican.
What was the reaction?
Just over an hour after the news of Mr Mueller's appointment emerged, President Trump predicted the new investigation would clear him and his team. Previously, the White House has said there was no need for an outsider leading an inquiry.
"A thorough investigation will confirm what we already know - there was no collusion between my campaign and any foreign entity," said the president.
The top Democrat in the Senate, Chuck Schumer, said Mr Mueller was "exactly the right kind of individual for this job".
And the House Oversight Committee Chairman, Jason Chaffetz, said he had "impeccable credentials".
In his statement announcing the move, Deputy Attorney General Rod Rosenstein said: "The public interest requires me to place this investigation under the authority of a person who exercises a degree of independence from the normal chain of command."
Mr Mueller, who will have wide-ranging powers, said simply: "I accept this responsibility and will discharge it to the best of my ability.''
The stakes just rose: analysis by Anthony Zurcher, BBC News, Washington
In announcing the appointment of a special counsel, Mr Rosenstein cited the "unusual circumstances" of the ongoing FBI Russia investigation. That's an understatement.
The circumstances are not just unusual, they are unprecedented. The nation has never had an administration so embattled so early in its term. There have never been such grave allegations of electoral meddling by a foreign power in a US presidential election.
Then again there has never been a president quite like Donald Trump.
Now the Russia story enters a new, more serious phase. Robert Mueller has a sterling reputation in Washington, DC. He worked with Mr Comey when the latter served as deputy attorney general in George W Bush's administration. He understands pressure-cooker politics and knows how to navigate the corridors of power.
He has wide latitude to conduct his investigation and bring criminal charges, if necessary.
While Mr Mueller is technically still part of the justice department and ultimately reports to Mr Trump, his stature is such that he is unlikely to be cowed by the president.
Independent investigations often take on a life of their own and can reach unexpected conclusions. With Mr Mueller in the game, the stakes just went up.
What's the background to this?
The White House has been engulfed in crisis following Mr Comey's abrupt dismissal and allegations that Mr Trump asked the ousted FBI chief to drop an inquiry into links between his ex-national security adviser and Russia.
Mr Trump's national security adviser, Michael Flynn, was forced out in February after he misled the vice-president about his conversations with Russia's ambassador before Mr Trump took office.
The White House has denied it put pressure on Mr Comey but the revelations fuelled Democratic claims that Mr Trump had tried to conceal his team's connection to Russia.
Mr Mueller, 72, served as FBI director for 12 years under Presidents George W Bush and Barack Obama as the longest serving bureau chief since J Edgar Hoover.
He is expected to announce his resignation from a private law firm to avoid conflicts of interest.