FBI Deputy Director Andrew McCabe — one of President Trump’s top targets in his running feud with the bureau — stepped down Monday under pressure from Director Christopher Wray, according to a report.

Despite Trump’s constant criticism of McCabe, the White House insisted that the president played no role in his departure.

“The president wasn’t part of this decision-making process,” said administration spokeswoman Sarah Huckabee Sanders said.

McCabe was expected to retire for the bureau this year.

But his sudden exit came after Wray expressed concern about an upcoming inspector general’s report about McCabe’s and other senior FBI officials’ performance during the 2016 presidential campaign, when the feds were investigating Hillary Clinton’s emails and Team Trump’s ties to Russia, The New York Times reported.

Wray offered McCabe, 49, a transfer that the veteran FBI man saw as a demotion.

So he decided to pack it in on Monday.

But he’ll remain on the payroll using accrued time off until mid- March, when he maxes out his pension benefits.

Trump made no secret of his dislike and mistrust of McCabe, believing he was too tight with Comey.

After Trump fired Comey, who was in California at the time, the president was enraged when he saw on TV that he was returning to the capital on an FBI plane, and phoned McCabe demanding to know who approved it, NBC News reported, citing sources.

McCabe told him he didn’t authorize the flight — but would have if asked.

The president then suggested that McCabe call his wife and ask her how it feels to be a loser — a reference to her failed bid for a Virginia state Senate seat in 2015.

McCabe replied: “OK, sir,” and Trump hung up on him, the network reported.

During an introductory meeting after Comey was fired, the president also asked McCabe whom he voted for in the election — and McCabe declined to tell him.

Records showed he voted in Virginia’s GOP primary but not the general election.

The president had also targeted McCabe over the ongoing special counsel’s investigation into Russian meddling in the US election and possible collusion with his campaign.

Trump further slammed McCabe because his wife accepted cash from a Super PAC connected to Terry McAuliffe, a longtime ally of the Clintons.

The president ratcheted up his attacks last summer.

“Problem is that the acting head of the FBI & the person in charge of the Hillary investigation, Andrew McCabe, got $700,000 from H for wife,” Trump tweeted in July.

The president pumped up the pressure again in December in a series of pre-Christmas tweets.

“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?” he wrote on Dec. 23.

“FBI’s Andrew McCabe, in addition to his wife getting all of this money from M (Clinton Puppet), he was using, allegedly, his FBI Official Email Account to promote her campaign. You obviously cannot do this. These were the people who were investigating Hillary Clinton,” he added a day later.

McCabe was named deputy director after Wray was tapped to head the FBI following Comey’s firing.

A 22-year FBI veteran, McCabe has held a number of leadership roles and has been heavily involved in investigations into major crimes, including the 2013 Boston Marathon bombing.

A Duke University-educated lawyer, he joined the FBI in 1996 and worked on organized crime in New York.

A former boss praised McCabe.

Ex-Attorney General Eric Holder called McCabe “a dedicated public servant who has served this country well,” The Washington Post reported.

Holder, a Democrat, also denounced “bogus attacks on the FBI and DOJ [Department of Justice] to distract attention from a legitimate criminal inquiry,” referring to the Russia investigation.

With Wires