The Trump administration has spent months attacking former FBI Deputy Director Andrew McCabe. Now, McCabe has been fired 26 hours before his formal retirement — a move that could cost him his federal pension.

On Friday, Attorney General Jeff Sessions announced McCabe’s ouster from the FBI. McCabe had planned to leave for good on March 18 after a storied 21-year career, but Sessions decided to push him out the door early.

Here’s why: Justice Department Inspector General Michael Horowitz found that, in 2016, McCabe inappropriately allowed two top officials to speak to reporters about his decision to open a case into the Clinton Foundation. That incident was under investigation as part of a broader look into how the FBI and Justice Department handled themselves during the 2016 presidential election.

But McCabe apparently lied about his authorization during an interview with the months-long probe. That led the FBI to recommend firing McCabe — a recommendation Sessions just accepted.

“The FBI expects every employee to adhere to the highest standards of honesty, integrity, and accountability. As the OPR proposal stated, ‘all FBI employees know that lacking candor under oath results in dismissal and that our integrity is our brand,’ Attorney General Jeff Sessions said in a statement provided by the Justice Department.

“Pursuant to Department Order 1202, and based on the report of the Inspector General, the findings of the FBI Office of Professional Responsibility, and the recommendation of the Department’s senior career official, I have terminated the employment of Andrew McCabe effective immediately,” the statement read.

McCabe had resigned from his post as the deputy director of the FBI after being publicly attacked for months by Trump and other top administration officials. He stepped away from his responsibilities, however, hoping to wait to leave until his retirement date. McCabe will now lose his pension.

In response to his dismissal, McCabe released a fiery statement. “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,” he said in a statement.

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

The president, meanwhile, is celebrating. Trump took to Twitter on Friday to declare McCabe’s firing a “great day for Democracy.” He continued, “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!”

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

Trump’s fury goes back to a long-running controversy over McCabe’s wife’s allegedly compromising political ties to Hillary Clinton. In 2015, McCabe’s wife ran for a state Senate seat in Virginia, backed in part with money provided by the state Democratic Party and a Clinton ally. Trump and other Republicans have used the Justice Department probe against McCabe to argue he was secretly harboring an anti-Trump agenda. Trump made reference to the matter in a tweet on Saturday.

The Fake News is beside themselves that McCabe was caught, called out and fired. How many hundreds of thousands of dollars was given to wife’s campaign by Crooked H friend, Terry M, who was also under investigation? How many lies? How many leaks? Comey knew it all, and much more! — Donald J. Trump (@realDonaldTrump) March 17, 2018

McCabe’s name also surfaced in a controversial text message sent by FBI agent Peter Strzok, who was removed from special counsel Robert Mueller’s Russia probe over evidence of anti-Trump political bias.

Strzok had mentioned someone named “Andy” in a text message with federal attorney Lisa Page, suggesting there was a discussion about Trump — and not a positive one — in McCabe’s office. Page, it turns out, was one of the officials who spoke to the Journal with McCabe’s blessing.

Trump, clearly irked, openly campaigned for Sessions to remove McCabe.

Why didn't A.G. Sessions replace Acting FBI Director Andrew McCabe, a Comey friend who was in charge of Clinton investigation but got.... — Donald J. Trump (@realDonaldTrump) July 26, 2017

Other prominent Republicans outright called for McCabe’s firing, too. “He ought to be replaced. And I’ve said that before and I’ve said it to people who can do it,” Sen. Chuck Grassley (R-IA), the Judiciary Committee chairman, told reporters in December.

The question now is if McCabe’s firing will strengthen the broader GOP-led movement to discredit federal law enforcement over allegations that it is corruptly anti-Trump. But what’s clear is that the president and his allies hoped McCabe would face a stiff penalty — and they finally got their wish.

This could put more pressure on the Trump-Russia probe

McCabe’s firing might have a far-reaching impact on Mueller’s investigation.

When Trump fired FBI Director James Comey on May 9, McCabe became acting FBI director. All of a sudden, a man that the president believed worked against him was in charge of (among other things) the probe into the Trump campaign’s connections to Russia.

It didn’t take too long for Trump to make his anger with this development known. On July 26, 2017, he called on Attorney General Sessions to fire McCabe. This level of presidential involvement in FBI personnel decisions is highly unusual, especially given the lack of concrete evidence of McCabe’s guilt.

Trump isn’t alone in hating the Mueller probe. A growing number of congressional GOP members and right-wing commentators continuously call for Mueller’s dismissal for similar reasons: that is, his perceived bias against Trump. The evidence of such, though, is thin.

The efforts are part of a broader GOP ploy to paint the Justice Department as hopelessly biased against Trump. The likely aim is to soften the blow of any potential charges against the president or his associates that come out of the Mueller probe.

In that context, McCabe’s firing sends a chilling message: Draw the president’s ire, especially by investigating him, and you might be publicly humiliated — and then lose the pension you’ve spent decades accumulating.