The US Justice Department withdrew its case against former White House national security adviser Michael Flynn on Thursday in a reversal that handed President Donald Trump a major political victory.
The department said in a filing that Mr Flynn's December 2017 guilty plea for lying to the FBI in an interview over his Russia contacts was moot because the lies were insignificant.
It also said the FBI's original investigation of Mr Flynn – part of the sweeping counterintelligence investigation into Russian interference in the 2016 presidential election – had no "legitimate investigative basis."
The decision by close Trump ally Attorney General Bill Barr effectively reversed 18 months of work by the department and FBI under Mr Barr's predecessors.
It also added fuel to Mr Trump's allegation over the past three-plus years that the Russia investigation was a political "witch hunt".
"He was targeted by the Obama administration and he was targeted in order to try and take down a president, and what they've done is a disgrace," Mr Trump said on Thursday.
He took aim at the FBI and Justice Department officials behind the original investigation.
"I hope a lot of people are going to pay a big price, because they're dishonest crooked people. They're scum and I say it a lot. They're scum, they're human scum," he said.
The move came as Mr Flynn, the former Pentagon intelligence chief and a retired three-star general, was fighting possible imprisonment, and minutes after the case's lead prosecutor, Brandon Van Grack, withdrew in apparent disagreement with Mr Barr.
"Our duty we think, is to dismiss the case," Mr Barr told CBS News.
"A crime cannot be established here. They did not have a basis for the counterintelligence investigation against Flynn."
Current and former officials associated with the investigation voiced outrage and accused Mr Barr of doing Mr Trump's bidding.
"The evidence against General Flynn is overwhelming. He pleaded guilty to lying to investigators," said Jerry Nadler, the Democratic chairman of the House Judiciary Committee.
"And now a politicised and thoroughly corrupt Department of Justice is going to let the president's crony simply walk away."
Former FBI deputy director Andrew McCabe, who oversaw the Russia investigation, said Mr Barr's argument is "patently false, and ignores the considerable national security risk his contacts raised".
"Today's move by the Justice Department has nothing to do with the facts or the law – it is pure politics designed to please the president," he said.
The case against Mr Flynn was a cornerstone of the sprawling 22-month investigation by Special Counsel Robert Mueller into Moscow's meddling in the US election.
Mr Flynn drew attention for a number of contacts with Russia, including being paid tens of thousands of dollars the previous year to attend a banquet in Moscow for Russian media giant RT, where he sat next to President Vladimir Putin.
The probe ultimately focused on his secret talks in December 2016, before Mr Trump was inaugurated, with Russian envoy to Washington Sergey Kislyak.
In a number of phone calls wiretapped by FBI spy hunters, Mr Flynn allegedly sought to cut political deals with Moscow for the incoming administration, deals which undermined the positions of the government of then-president Barack Obama.
The Russia meddling investigation snowballed after Mr Trump fired FBI director James Comey in May 2017 for rejecting his overtures to drop the Flynn probe, drawing allegations of obstruction of justice.
The Justice Department then named Mr Mueller as a special prosecutor to pursue the investigation into numerous contacts between Mr Trump's campaign and the Russians, which fuelled suspicions of collusion.
That however further infuriated Mr Trump, who all but declared war on the department, the FBI and the intelligence community which supported the probe.
In December 2017 Mr Flynn pleaded guilty to one count of lying to investigators, in a deal in which he avoided other charges including illegally lobbying for Turkey.
But late last year, facing sentencing, he switched lawyers and moved to withdraw his plea.
Mr Trump meanwhile began speaking in his defence, calling the people who investigated Mr Flynn "dirty, filthy cops".
Mr Flynn was one of six people associated with the Trump campaign who were ultimately convicted or pleaded guilty in the Mueller investigation.
Mr Mueller also issued indictments against 25 Russian individuals and three Russian companies.
His final report in March 2019 offered evidence of improper collusion between the Trump campaign and the Russians, and detailed multiple instances of Mr Trump's alleged obstruction of the investigation.
But Mr Barr, who Mr Trump named attorney general in 2018 during the investigation, declared there was nothing in the report supporting legal action against the president.