The Federal Bureau of Investigation's deputy director, whom US President Donald Trump repeatedly accused of political bias, has resigned.

Andrew McCabe was pressured to quit by FBI Director Christopher Wray in advance of an inspector general report examining the agency, reports CBS News.

Mr McCabe was reportedly due to retire on 18 March.

His exit from the top law enforcement agency comes a week after a report that Mr Trump wanted him out.

An internal communication authored by Mr Wray shows Mr McCabe's early departure was the result of a forthcoming FBI inspector general report that concluded the agency must perform at the highest standards, according to CBS News.

Earlier on Monday, the New York Times reported that Mr Wray had expressed an interest in moving Mr McCabe to another job, which would have been a demotion, ahead of the inspector general report.

It is unclear when the report will be released.

White House press secretary Sarah Huckabee Sanders told Monday's daily press briefing: "This decision was not made by the White House."

"The president wasn't part of this decision making process," she added.

Why is this significant?

Mr McCabe briefly became acting FBI director last May after Mr Trump fired its previous chief, James Comey.

Mr Comey had been overseeing the bureau's investigation into alleged Russian interference in the 2016 presidential election.

Mr Trump eventually nominated Christopher Wray as the new FBI director, and he was confirmed by the Senate in August.

Mr Wray recently threatened to resign after being pressured by Attorney General Jeff Sessions to fire Mr McCabe, Washington DC news outlet Axios reported last week.

Mr McCabe, 49, who was already expected to step down in early 2018 upon becoming eligible for his pension, instead chose to step down now and is on leave ahead of his official retirement date, CBS News reports.

Later Mr Comey tweeted his support for his former deputy.

Purge?

Andrew McCabe had become a lightning rod for Republican criticism of the FBI's handling of the investigation into possible Trump campaign ties to Russia. Now he's heading for - or, perhaps, being pushed toward - the exits a bit earlier than he planned.

Donald Trump had already been explicit in his criticism of the bureau's second-in-command during the tumultuous 2016 presidential election season. In a late December tweet, the president essentially counted the days until Mr McCabe's planned springtime retirement.

FBI Director Christopher Wray reportedly threatened to resign rather than sack his deputy director. Something changed.

Perhaps the political pressure from Republicans became too much. Or maybe, as Democrats have warned, this is the beginning of a political-tinged purge of the nation's top law-enforcement agency.

If there's something more concerning about Mr McCabe's tenure, beyond a Democratic-affiliated wife or his name surfacing in text messages in 2016 between two FBI employees who had been critical of Mr Trump, it's only a matter of time before it comes to light.

What's clear at this point, however, is that the Russian investigation is increasingly becoming mired in partisan trench warfare - and it could directly affect how Robert Mueller's special investigation proceeds.

Why did Trump criticise McCabe?

The Republican president has previously criticised Mr McCabe because his wife, Dr Jill McCabe, ran as a Democrat in a failed bid for Virginia's state senate.

Her campaign received nearly $500,000 (£355,000) in donations from a political funding committee aligned with Hillary Clinton, Mr Trump's 2016 election rival.

Mr Trump has railed against Mr McCabe and his wife on Twitter, calling the FBI chief a "Comey friend".

Last July he tweeted: "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!"

The Washington Post reported last week that Mr McCabe was disturbed by a question he was asked by the president during a get-to-know-you Oval Office meeting.

Mr Trump had reportedly asked Mr McCabe who he voted for in the 2016 US presidential election, according to current and former officials in the report.

Mr McCabe said he told the president that he did not vote.

The president has questioned how Mr McCabe could have handled the FBI investigation into Mrs Clinton's use of a private email server when his wife received donations from "Clinton Puppets".

He also reportedly called Mr McCabe and demanded to know why Mr Comey was allowed to fly back on an FBI plane after he was fired in May, NBC News reported, citing people familiar with the phone call.

During that reported phone call, the president allegedly turned on Mr McCabe and told him to ask his wife "how it feels to be a loser", referencing her campaign loss, according to NBC News.

Did McCabe have a conflict of interest?

Recently released text messages indicate FBI officials felt Mr McCabe should have recused himself earlier from the Clinton email investigation owing to his wife's political aspirations.

In a 28 October 2016 exchange, FBI agent Peter Strzok wrote to colleague Lisa Page that the bureau's chief of staff "very clearly 100% believes that Andy should be recused because of the 'perception'".

Mr McCabe eventually did recuse himself from the Clinton probe a week before the November 2016 election.

Republican-led congressional committees have launched inquiries into whether the FBI botched its Clinton investigation and showed favouritism towards her.

Democrats have said those investigations are attempts to distract from US Department of Justice Special Counsel Robert Mueller's investigation into whether Mr Trump's 2016 presidential campaign colluded with Russia.