A federal judge dismissed the criminal indictments against former FBI Director James Comey and New York Attorney General Letitia James after finding the prosecutor who brought the cases, former Trump attorney Lindsey Halligan, was not lawfully appointed.

“I agree with Mr. Comey that the Attorney General’s attempt to install Ms. Halligan as Interim U.S. 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,” U.S. District Judge Cameron Currie wrote in her ruling, finding the indictment should be tossed because the appointment of former Donald Trump personal lawyer Lindsey Halligan was invalid and she’d lacked the authority to present a case to a grand jury.

“All actions flowing from Ms. Halligan’s defective appointment, including securing and signing Mr. Comey’s indictment, were unlawful exercises of executive power and are hereby set aside,” the judge wrote.

She issued a separate, similar ruling dismissing the James case.