It was a concession by the Trump administration, which had resisted calls from Democrats to turn the investigation over to outside counsel. The White House counsel's office was alerted only after the order appointing Mueller was signed.
In a written statement, Trump insisted anew that 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."
The appointment of a special counsel ramps up the pressure on Trump and his associates. 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 could well include the firing last week of FBI Director James Comey.
President Trump has responded on Twitter.
With all of the illegal acts that took place in the Clinton campaign & Obama Administration, there was never a special councel appointed!— Donald J. Trump (@realDonaldTrump) May 18, 2017
This is the single greatest witch hunt of a politician in American history!— Donald J. Trump (@realDonaldTrump) May 18, 2017
Republicans have largely stood behind Trump as the FBI and congressional investigations into Russia's election meddling intensified. But GOP lawmakers have grown increasingly anxious after Trump fired Comey, who had been leading the bureau's probe - and after Comey associates said he had notes from a meeting in which Trump asked him to shut down the investigation into the Russia ties of former National Security Adviser Michael Flynn.
Early reaction from Congress was generally positive to the appointment of Mueller.
RELATED: A timeline of James Comey's firing as FBI director
Democrats said it was not a moment too soon.
"I believe Mueller will be independent, he will be thorough and he will be fair and he's not going to be easily swayed," said Elijah Cummings of Maryland, top Democrat on the House Oversight Committee. "And he is a career man, a career FBI kind of guy, and I think that's a good thing."
Republican Jason Chaffetz of Utah, chairman of the oversight panel, said Mueller was a "great selection. Impeccable credentials. Should be widely accepted."
House Speaker Paul Ryan was more muted and formal: "I welcome his role at the Department of Justice. The important ongoing bipartisan investigation in the House will also continue."
Fellow Republican Peter King of New York was more leery: "I'm worried with all special counsels because there's no control over them and they can abuse their power."
In the 1990s, Democrats complained that independent counsel Kenneth Starr, who investigated President Bill Clinton, overstepped his authority.
Earlier Wednesday, Trump gave no indication of the announcement to come in a commencement address at the Coast Guard Academy.
He made no reference to the controversies about Russia or the Russia ties for fired National Security Adviser Michael Flynn or Comey's dismissal. But he complained bitterly that about criticism of his still-young presidency.
"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."
On Capitol Hill, meanwhile, three congressional committees, all led by Republicans, confirmed they wanted to hear from Comey. Congressional investigators have been seeking Comey's memos on his meeting with Trump, as well as documents from the Justice Department related to his firing.
The latest political storm, coupled with the still-potent fallout from Trump's recent disclosure of classified information to Russian diplomats, overshadowed all else in the capital and beyond. Stocks fell sharply on Wall Street as investors worried that the latest turmoil in Washington could hinder Trump's pro-business agenda.
Interest was hardly limited to the U.S. No less a commentator than Russia's Vladimir Putin called the dramatic charges swirling around Trump evidence of "political schizophrenia spreading in the U.S." He offered to furnish a "record" of the Trump-diplomats meeting in the Oval Office if the White House desired it.
There was no word on what that record might entail, a question many were likely to raise in light of Trump's recent warning to Comey that he had "better hope" there were no tapes of a discussion they'd had.
The White House disputed Comey's account of the February conversation concerning Flynn, but did not offer specifics. Several members of Congress said that if Trump did suggest that Comey "let this go" regarding Flynn's Russian contacts, it was probably just a joke, light banter.
Questions about Trump's conduct have been mounting for weeks, most recently with the two explosive revelations - that in February the president pressed Comey to drop a federal investigation into Flynn's contacts with Russia and that he disclosed classified information to the senior Russian officials last week.'
Both allegations came from anonymous sources, and the White House was quick to denounce the leaks and deny any impropriety, insisting the president never tried to squelch the Flynn investigation nor did he make inappropriate disclosures to the Russians.
On Capitol Hill, Comey was clearly the man in demand, with three committees working to seat him at their witness tables.
- The House oversight committee set a May 24 hearing on whether Trump interfered in the FBI probe, and invited Comey to testify.
-The Senate intelligence committee invited Comey to appear in both open and closed sessions. It also asked acting FBI Director Andrew McCabe to give the committee any notes Comey might have made regarding discussions he had with White House or Justice Department officials about Russia's efforts to influence the election.
-Top members of the Senate Judiciary Committee asked the FBI to provide any Comey memos and asked the White House to turn over any audio recordings that might exist of conversations with the now-fired director. They expect to bring in Comey in to testify, as well.
Trump is preparing to leave town Friday on his first foreign trip, and aides have been hopeful the journey will be a chance for the administration to get back on track after weeks of chaos and distractions.
Sen. Lindsey Graham, R-S.C., speculated Trump was probably happy to get out of town - "and a lot of us are glad he's leaving for a few days."
His advice to the president: "Stay disciplined, stay focused and deliver on the world stage."
Report a typo to the ABC13 staff