The case against former President Donald Trump brought forward by Special Counsel Jack Smith related to the alleged mishandling of classified documents has been dismissed.

U.S. District Judge Aileen Cannon dismissed the indictment because Smith was improperly appointed, according to court filings.

“Upon careful study of the foundational challenges raised in the Motion, the Court is convinced that Special Counsel Smith’s prosecution of this action breaches two structural cornerstones of our constitutional scheme — the role of Congress in the appointment of constitutional officers and the role of Congress in authorizing expenditures by law,” Cannon concluded in her nearly 100-page order.

The ruling is a stunning legal victory for Trump and comes on the heels of his miraculous survival during an assassination attempt in Butler County, Pennsylvania, on July 13.

Trump has had other victories in recent days. The Supreme Court recently ruled in his favor, developing the constitutional principle of presidential immunity. The high court’s findings may result in the overturning of the former president’s conviction on 34 criminal charges in New York state court.

The New York case derived from Trump’s alleged “hush money” payments to porn star Stormy Daniels during the 2016 presidential campaign related to an alleged affair from around 20 years.

Trump also defeated two challenges to his candidacy in Colorado and Maine. Both cases resulted from attempts to remove Trump from the ballot. They were consolidated on appeal to the Supreme Court, which ruled that both actions were unlawful.