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 was widely endorsed by politicians from both sides.
Calls for a special investigation had mounted since President Donald Trump fired the most recent FBI director, James Comey, last week.
The announcement apparently took the White House by surprise, with Mr Trump only being informed of it after Deputy Attorney General Rod Rosenstein had signed the order.
The FBI and Congress are looking into potential links between Mr Trump’s campaign team and Russia. Mr Mueller will take over the FBI investigation.
US intelligence agencies believe Moscow tried to tip the election in favour of Mr Trump.
In his statement announcing the move, Mr 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.”
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 had said there was no need for an outsider to lead 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”.
But House minority leader Nancy Pelosi was more cautious.
“A special prosecutor is the first step, but it cannot be the last,” she said. “He cannot take the place of a truly independent, outside commission that is completely free from the Trump administration’s meddling.”
Republican leaders were also restrained.
Senate Majority Leader Mitch McConnell said the appointment “confirms that the investigation… will continue.”
House Speaker Paul Ryan said: “My priority has been to ensure thorough and independent investigations are allowed to follow the facts wherever they may lead… The addition of Robert Mueller as special counsel is consistent with this goal.”
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 powers will Mr Mueller have?
Normally US prosecutors answer to the attorney general. However, for investigations into high-ranking officials in the executive branch the attorney general – or in this case Mr Rosenstein – can appoint a special counsel with greater independence from the executive.
But while special counsels are free from day-to-day supervision by the justice department, they must notify the attorney general of any “significant” action and they would need to ask permission to expand the investigation beyond their mandate.
Mr Mueller has the authority to investigate not only links or co-ordination between Russia and Trump campaign officials, but also “any matters that arose or may arise directly from the investigation”.
The role should not be confused with that of independent counsel, a role introduced in legislation by Congress after the 1970s Watergate scandal.
Appointed by a three-judge panel, the independent counsel operated outside the jurisdiction of the justice department.
But after the experiences of the Iran-Contra investigation during the Reagan administration and the inquiry into President Bill Clinton’s Whitewater land deal, the law fell out of favour with both Republicans and Democrats, and Congress failed to renew it in 1999.
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.