The US Justice Department has appointed former FBI director Robert Mueller as a special counsel to lead a federal investigation into allegations that Donald Trump's campaign collaborated with Russia to sway the 2016 election that put him in the White House.
Mr Mueller will have sweeping powers and the authority to prosecute any crimes he uncovers.
The surprise announcement to hand the probe over to Mr Mueller, a lawman with deep bipartisan respect, was a striking shift for Mr Trump's Justice Department, which had resisted increasingly loud calls from Democrats for an outside prosecutor.
The announcement, the latest in the shock-a-day Washington saga, was made by deputy Attorney General Rod Rosenstein. The White House counsel's office was alerted only after the order appointing Mr Mueller was signed, said a senior White House official.
Mr Rosenstein said the appointment was "necessary in order for the American people to have full confidence in the outcome".
In a written statement, Mr Trump insisted anew there were no nefarious ties between his campaign and Russia.
"A thorough investigation will confirm what we already know - there was no collusion between my campaign and any foreign entity," he declared. "I look forward to this matter concluding quickly."
Mr Mueller's broad mandate gives him not only oversight of the Russia probe, but also "any matters that arose or may arise directly from the investigation". That would surely include Mr Trump's firing last week of FBI director James Comey.
Mr Mueller, a former federal prosecutor at the Justice Department, was confirmed as FBI director days before the September 11 attacks in 2001 that would ultimately shape his tenure.
Robert Mueller’s appointment is a positive step. I am hopeful that he will help us get to the bottom of the Trump campaign’s ties to Russia.— Bernie Sanders (@SenSanders) May 17, 2017
The FBI's counter-terror mission was elevated in those years, as the US intelligence agencies adjusted to better position America to prevent another attack of such magnitude. He was so valued that President Barack Obama asked him to stay on two years longer than his 10-year term.
Mr Comey succeeded him, appointed by Mr Obama.
Republicans have largely stood behind Mr Trump in the first months of his presidency as FBI and congressional investigations into Russia's election meddling intensified. But Republican politicians have grown increasingly anxious since Mr Trump fired Mr Comey, who had been leading the bureau's probe - and after Comey associates said he had notes from a meeting in which Mr Trump asked him to shut down the investigation into the Russia ties of former National Security Adviser Michael Flynn.
First reactions from Congress were mainly positive.
House Speaker Paul Ryan said the appointment was consistent with his goal of ensuring that "thorough and independent investigations are allowed to follow the facts wherever they may lead".
Republican Jason Chaffetz of Utah, chairman of the House Oversight Committee, said Mr Mueller was a "great selection. Impeccable credentials. Should be widely accepted."
Elijah Cummings of Maryland, top Democrat on the oversight panel, said: "I believe Mueller will be independent, he will be thorough and he will be fair and he's not going to be easily swayed."
Mr Trump has repeatedly slammed the FBI and congressional investigations as a "hoax" and blamed disgruntled officials at intelligence agencies for leaking information related to the probes. During a commencement address on Wednesday at the Coast Guard Academy, he complained bitterly about criticism he has faced.
"No politician in history, and I say this with great surety, has been treated worse or more unfairly," he said. "You can't let the critics and the naysayers get in the way of your dreams... I guess that's why we won. Adversity makes you stronger. Don't give in, don't back down... And the more righteous your fight, the more opposition that you will face."
Russia's Vladimir Putin called the dramatic charges swirling around Mr Trump evidence of "political schizophrenia spreading in the US." He offered to furnish a "record" of the Trump-diplomats meeting in the Oval Office if the White House desired it.
The White House has disputed Mr Comey's account of his February conversation with Mr Trump concerning Mr Flynn but has not offered specifics. Trump aides said he never tried to squelch the Flynn investigation nor made inappropriate disclosures to the Russians.
Text of announcement naming Robert Mueller as Special Counsel. pic.twitter.com/pAdaMcUWzw— Mark Knoller (@markknoller) May 17, 2017
The Senate intelligence committee has also asked acting FBI director Andrew McCabe to turn over any notes Mr Comey might have made regarding discussions he had with White House or Justice Department officials about Russia's efforts to influence the election.
McCabe had other matters on his mind, too. He was one of four potential candidates to lead the FBI that Mr Trump was interviewing. The others were former Connecticut Senator Joe Lieberman, former Oklahoma Governor Frank Keating and Richard McFeely, a former top FBI official.
Separately, McClatchy News Service reported on Wednesday that before Mr Trump took office, Mr Flynn had blocked an Obama administration military plan, opposed by Turkey, against the Islamic State group. Unknown to the Obama administration, Flynn had been paid more than 500,000 dollars to advocate for Turkey's interests.
McClatchy said Mr Flynn declined to OK a request from Obama officials to approve a military operation involving the IS stronghold of Raqqa, effectively delaying the operation. The Trump team had been asked since the operation was likely to be carried out after Mr Trump took office. Turkey has long opposed US forces working with Kurdish forces.
The plan was eventually approved by the Trump administration, but not until after Mr Flynn had been fired.