President Donald Trump celebrated the firing of deputy FBI Director Andrew McCabe early Saturday, tweeting that his termination was a “great day” for the bureau and the country — and took a shot at former FBI Director James Comey.

“Andrew McCabe FIRED, a great day for the hard working men and women of the FBI — A great day for Democracy,” Trump tweeted. “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!”

Attorney General Jeff Sessions sacked McCabe Friday — days before he was set to retire — following repeated attacks from Trump and his allies. According to the New York Times, McCabe will be accused in an upcoming inspector general report of lacking candor with internal investigators about information he allegedly disclosed to the media.

McCabe denied those allegations in a lengthy statement Friday, instead blaming his termination on the Trump administration’s “ongoing war on the FBI and the efforts of the Special Counsel investigation, which continue to this day.”

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

McCabe served as the acting director of the FBI after Trump fired Comey in May 2017. He quickly became a punching bag for the president, who repeatedly lashed out at him on Twitter and accused him of being an ally of Hillary Clinton. Trump also publicly pressured Sessions to remove McCabe from his post at the top of the FBI.

Trump and his allies have frequently attacked federal law enforcement in what seems to be an attempt to undermine special counsel Robert Mueller’s Russia probe, which is examining possible collusion with the Kremlin and obstruction of justice on the part of the president and his campaign.

McCabe on Friday suggested that his termination was related to the Comey firing — one of the events at the center of questions about possible obstruction by Trump.

“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 James Comey,” McCabe said.

McCabe — who was succeeded by Christopher Wray — announced in January that he would be taking “terminal leave” and stepping down as deputy director of the FBI.

His firing Friday could mean he loses the pension he was eligible for as an employee of the FBI for more than two decades.

“To have my career end in this way, and to be accused of lacking candor when at worst I was distracted in the midst of chaotic events, is incredibly disappointing and unfair,” McCabe said. “But it will not erase the important work I was privileged to be a part of, the results of which will in the end be revealed for the country to see.”