FILE - In this Sept. 4, 2013, file photo, then-incoming FBI Director James Comey talks with outgoing FBI Director Robert Mueller before Comey was officially sworn in at the Justice Department in Washington. On May 17, 2017, the Justice Department said it is appointing Mueller as special counsel to oversee investigation into Russian interference in the 2016 presidential election. (AP Photo/Susan Walsh, File)

FILE - In this Sept. 4, 2013, file photo, then-incoming FBI Director James Comey talks with outgoing FBI Director Robert Mueller before Comey was officially sworn in at the Justice Department in Washington. On May 17, 2017, the Justice Department said it is appointing Mueller as special counsel to oversee investigation into Russian interference in the 2016 presidential election. (AP Photo/Susan Walsh, File)

WASHINGTON (AP) — The Justice Department abruptly appointed former FBI Director Robert Mueller Wednesday night 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. Mueller will have sweeping powers and the authority to prosecute any crimes he uncovers.

The surprise announcement to hand the probe over to Mueller, a lawman with deep bipartisan respect, was a striking shift for Trump’s Justice Department, which had resisted increasingly loud 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.”

ADVERTISEMENT

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 Mueller was signed, said a senior White House official, who was not authorized to speak publicly by name and commented only on condition of anonymity.

In a written statement, 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.”

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 Trump’s firing last week of FBI Director James Comey.

Mueller, a former federal prosecutor at the Justice Department, was confirmed as FBI director days before the Sept. 11, 2001, attacks that would ultimately shape his tenure. The FBI’s counterterror mission was elevated in those years, as the U.S. 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.

Comey succeeded him, appointed by Obama.

Mueller was appointed Wednesday by Deputy Attorney General Rod Rosenstein, who had faced criticism as the author of a memo that preceded Comey’s firing. Rosenstein said the appointment was “necessary in order for the American people to have full confidence in the outcome.”

Republicans have largely stood behind Trump in the first months of his presidency as FBI and congressional investigations into Russia’s election meddling intensified. But GOP lawmakers have grown increasingly anxious since 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.

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 Mueller was a “great selection. Impeccable credentials. Should be widely accepted.”

And not a moment too soon, Democrats 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,” said Elijah Cummings of Maryland, top Democrat on the oversight panel. Cummings has vigorously urged such an appointment, suggesting it could lead to accusations of obstruction of justice.

In the 1990s, Democrats complained that independent counsel Kenneth Starr, who investigated President Bill Clinton, overstepped his authority.

The latest political storm, coupled with the still-potent fallout from Trump’s recent disclosure of classified information to Russian diplomats at the White House, has overshadowed all else in the capital and beyond. Stocks fell sharply on Wall Street Wednesday as investors worried the latest turmoil in Washington could hinder Trump’s pro-business agenda

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 Wednesday at the Coast Guard Academy, he complained bitterly about criticism he’s 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.”

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 has disputed Comey’s account of his February conversation with Trump concerning Flynn but has not offered specifics. Several congressional Republicans said Wednesday that if Trump did suggest that Comey “let this go” regarding Flynn’s Russian contacts, it was probably just a joke, light banter.

Both of the explosive revelations — that the president pressed his FBI director to drop a federal investigation before later firing him, and that he disclosed classified information to senior Russian officials — came from anonymous sources, and the White House was quick to denounce the leaks and deny any impropriety. Trump aides said he never tried to squelch the Flynn investigation nor made 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 soon, two in the Senate and one in the House.

The Senate intelligence committee also asked acting FBI Director Andrew McCabe to turn over 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.

McCabe had other matters on his mind, too. He was one of four potential candidates to lead the FBI that Trump was interviewing. The others were former Connecticut Sen. Joe Lieberman, former Oklahoma Gov. Frank Keating and Richard McFeely, a former top FBI official.

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.”

Separately, McClatchy News Service reported Wednesday that before Trump took office, 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 to advocate for Turkey’s interests.

McClatchy says 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 Trump took office. Turkey has long opposed U.S. forces working with Kurdish forces.

The plan was eventually approved by the Trump administration, but not until after Flynn had been fired.

___

Associated Press writers Deb Riechmann, Eileen Sullivan, Erica Werner, Matthew Daly and Mary Clare Jalonick contributed to this report

___

This story has been corrected to correct attribution in 9th paragraph, beginning ’Mueller was. Quote is from Rosenstein, not Mueller.