US president Donald Trump has said the appointment of a special counsel to investigate allegations that his campaign collaborated with Russia to sway the 2016 election is "the single greatest witch hunt of a politician in American history".
This is the single greatest witch hunt of a politician in American history!— Donald J. Trump (@realDonaldTrump) May 18, 2017
The US justice department appointed former FBI director Robert Mueller to lead the investigation.
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, who commands deep bipartisan respect, was a striking shift for Mr Trump's justice department, which had resisted calls from Democrats for an outside prosecutor.
It immediately escalated the legal stakes - and the potential political damage - for a president who has tried to dismiss the matter as partisan witch hunt and a "hoax".
Mr Trump later tweeted: "With all of the illegal acts that took place in the Clinton campaign & Obama Administration, there was never a special councel (sic) appointed!"
He did not provide examples or evidence of any alleged "illegal acts".
The announcement 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, according to a senior White House official.
In a written statement, Mr Trump insisted again that there were no nefarious ties between his presidential election 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 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, 2001, attacks which would ultimately shape his tenure.
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 former president Barack Obama asked him to stay on two years longer than his 10-year term.
Mr Comey succeeded him, having been appointed by Mr Obama.
Republicans have largely stood behind Donald Trump in the first months of his presidency as the FBI and congressional investigations into Russia's election meddling intensified.
However, Republican representatives have grown increasingly anxious since Mr Trump sacked Mr Comey, who had been leading the bureau's probe - especially after Mr Comey's associates said he had notes from a meeting in which Mr Trump asked him to shut down the investigation into the Russian ties of his former national security adviser, Michael Flynn.
US 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".