Federal prosecutors have been bumbling through the Bundy matter for years with little to show for it. On Wednesday, the case again blew up in their faces when a judge, citing misconduct, declared a mistrial in the latest proceedings.

The high-profile trial of 71-year-old Cliven Bundy, his two sons and a fourth man was supposed to give the government a chance at redemption after a string of failures. Instead, it turned into yet another fiasco, and the wounds were all self-inflicted.

U.S. District Judge Gloria Navarro, who had accommodated various prosecution efforts to limit the defense, ruled Wednesday that “a mistrial in this case is the most suitable and only available remedy.”

Federal agents arrested 17 men for their roles in the 2014 standoff near Mr. Bundy’s ranch outside Bunkerville. The confrontation developed after the government sought to remove Mr. Bundy’s cattle from the range, ostensibly due to his refusal to pay grazing fees and penalties, and supporters of the rancher, many of them armed, descended in protest. Although there were some tense moments, the encounter ended without violence.

But federal prosecutors, clearly trying to send a message, showed little restraint when it came to the charges. Some of the accused faced decades in prison. But the first trial involved six defendants and resulted in only two convictions, with the jury deadlocked on charges against the other four. The retrial in August went even worse for the government, with two men found not guilty and the remaining two cleared of most counts.

All of this came in the wake of a related case in Oregon triggered when Mr. Bundy’s two sons in early 2016 occupied a federal wildlife refuge in protest of an arson case involving another rancher. That incident, which left one man dead, led to more charges, but a federal jury in Portland eventually acquitted both Ammon and Ryan Bundy of all counts — another black eye for prosecutors.

In her ruling on Wednesday, Judge Navarro found that the government had willfully withheld evidence from the defense. The information included FBI interview reports and video surveillance maps that the judge concluded were potentially favorable to the accused.

“The defense has a right to information,” she said, “so it can provide it to the jury so the jury can decide.”

This is Evidence 101. As an attorney for one of the defendants put it, “‘willfully’ means they did it on purpose.” How federal prosecutors could let this happen in such a prominent case deserves further attention, but it smacks of vindictiveness and desperation.

Whether the Bundys are patriots defending the Constitution or misguided scofflaws intent on ignoring established law is irrelevant. Either way, they deserve a speedy and fair trial unmarred by prosecutorial misconduct.

Judge Navarro has set a Jan. 8 hearing on the future of the prosecution. Expect defense attorneys to mount vigorous arguments that the government’s “willful” behavior should result in the dismissal of all charges. Federal prosecutors will have a hard time offering a convincing rebuttal.