Fired former FBI Director James Comey applauded outgoing FBI Deputy Director Andrew McCabe for his service Monday after news broke that McCabe had resigned from the bureau effective immediately.

"Special Agent Andrew McCabe stood tall over the last 8 months, when small people were trying to tear down an institution we all depend on," Comey wrote on Twitter. "He served with distinction for two decades. I wish Andy well."

"I also wish continued strength for the rest of the FBI. America needs you," he added.

McCabe is taking "terminal leave" from Monday until he can officially retire when his government pension starts, sources told the Washington Examiner.

McCabe's departure from the FBI follows months of simmering tensions between the White House and FBI leadership after allegations of bias surfaced over how the agency conducted its investigation into Hillary Clinton's private email server.

McCabe was targeted personally and publicly by President Trump himself regarding campaign donations McCabe's wife received from former Virginia Gov. Terry McAuliffe, a longtime Clinton supporter, for her failed bid for a Virginia state Senate seat as a Democrat.

McCabe, 49, has been part of the FBI since 1996 and has worked in its Counterterrorism Division and National Security Branch, which handled the 2013 Boston Marathon bombing and the arrest and interrogation of 2012 Benghazi suspect Ahmed Abu Khattala.

Comey appointed McCabe to be deputy director in January 2016.

Comey's firing from the FBI in May is one of the alleged subjects of special counsel Robert Mueller's Russia probe.

Mueller is looking into whether Comey's dismissal by Trump amounts to an obstruction of justice given the bureau's own investigation into possible collusion between Trump campaign associates and Russian operatives.