The embattled former deputy director of the FBI, Andy McCabe, had about three hours on Thursday to encapsulate a 22-year career in public service and make the case to keep his job until he is officially eligible for his retirement benefits in a few days.

FBI officials concluded he should be fired for allegedly misleading internal investigators, but the final decision rests with Attorney General Jeff Sessions, according to a source familiar with the matter.

At the White House Thursday, press secretary Sarah Sanders said the decision on McCabe was up to the Justice Department - not mentioning Sessions by name - but said it was "well-documented" that McCabe had a history of "troubling behavior" and was "by most accounts a bad actor."

Those close to McCabe say he believes he did nothing wrong – there was a misunderstanding, they insist, and he acted quickly to clear it up.

McCabe impressed that message upon career Justice Department officials when he sat down with them Thursday afternoon inside the department’s Robert F. Kennedy building, a Pennsylvania Avenue landmark sandwiched between Capitol Hill and the White House.

McCabe’s pending departure has been fraught with political pressures from both ends of Pennsylvania Avenue, as Republicans claim his wife’s failed Democratic run for state senate in Virginia means McCabe harbors political bias. McCabe, however, has always identified himself as a Republican, according to those who know him.

When news reports surfaced in December that McCabe was planning to retire four months later, President Donald Trump took to Twitter, alleging McCabe had ties to “Clinton Puppets” and accusing him of “racing the clock to retire with full benefits.” A month later, Trump’s son Donald Trump Jr. piled on, saying American taxpayers would be “stuck paying [McCabe] for the rest of his life.” Now Sessions — hoping to hold onto his own job in the midst of tensions with Trump — must ultimately decide McCabe’s fate.

The FBI’s Office of Professional Responsibility recommended that McCabe be fired, after an internal report by the Justice Department’s inspector general accused the FBI veteran of misleading investigators looking into how FBI and Justice Department officials handled an array of matters connected to the 2016 presidential campaign, a source briefed on the recommendation told ABC News.

McCabe is worried that if he were to be fired in the next few days, before he is officially eligible for his retirement benefits, he could lose a full pension, according to sources familiar with McCabe’s thinking.

McCabe is not facing any charges for his conduct, and even some of those who have pleaded guilty to federal charges and admitted to lying to federal authorities have been able to retain their pensions.

Trump’s former national security adviser, Michael Flynn, who pleaded guilty earlier this year to lying to authorities about his contacts with a Russian official, has been able to retain the pension he accrued from 33 years of military service.

Similarly, in 2015, after former CIA director Gen. David Petraeus admitted to giving his mistress classified information and then lying to FBI agents about it, Petraeus was able to retain his pension, which reportedly pays him $208,000 a year.

Federal law states that government employees can lose their pension and benefits if convicted of a federal crime.

Addressing McCabe’s case on Wednesday, a Justice Department spokeswoman said the department was following “a prescribed process by which an employee may be terminated.”

“That process includes recommendations from career employees and no termination decision is final until the conclusion of that process,” the spokeswoman said in a statement.

For more than a year, the Justice Department’s inspector general has been looking into whether McCabe should have done more to shield certain investigations from potential conflicts of interest, and the inspector general’s office recently completed a draft report on McCabe.

In the draft report, internal investigators conclude McCabe went too far in trying to push back against media reports questioning whether family ties to Democrats could impact his work, particularly when he authorized FBI officials to speak with a reporter about the agency’s investigation into the Clinton Foundation, according to a source familiar with the findings.

But the draft report takes particular issue with how forthcoming McCabe was when Justice Department officials asked him questions about his actions, according to the source.

Those close to McCabe insist he has been forthcoming with investigators.

McCabe “tried at every juncture to be as accurate and of course truthful” as he could, and he even “proactively reached out” to investigators to clarify any misunderstandings and make sure they had the most complete information from him, according to one source speaking in defense of McCabe.

The source insisted that McCabe never authorized “a leak” to a reporter and that discussions with a reporter about the Clinton Foundation probe were coordinated by an agency spokesman and an FBI attorney.

“It took place over the course of several days,” the source said. “So to be kind of retrospectively misrepresented as sort of a clandestine secretive leak is sort of … an unfair portrayal.”

McCabe first joined the FBI in 1996, investigating organized crime cases in New York. Over the next several years, he shifted his focus to rooting out international terrorists, and in 2012 he became the head of the FBI’s counterterrorism division at headquarters in Washington.

In October 2013, McCabe took over the FBI’s entire national security branch, and the next year he moved to become the Assistant Director in Charge of the FBI’s Washington Field Office. He then rejoined the ranks at FBI headquarters, becoming the deputy director in February 2016.

Over the past year, McCabe has become a frequent target of criticism from Trump and Republican lawmakers, who allege that McCabe’s time at the top of the FBI was emblematic of political bias in the FBI’s law enforcement work.

At the time his wife, Jill, was running for election in Virginia, McCabe was the head of the FBI’s Washington Field Office.

Emails and correspondence released by the FBI show McCabe recused himself from any public corruption cases tied to Virginia. He became deputy director in February 2016, giving him an oversight role in the investigation of Hillary Clinton’s use of a private email server as secretary of state. McCabe’s wife had lost her election bid three months earlier.

Still, in October 2016, the Wall Street Journal published at least one article that called into question McCabe’s ability to fairly oversee the federal probe of the Clinton Foundation. Ahead of the story’s publication, McCabe authorized an FBI spokesman to speak with the Wall Street Journal about efforts to keep the Clinton Foundation investigation moving forward, the source familiar with the inspector general’s findings told ABC News.

Days after the Wall Street Journal story was published, McCabe recused himself from the Clinton matter.

In December, FBI director Chris Wray defended McCabe, telling lawmakers he would “quarrel” with suggestions that McCabe has expressed any sort of political bias.

“I'm not aware of any senior FBI executives who are allowing improper political considerations to affect their work with me right now,” Wray told the House Judiciary Committee.