Washington (CNN) The Justice Department on Wednesday appointed former FBI Director Robert Mueller as special counsel to oversee the federal investigation into Russian interference in the 2016 election, including potential collusion between President Donald Trump's campaign associates and Russian officials.

Deputy Attorney General Rod Rosenstein appointed Mueller to the position in a letter obtained by CNN . Attorney General Jeff Sessions previously recused himself from any involvement in the Russia investigation due to his role as a prominent campaign adviser and surrogate.

As special counsel, Mueller is "authorized to prosecute federal crimes arising from the investigation of these matters," according to the Justice Department order Rosenstein signed.

Mueller's appointment aims to quell the wave of criticism that Trump and his administration have faced since Trump fired FBI Director James Comey last week in the middle of the FBI's intensifying investigation into contacts between Trump campaign associates and Russian officials.

In a statement, Trump said an investigation will confirm that "there was no collusion" between his campaign and Russia.

"As I have stated many times, a thorough investigation will confirm what we already know -- there was no collusion between my campaign and any foreign entity. I look forward to this matter concluding quickly. In the meantime, I will never stop fighting for the people and the issues that matter most to the future of our country."

In a brief statement, Mueller said, "I accept this responsibility and will discharge it to the best of my ability."

News of the special counsel announcement was closely held. The White House received a heads-up less than an hour before the news broke at 6 p.m. ET. The rest of House leadership and rank-and-file members were in the dark, but a Justice Department official did reach out directly to Speaker Paul Ryan shortly before the announcement to let him know of the special counsel appointment, according to a GOP source.

Sen. Dianne Feinstein, D-California, a member of the Senate intelligence committee, said the appointment was needed.

"I think it was the right thing to do and I believe they saw it as the right thing to do otherwise they're going to have a fight and it's not worth the fight," Feinstein said. "There (is) mutual suspicion of one side and the other. This clears that up and has a person whose reputation is as good as it gets and he'll be very good."

White House didn't want special counsel

Calls for a special counsel or prosecutor were rising after The New York Times and then CNN reported on excerpts of a memo Comey wrote in February, in which Comey wrote that Trump asked him to drop the FBI investigation into former national security adviser Michael Flynn. Demands intensified from Democrats on Capitol Hill for the Justice Department to appoint a special counsel or prosecutor to oversee the case. Republicans on Tuesday night began to join those calls.

Trump was meeting with FBI director candidates when the White House was formally told that a special prosecutor had been named in Russia investigation. The White House counsel informed the president.

"It's still sinking in," one administration official said, describing an air of uncertainty in the West Wing. "We were told about it. Not asked about it."

White House spokesman Sean Spicer on Monday dismissed the idea of a special prosecutor.

"There's, frankly, no need for a special prosecutor. We've discussed this before," Spicer told reporters. "You have two Senate committees that are looking into this, the FBI is conducting their own review. And -- and I think if you even look at what Acting Director (Andrew) McCabe said last week, he made it very clear that they have the resources that they need and that the work continues."

Beyond allegedly asking Comey to quit his investigation into Flynn -- who has been a central focus of the FBI's investigation into contacts between Trump associates and Russia -- Trump said in an interview with NBC last week that he considered the "Russia thing with Trump and Russia' when he decided to fire Comey.

Trump has called the FBI investigation into Russia a "hoax" and "taxpayer funded charade."

Thursday morning, he tweeted there was "never a special (counsel) appointed" to investigate "all of the illegal acts that took place in the Clinton campaign and Obama administration."

He added , "This is the single greatest witch hunt of a politician in American history!"

Rushed to Ashcroft's hospital room with Comey

The appointment could be seen as a signal from Rosenstein. His independence was quickly praised as news of his appointment spread, with many recalling his famous refusal to bow to the demands of West Wing officials during the Bush administration.

When George W. Bush's White House chief of staff and White House counsel sought to get an ailing Attorney General John Ashcroft to reauthorize a warrantless domestic surveillance program that the Justice Department had ruled illegal, Mueller and Comey rushed to the hospital to prevent the Bush officials from taking advantage of Ashcroft.

Comey made it there first, but as Mueller rushed to the hospital he called Ashcroft's security detail and ordered them to prevent the top Bush officials from kicking Comey out of the room.

Mueller later threatened to resign alongside Comey, who was then serving as deputy attorney general, over Bush administration officials' continued attempts to reauthorize the program. They ultimately did not resign as Bush sided with the Justice Department officials.

'Necessary' for 'full confidence' in investigation

Rosenstein said he believes a special counsel "is necessary in order for the American people to have full confidence in the outcome."

"In my capacity as acting attorney general, I determined that it is in the public interest for me to exercise my authority and appoint a Special Counsel to assume responsibility for this matter," Rosenstein said in a statement, adding that the decision is "not a finding that crimes have been committed or that any prosecution is warranted."

"What I have determined is that based upon the unique circumstances, 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," Rosenstein said.

Mueller was appointed FBI Director by President George W. Bush in 2001 and served until 2013, when Comey took over as head. He will resign from his private law firm WilmerHale to avoid any conflicts of interest, the Justice Department said.

CNN's Dana Bash, Jeff Zeleny, Phil Mattingly, Ted Barrett, Lauren Fox and David Shortell contributed to this report.