Former top FBI official Andrew McCabe, who was fired late Friday night by Attorney General Jeff Sessions two days before becoming eligible for full pension benefits, said in an extraordinary statement that he was targeted because President Donald Trump wants to destroy him as part of his "war" against special counsel Robert Mueller.

"This attack on my credibility is one part of a larger effort not just to slander me personally, but to taint the FBI, law enforcement and intelligence professionals more generally," McCabe said in a statement released shortly after Sessions announced his decision. "It is part of this administration's ongoing war on the FBI and the efforts of the special counsel investigation, which continue to this day. Their persistence in this campaign only highlights the importance of the special counsel's work."

Related: Read McCabe's full statement after firing

The statement was the first time McCabe had spoken candidly of his anger at the Trump White House. In it, he painted a remarkable picture of an administration that tried to politicize its principal law enforcement arm, the FBI, and discredit several of the bureau's longtime leaders, all in an effort to escape scrutiny of Trump by the special counsel.

McCabe noted in his statement that he had knowledge that could be useful to Mueller's investigation into events involving the president.

"Here is the reality: I am being singled out and treated this way because of the role I played, the actions I took, and the events I witnessed in the aftermath of the firing of (FBI director) James Comey," McCabe said.

Trump's dismissal of Comey and events surrounding it are reported to be a key aspect of Mueller's investigation into the president.

McCabe added that a report by the Department of Justice Inspector General's office, which looked into his role in the handling of the probe into Hillary Clinton's email server, was stepped up "only after my testimony to the House Intelligence Committee revealed that I would corroborate former Director Comey's accounts of his discussions with the president."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"The (Inspector General's office) focus on me and this report became a part of an unprecedented effort by the administration, driven by the president himself, to remove me from my position, destroy my reputation, and possibly strip me of a pension that I worked 21 years to earn," he continued. "The accelerated release of the report, and the punitive actions taken in response, make sense only when viewed through this lens. Thursday's comments from the White House are just the latest example of this."

The last line was a reference to White House Press Secretary Sarah Huckabee Sanders telling reporters that McCabe was a "bad actor."

McCabe has in the past been targeted for repeated attacks by Trump and early Saturday morning, the president tweeted that the veteran FBI official's firing was a "great day" for democracy.

Andrew McCabe FIRED, a great day for the hard working men and women of the FBI - A great day for Democracy. Sanctimonious James Comey was his boss and made McCabe look like a choirboy. He knew all about the lies and corruption going on at the highest levels of the FBI! — Donald J. Trump (@realDonaldTrump) March 17, 2018

On Saturday, Michael Bromwich, a former inspector general for the Justice Department, confirmed that he is representing McCabe in all legal matters related to his firing.

Bromwich issued a statement on McCabe's ouster, slamming what he described as the Trump administration's "deplorable rush to judgment" and "distortion of the process" used to reprimand DOJ and FBI officials.

"This distortion of the process begins at the very top, with the President’s repeated offensive, drive-by Twitter attacks on Mr. McCabe," he wrote.

He later added, "it should make all federal government employees, who continue to work in an Administration that insults, debases, and abuses them, shudder in the knowledge that they could be next."

A source familiar with the situation told NBC News Saturday that McCabe kept notes of his interactions with Trump, and they were turned over to special counsel Robert Mueller’s team some time ago.

The Wall Street Journal reported earlier Saturday that the notes were turned over to Mueller. Mueller is investigating Russian interference in the election and whether there was any coordination with those connected to the Trump campaign, as well as possible obstruction of justice by Trump associates.

The FBI's Office of Professional Responsibility had recommend that McCabe be fired after the inspector general's report determined that he had not been fully truthful in his answers to investigators' questions about the handling of the Clinton probe, according to officials familiar with the report. The report has not yet been released to the public but is expected to be in the next few weeks.

"For the last year and a half, my family and I have been the targets of an unrelenting assault on our reputation and my service to this country," McCabe said.

"Articles too numerous to count have leveled every sort of false, defamatory and degrading allegation against us," he said. "The president's tweets have amplified and exacerbated it all. He called for my firing. He called for me to be stripped of my pension after more than 20 years of service. And all along we have said nothing, never wanting to distract from the mission of the FBI by addressing the lies told and repeated about us."

He added, with a dramatic flourish: "No more."

McCabe defended his actions in the investigation in 2016 of Clinton's emails, saying that politics played no role in his decision-making and that he was attempting to pursue a probe "that people in the DOJ opposed."

"The FBI was portrayed as caving under that pressure, and making decisions for political rather than law enforcement purposes," he said. "Nothing was further from the truth. In fact, this entire investigation stems from my efforts, fully authorized under FBI rules, to set the record straight on behalf of the Bureau, and to make clear that we were continuing an investigation that people in DOJ opposed."

In regard to the specific accusation that he had spoke to the media improperly about the investigation, McCabe said his contacts with the press had taken place over several days, were no secret inside the FBI and that the head of the agency was aware of his interactions with a reporter.

"The investigation subsequently focused on who I talked to, when I talked to them, and so forth," McCabe said in the statement. "During these inquiries, I answered questions truthfully and as accurately as I could amidst the chaos that surrounded me. And when I thought my answers were misunderstood, I contacted investigators to correct them."

He added, "But looking at that in isolation completely misses the big picture. The big picture is a tale of what can happen when law enforcement is politicized, public servants are attacked, and people who are supposed to cherish and protect our institutions become instruments for damaging those institutions and people."