The criminal cases against two high-profile critics of Donald Trump — former FBI director James Comey and New York Attorney-General Letitia James — have been thrown out of court.
A judge found the former White House staffer who led the prosecutions, Lindsey Halligan, was "unlawfully appointed" to her role by Mr Trump's attorney-general, Pam Bondi.
The decision is a setback for Mr Trump's mission to seek retribution against those people he believes wronged him before he returned to the presidency.
He had publicly instructed his attorney-general to take action against both defendants in a Truth Social post shortly before they were charged.
After the cases were dismissed on Monday, local time, Mr Comey posted a video to Instagram to express his gratitude to the court.
"This case mattered to me personally, obviously, but it matters most because a message has to be sent that the president of the United States cannot use the Department of Justice to target his political enemies," Mr Comey said.
"I don't care what your politics are. You have to see that is fundamentally unAmerican and a threat to the rule of law that keeps all of us free."
Lawyers for Mr Comey had argued that Ms Bondi did not have the legal authority to appoint Ms Halligan to the role.
In her ruling, District Judge Cameron McGowan Currie wrote: "I agree with Mr Comey that the Attorney General's attempt to install Ms Halligan as Interim US Attorney for the Eastern District of Virginia was invalid.
"And because Ms Halligan had no lawful authority to present the indictment, I will grant Mr Comey's motion and dismiss the indictment without prejudice."
The case against Ms James, who had previously sued Mr Trump for defrauding New York banks and businesses, was dismissed for the same reasons.
Ms James said she was "heartened by today's victory".
"I remain fearless in the face of these baseless charges as I continue fighting for New Yorkers every single day," she said in a statement to US media.
White House spokeswoman Abigail Jackson told the ABC the facts of the cases had not changed "and this will not be the final word on the matter".
White House press secretary Karoline Leavitt later accused the judge of trying to "shield" Mr Comey and Ms James from accountability.
"The Department of Justice will be appealing very soon," she said.
Cases could be revived
Both Mr Comey and Ms James were charged shortly after Mr Trump used social media to instruct Ms Bondi to take action against them. "JUSTICE MUST BE SERVED, NOW!!!" he wrote in a post to "Pam" on September 20, which named both Mr Comey and Ms James.
Two days later, Ms Bondi authorised Ms Halligan's appointment to the interim US attorney position.
Three days after that, Mr Comey was indicted on charges of making a false statement and obstructing Congress during testimony he gave in 2020.
And in October, Ms James was charged with mortgage fraud, accused of falsely claiming a rental property was a second home to get a better interest rate on a loan.
The judge's decision to dismiss the cases "without prejudice" means the Department of Justice could attempt to prosecute them again.
Legal experts in the US said the statute of limitations had now expired on the case against Mr Comey, which could prevent it from being revived.
But in his video post, Mr Comey said he expected Mr Trump "will probably come after me again".
"And my attitude is going to be the same," Mr Comey said. "I'm innocent, I am not afraid, and I believe in an independent federal judiciary."
Ms Halligan, who was Mr Trump's choice for the role, was wrongly appointed because Ms Bondi had missed a deadline to appoint her.
Ms Bondi had already put another lawyer, Erik Siebert, into the role, which triggered a 120-day deadline before Ms Bondi no longer had authority to make appointments to the position.
After that deadline, which was reached in May, only the district court could make appointments to the role. It meant Ms Bondi did not have the authority to replace Mr Siebert when he resigned in September, after Mr Trump had said: "I want him out."