Federal prosecutors hid evidence from anti-Trump activists set to go on trial, two judges ruled this week.

For months, prosecutors have claimed a video by the conservative group Project Veritas proved that anti-Trump activists conspired to riot outside his inauguration. Court rules required the prosecution to disclose all edits made to the Project Veritas video, which purports to show some anti-Trump activists discussing the protest in advance. Instead, prosecutors passed off an edited video as undoctored, a judge ruled Wednesday and a second judge confirmed Thursday.

“During the course of discovery, defendants became aware that they did not have the original video, which was filmed by Project Veritas and provided to the government,” defense attorneys wrote in a motion to the judge.

The ruling could have major implications for the case — if the video hasn’t already tainted proceedings.

Following mass arrests outside President Donald Trump’s inauguration on January 20, 2017, D.C. prosecutors charged approximately 200 people with conspiracy to riot and damage property. The mass indictment relied on evidence as flimsy as people wearing black clothing or chanting anti-capitalist slogans. If convicted on all counts, defendants face decades in prison.

So far, the case hasn’t held up in court. The first six defendants were tried in December and cleared of all charges. Shortly thereafter, prosecutors dropped the charges against 129 more defendants. But dozens remain charged. The Project Veritas video, which purportedly showed activists discussing plans to disrupt pro-Trump inauguration celebrations days before the protest, was expected to be evidence in a number of those trials. The defendants, including one who says he wasn’t even at the protest, pushed back, citing the reputations of Project Veritas and its founder James O’Keefe, who have been accused of deceptive editing videos, among other dubious tactics.

This week, the defense pointed out a bigger problem with the Project Veritas video.

A legal provision called the Brady rule requires prosecutors to disclose any evidence in their possession that might help the defense’s case.

Prosecutors “released these videos to the defense, and told the defense and the judge [the videos] only had very specific edits to remove an undercover police officer and the person who recorded the undercover video, who was with Project Veritas,” Elizabeth Lagesse, a defendant told The Daily Beast. Her case is scheduled for later this year. “But it turns out, they had neglected to disclose more than that.”

At least one potentially exculpatory section had been completely edited from the video. In the removed clip, a Project Veritas agent undercut part of the prosecution’s argument.

“I was talking with one of the organizers from the IWW [Industrial Workers of the World] and I don’t think they know anything about any of the upper echelon stuff,” the Project Veritas employee said in the removed clip.

The line is critical because prosecutors have eyed the IWW, a leftist union, as an instigator for the protest, Shadowproof previously reported. A number of the remaining defendants are IWW members, and IWW records were seized from defendants’ cell phones and entered as evidence in the case.

In a late Tuesday filing first reported by The Intercept, defense attorneys spotted the edited footage and called foul.

“The government has abused its power by hiding discovery from all defendants,” attorneys for the defendants wrote in a motion, “purposefully choosing not to disclose Brady information, and calling into question the integrity of all of its third-party video evidence and proffers in open court.”

That filing went to Robert Morin, Chief Judge of the D.C. Superior Court. (Morin oversees motions in the case, but is not directly presiding.) Morin ruled that prosecutors had violated the Brady rule by repeatedly hiding the video’s edits from defendants. The ruling opens the prosecution up to sanctions, Morin said. Although the exact form of the potential sanctions remains unclear, Morin chewed out a U.S. Assistant Attorney who tried to argue that the prosecution had done nothing wrong.

“Do you want me to rule on the sanction right now?” Morin asked the assistant attorney, according to Unicorn Riot.

“ The government has abused its power by hiding discovery from all defendants. ” — Defense attorneys

Morin also raised the possibility of subpoenaing Project Veritas on the matter. The conservative group said they’d show up in court, if ordered.

“What happened between the judge and the prosecution is obviously beyond our purview,” Stephen Gordon, a Project Veritas spokesperson told The Daily Beast, “however we voluntarily cooperated with D.C. and federal law enforcement officials by supplying them with our video and will cooperate with any lawful order we receive from the court.”

On Thursday, the defense asked presiding Judge Kimberly Knowles to make a Project Veritas member available for a deposition. But the defense still worries the video might have already done its damage.

The clip is “problematic for the trial currently going on, because they played this Project Veritas video yesterday in that trial group,” Lagesse said on Wednesday. “So now what do they do? Do they try to cure that by telling the jury to ignore something they spent half a day watching and hearing about from a witness?”

Defense attorneys have suggested they might move for a mistrial based on the Brady ruling. Knowles reaffirmed Morin’s ruling on Thursday, although she declined to dismiss the case.

“It gives me a lot of hope for the case as a whole,” Lagesse said. “It’s the beginning of the process of exposing all this misbehavior that’s been going on under the surface.

“I think it’s going to be a lot easier for the defense to poke holes in things when people can see through and see that the prosecution is not acting as well as they might.”

Update, 5/25/18: This story has been updated with a quote from the defense to clarify they allege the government edited the Project Veritas video.