CNN  — 

Former FBI Deputy Director Andrew McCabe, who had been fired hours before his retirement as then-President Donald Trump’s political furor toward him grew, has settled a lawsuit with the Justice Department, allowing him to officially retire and to recoup hundreds of thousands of dollars in legal fees and his pension.

McCabe, now a CNN law enforcement analyst, was one of the central leaders of the early Russia investigation that pursued Trump’s advisers and questions of whether the then-President had obstructed justice. In March 2018, two days shy of McCabe’s scheduled retirement date, when he would have become eligible to receive early retirement benefits, then-Attorney General Jeff Sessions fired him from the FBI.

In 2019, McCabe sued the department, alleging his dismissal had been politically motivated. The settlement this week, he told CNN, signals that “this should never have happened.”

The New York Times was first to report on the settlement.

The agreement with the Justice Department, made public Thursday afternoon, includes major concessions for McCabe, such as Sessions’ recommendation to fire him for lack of candor being wiped away, according to settlement documents released by Arnold & Porter, the law firm representing McCabe.

His firing, under the agreement, has essentially been rescinded, with the FBI’s records being amended to show that he never had a blip of unemployment and that he retired in March 2018, the documents say. FBI personnel files also will remove record of McCabe having been fired.

That allows him to receive compensation since 2018, which he told CNN he believes is more than $200,000. His lawyers will also be compensated for their work on his wrongful termination lawsuit, which amounts to nearly $540,000, according to the settlement records.

“I didn’t file this … suit to get rich off the Department of Justice,” he said. “We’ve been through a really terrible experience over the last couple of years.”

He will also have his FBI badge mounted – a perk for senior bureau executives when they retire – and get his senior executive service cufflinks, the settlement says.

McCabe told CNN’s Anderson Cooper in an interview Thursday night that he believes the settlement is a message to government employees: “This is the current Department of Justice standing up for fairness and standing up for the rule of law.”

McCabe and the Justice Department, as part of the settlement, agreed to say that “Executive Branch officials outside the Department of Justice and its components should not comment publicly on ongoing career civil service employee disciplinary matters … so as not to create any appearance of improper political influence.”

The department still denies that Trump administration officials violated any laws or the Constitution when Sessions fired McCabe.

During the Trump administration, the Justice Department had investigated McCabe for criminal wrongdoing – coming close to an indictment – then declined to prosecute him. He was never charged.

The DC US attorney in 2019 had been scrutinizing alleged false statements McCabe had made to investigators regarding his involvement in a newspaper report about an investigation into the Clinton Foundation published days before the 2016 presidential election.

Throughout, McCabe maintained that Trump’s administration had been hounding him for political reasons and that he had never intentionally misled anyone.

In 2020, when it was announced that the Justice Department would not pursue charges against him, McCabe told CNN he didn’t think he would ever be free from Trump and the rage the then-President directed toward him and his wife.

On Thursday, McCabe told Cooper: “I don’t kid myself to think that (Trump) is going to put aside his horrific judgment, his constant lying and his tormenting of me and my family. I’m sure this will just add another log to the fire.”

“He’ll probably be saying all kinds of things about it tomorrow. But you know what, I’m just to the point where I don’t care. I don’t care what that guy has to say,” he continued.

This story has been updated with additional comments from McCabe.

CNN’s Shawna Mizelle contributed to this report.