A judge on Thursday dismissed the criminal case accusing former U.S. Olympic canoeist David Hearn of vandalizing the Lincoln Memorial Reflecting Pool and permanently barred prosecutors from refiling the same charges.

District of Columbia Superior Court Judge Todd Edelman, in his order tossing the case “with prejudice,” cited the “exceptional circumstances” of the risk that President Donald Trump would pressure prosecutors to re-charge Hearn. A dismissal with prejudice prevents a case from being refiled.

Edelman noted that Trump, who ordered renovations to the Lincoln Memorial’s pool this year, angrily lashed out at U.S. Attorney for D.C. Jeanine Pirro when she moved to dismiss the case after admitting damage to its water feature was caused by a “flawed installation,” not from Hearn ripping up its liner.

Trump has repeatedly insisted that the damage to the Reflecting Pool resulted from intentional vandalism. He has continued to claim that vandals cut a gash hundreds of feet long in the pool’s protective lining.

Pirro asked Edelman to dismiss the case without prejudice, allowing her to refile charges later.

“I do think there is a public interest in allowing a grand jury at a future date” to issue an indictment if new information comes to light, Assistant U.S. Attorney Michael Spence told Edelman in a court hearing in September.

Hearn’s attorneys argued that there was “no valid reason” to keep the case alive given the new evidence cited by Pirro.

In his ruling Thursday siding with that argument, Edelman wrote, “While all defendants deal with some degree of uncertainty regarding the odds of re-prosecution after a case has been dismissed, Mr. Hearn faces the unique possibility that the government will revive this case – one that it has already announced to be meritless – based on political pressure brought by the President of the United States upon his subordinate officers.”

The judge wrote that he respected the U.S. Attorney’s authority to decide which cases to prosecute and which to dismiss.

“However, in the exceptional circumstances posed by this case, the government has no right to retain the ability to compound the errors it has already made, or even to threaten to do so, at Mr. Hearn’s expense,” Edelman wrote in the order, which Hearn’s lawyers share with CNBC.

In a statement Thursday, Hearn’s attorneys called Edelman’s dismissal of the case with prejudice “a victory for the rule of law and for an innocent American seeking justice.”

“This case never should have been brought in the first place,” the statement said. “What happened to Mr. Hearn is an outrage that should shock every American.”

The White House and Pirro’s office did not immediately respond to requests for comment on the judge’s order.

— CNBC’s Dan Mangan contributed to this article