Former FBI deputy director Andrew McCabe has been sacked days before he could retire with pension rights.
He was fired by US Attorney General Jeff Sessions, who said an internal review found he leaked information and misled investigators.
Mr McCabe denied the claims and said he was being targeted because of his involvement in the inquiry into alleged Russian meddling in the 2016 election.
Mr Trump has long accused Mr McCabe of bias in favour of the Democrats.
He immediately praised Mr Sessions’ decision to fire him.
In December, the president appeared to taunt the number two at the FBI, when he tweeted: “FBI Deputy Director Andrew McCabe is racing the clock to retire with full benefits. 90 days to go?!!!”
Why was McCabe fired?
Mr Sessions, who heads the justice department, said the decision had been taken “after an extensive and fair investigation” into Mr McCabe. The FBI deputy director had officially stepped down in January while the review took place.
He said the internal report had concluded that Mr McCabe had “made an unauthorised disclosure to the news media and lacked candour – including under oath – on multiple occasions”.
The report has not been released but it is thought to refer to an interview Mr McCabe authorised between two FBI officials and a journalist in October 2016 to explain the agency’s position in an inquiry into Hillary Clinton’s use of a private email server while secretary of state.
In a statement late on Friday Mr Sessions said: “Based on the report of the Inspector General, the findings of the FBI Office of Professional Responsibility, and the recommendation of the Department’s senior career official, I have terminated the employment of Andrew McCabe effective immediately.”
Mr McCabe has been on leave since he stepped down, but has remained on the FBI’s books ahead of his expected retirement.
He has been with the bureau for two decades and was eligible for retirement on a federal pension from Sunday, when he turns 50. His sacking now puts that pension in doubt.
How did he respond?
Mr McCabe issued a lengthy statement vehemently rejecting the allegations against him and denouncing what he described as a campaign of attacks on his credibility.
He insisted he had done nothing wrong in organising the October 2016 interview, arguing he had gone to great lengths to ensure he was truthful and accurate in a subsequent inquiry into the matter.
“The big picture is a tale of what can happen when law enforcement is politicized, public servants are attacked, and people who are supposed to cherish and protect our institutions become instruments for damaging those institutions and people,” he said.
“Here is the reality: I am being singled out and treated this way because of the role I played, the actions I took, and the events I witnessed in the aftermath of the firing of James Comey.”
Mr Comey was fired as head of the FBI in May last year by the president, who cited his handling of the Clinton email investigation.
Mr Comey later told a Senate hearing that the president had requested his “loyalty”, amid an ongoing FBI investigation into allegations that Russian interference in the presidential election was designed to help Mr Trump.
In his statement, Mr McCabe alleges that the release of the report recommending his own firing was “accelerated” after he indicated that he would corroborate Mr Comey’s version of events.
Why did Trump object to McCabe?
Mr Trump has been a frequent critic of Mr McCabe, whom he accuses of political bias in his roles in the Russia and Clinton email investigations.
He has publicly pointed to donations Mr McCabe’s wife, a Democrat, received from a Clinton ally when she ran for the Senate in 2015.
The White House said it was for the attorney general, not President Trump, to fire Mr McCabe
In his statement, Mr McCabe said he and his family had been targets of an “unrelenting assault” in the media to undermine his reputation, and said Mr Trump’s tweets had “amplified and exacerbated it all”.
With time ticking until his official retirement, pressure has been building on Mr Sessions to make a move.
On Thursday White House Press Secretary Sarah Huckabee Sanders said any decision for his dismissal should be made by the Attorney General.
“That’s a determination that we would leave up to Attorney General Sessions,” she said.
“But we do think it is well documented that he has had some very troubling behaviour and by most accounts a bad actor and should have some cause for concern.”