Recently fired FBI Director James Comey urged the public to move on from his unexpected termination, according to a letter he sent friends and colleagues Wednesday.

"I have long believed that a President can fire an FBI Director for any reason, or for no reason at all. I'm not going to spend time on the decision or the way it was executed. I hope you won't either. It is done, and I will be fine, although I will miss you and the mission deeply," Comey wrote.

Comey, who was appointed by former President Barack Obama and had served three and a half years, praised the intelligence agency he now leaves behind, calling the organization a "rock of competence, honesty, and independence."

"It is very hard to leave a group of people who are committed only to doing the right thing," Comey said in the letter. "My hope is that you will continue to live our values and the mission of protecting the American people and upholding the Constitution. If you do that, you too will be sad when you leave, and the American people will be safer."

The ousted director finished by saying that working in the FBI was "one of the great joys of my life."

President Trump unexpectedly fired Comey on Tuesday after a finding by the Justice Department that he mishandled the investigation into Hillary Clinton's emails last year.

Trump said he acted based on the recommendations of Attorney General Jeff Sessions and Deputy Attorney General Rod Rosenstein, who found that Comey improperly moved to "usurp" the attorney general's authority and decided not to prosecute Clinton.

"I have received the attached letters from the attorney general and deputy attorney general of the United States recommending your dismissal as the director of the Federal Bureau of Investigation," Trump said in a letter to Comey. "I have accepted their recommendation and you are hereby terminated and removed from office, effective immediately."

"While I greatly appreciate you informing me, on three separate occasions, that I am not under investigation, I nevertheless concur with the judgment of the Department of Justice that you are not able to effectively lead the bureau," Trump said. "It is essential that we find new leadership for the FBI that restores public trust and confidence in its vital law enforcement mission. I wish you the best of luck in your future endeavors."

The Trump administration immediately began a search for Comey's successor. Acting leader, FBI Deputy Director Andrew McCabe has been floated as a possible replacement.