UPDATED 7 p.m. Eastern—A federal judge in Florida on Monday dismissed the criminal classified documents case against former President Donald Trump, saying the appointment of special counsel Jack Smith as a prosecutor for the case violated the appointments clause of the U.S. Constitution. Smith’s office announced it would appeal the ruling.

Trump faced charges of illegally retaining classified government documents after leaving the White House in January 2021 and trying to withhold them from government officials who sought their return.

Judge Aileen Cannon granted Trump’s motion to dismiss the case, ruling that when Attorney General Merrick Garland nominated Smith, he violated the Constitution’s appointments clause, which states that “Officers of the United States” must be appointed by the president and confirmed by the U.S. Senate.

Cannon also ruled that Smith’s use of funds from a permanent indefinite appropriation also violates the appropriations clause of the Constitution, but the dismissal solves that issue.

Former Attorney General Ed Meese and two law professors, Steven Calabresi and Gary Lawson, filed an amicus brief in December arguing that Garland lacked the power to appoint Smith for many reasons. They argued that Garland, the attorney general, has no authority to appoint a “private citizen to receive extraordinary criminal law enforcement power under the title of special counsel.”

Meese, Calabresi, and Lawson also noted that there is no statute authorizing the “attorney general, rather than the president by and with the advice and consent of the Senate, to appoint… a special counsel” like Smith.

Smith’s office announced it would appeal the order, asking a higher court to dismiss it and revive the case, the Associated Press reported.

Cannon’s ruling came within 48 hours of the attempted assassination of Trump at a campaign rally Saturday evening in Butler, Pennsylvania. One bullet from the gunman’s rifle struck Trump’s right ear seconds before the Secret Service shot and killed the gunman on a nearby roof.

Rallygoer Corey Comperatore, a former fire chief who lived in Sarver, Pennsylvania, died from a gunshot wound sustained after he dove on family members to protect them. A spokesman for Allegheny Health Network said two other Pennsylvania men were wounded and in critical condition: a 57-year-old resident of New Kensington and a 74-year-old resident of Moon Township, USA Today reported.

On May 30, a Manhattan jury convicted Trump of 34 felony counts of falsifying business records with intent to conceal another, unspecified crime.

Judge Juan Merchan initially set a sentencing date for July 11, but delayed sentencing and then the Supreme Court’s ruling in Trump v. United States further complicated the issue. The Supreme Court ruled that presidents and former presidents enjoy “absolute immunity” for core constitutional functions and “presumptive immunity” for all “official acts.”

Trump faces two more criminal cases: Fulton County District Attorney Fani Willis is prosecuting the former president for alleged illegal attempts to interfere in the 2020 presidential election. Another case involving Smith alleges that Trump attempted to obstruct an official proceeding on Jan. 6, 2021, when Congress met in joint session to certify the Electoral College results giving Joe Biden the victory over Trump.

Cannon’s ruling may not affect these cases, but the Supreme Court’s ruling in Trump v. U.S. likely will affect both.

Biden also faced an investigation for allegedly mishandling classified documents. But another special counsel, Robert Hur, ultimately recommended against bringing charges against Biden, saying the president likely would win over a jury by presenting himself as an “elderly man with a poor memory.”

Trump appointed Cannon to the federal bench.

This is a breaking story and will be updated.