WASHINGTON (AP) — FBI Deputy Director Andrew McCabe, a target of frequent and aggressive criticism by President Donald Trump, abruptly stepped down from his position Monday ahead of his planned retirement this spring.

A 22-year veteran of the FBI, McCabe has been publicly and repeatedly lambasted over the past year by Trump, who has accused him of bias because of his wife's political connections and an FBI investigation that produced no criminal charges against Hillary Clinton.

McCabe, who has held a number of FBI leadership roles and been heavily involved in investigations into major crimes including the 2013 Boston Marathon bombing, becomes eligible for retirement in a matter of weeks. FBI staff learned Monday that McCabe was leaving the bureau's No. 2 post effective immediately, according to people who spoke only on condition of anonymity to discuss an internal personnel move. He is expected to retire with full pension benefits.

The departure comes as FBI Director Christopher Wray makes changes to his senior leadership team, replacing two other top aides last week. Such changes are not unusual when a new director takes charge, but they are notable amid Trump's public pressure on Wray to get rid of officials who were confidants of James Comey, whom he fired as FBI director last May.

The White House is denying any involvement with FBI Deputy Director Andrew McCabe stepping down from his position ahead of a previously planned retirement this spring. (Jan. 29)

In a message Monday to FBI employees, Wray said McCabe would be retiring on March 18 and denied that the move stemmed from political pressure.

"I will not be swayed by political or other pressure in my decision-making," Wray wrote.

The exit comes amid multiple ongoing investigations, including a Justice Department watchdog probe into the actions of McCabe and other top FBI officials during the Clinton email probe. In addition, special counsel Robert Mueller is investigating whether the Trump campaign improperly coordinated with Russia during the 2016 presidential election and whether Trump sought to obstruct the inquiry by, among other actions, firing Comey.

McCabe has been repeatedly assailed by Trump since the fall of 2016, when it was revealed that his wife had accepted campaign contributions from the political action committee of then-Virginia Gov. Terry McAuliffe, a Democrat and close Clinton ally, during a failed state Senate run. That episode is among the decisions under review by the Justice Department's inspector general, which is expected to complete its report soon.

The FBI has said McCabe received the necessary ethics approval, and that at the time of the contributions, he was not in a supervisory role on the Clinton email investigation. But that has not stopped Trump and Republicans in Congress from repeatedly asserting that McCabe, and other FBI officials, are partisan law enforcement officials harboring a bias against him.

Responding to December news reports that McCabe would retire, the president wrote: "How can FBI Deputy Director Andrew McCabe, the man in charge, along with leakin' James Comey, of the Phony Hillary Clinton investigation (including her 33,000 illegally deleted emails) be given $700,000 for wife's campaign by Clinton Puppets during investigation?"

Another of the president's tweets from last year said: "Why didn't A.G. Sessions replace Acting FBI Director Andrew McCabe, a Comey friend who was in charge of Clinton investigation," referring to Attorney General Jeff Sessions.

Monday evening, Republicans on the House Intelligence Committee voted to release a classified memo they wrote that alleges that the FBI and the Justice Department improperly used government surveillance during the Russia investigation.

White House spokeswoman Sarah Huckabee Sanders told reporters Monday that Trump was not part of the decision-making process but that he stood by his criticism of McCabe. Amid the tensions, Wray and Deputy Attorney General Rod Rosenstein traveled to the White House Monday to meet with chief of staff John Kelly, according to a senior White House official who was not authorized to discuss the meeting publicly and requested anonymity.

The FBI's No. 3 official, David Bowdich, has been named acting deputy director.

Though McCabe has pushed back against White House narratives that Comey was not well-liked within the bureau, and that an ongoing FBI investigation into Trump campaign ties to Russia was not a significant matter for the FBI, he has not publicly discussed in detail his interactions with Trump or shared any personal observations of the president.

That could change upon his departure from the FBI. Comey, for instance, after his firing authorized a close friend to share with reporters details of his own encounters with the president that he said troubled him. And former CIA Director John Brennan and James Clapper, the retired director of national intelligence, have been outspoken about their own views of Trump.

McCabe became deputy director in 2016 following earlier jobs running the FBI's Washington field office and serving as head of its national security branch. A Duke University-educated lawyer, he joined the FBI in 1996 and worked on organized crime in New York.

He took over as acting director following Trump's May 9 firing of Comey, and was among the officials interviewed for the position, which ultimately went to Wray, a former Justice Department official. The Washington Post reported last week that Trump asked McCabe whom he had voted for in the presidential election. Trump has said he does not recall asking that question.

McCabe's defenders call him a thoughtful, intelligent and committed career agent.

Comey tweeted that McCabe "stood tall over the last 8 months, when small people were trying to tear down an institution we all depend on."

Former Attorney General Eric Holder tweeted: "FBI Deputy Director Andrew McCabe is, and has been, a dedicated public servant who has served this country well. Bogus attacks on the FBI and DOJ to distract attention from a legitimate criminal inquiry does long term, unnecessary damage to these foundations of our government."

Two days after Comey's firing, McCabe appeared at a congressional hearing and contradicted a White House assertion that Comey had lost the support of FBI rank-and-file. He declared, "I can tell you that the majority, the vast majority of FBI employees, enjoyed a deep and positive connection to Director Comey."

In one of the more dramatic exchanges of the day, he was asked whether the Trump-Russia investigation was a small matter in relation to the other work the FBI is conducting.

"Sir," he told Sen. Angus King of Maine, "we consider it to be a highly significant investigation."

___

Associated Press writers Zeke Miller and Jill Colvin contributed to this report.