A federal judge declared a mistrial Wednesday in the case against rancher Cliven Bundy, his two sons and another self-styled militiaman. The men had been charged with conspiracy and assault after their 2014 dispute over cattle-grazing rights in Nevada developed into an armed standoff with federal agents.

U.S. District Judge Gloria Navarro found that prosecutors had failed to turn over documents that could be used to support the defense's case. As NPR's Kirk Siegler reports, Navarro also noted "that the government had erroneously claimed several things, including that there weren't snipers surveying the Bundy ranch when there were."

"The court does regrettably believe a mistrial in this case is the most suitable and only remedy," she said from the bench Wednesday.

Navarro subsequently dismissed the jury from the Las Vegas courtroom and called the trial at an end. Prosecutors are expected to seek a retrial.

The ruling comes more than three years since Cliven Bundy, his sons Ryan and Ammon, and a fourth man, Ryan Payne, stood down federal agents in a weekslong confrontation in the Nevada desert.

The federal government had ordered the elder Bundy to remove his cattle from public lands, where he had been grazing them for decades without permits and paying fees — and racking up an estimated millions of dollars in backlog. Yet when agents came to round up that cattle in April 2014, they found a militia toting weapons and flags waiting for them.

"Interstate 15 was blocked. Guns were drawn and things got extremely tense," Kirk explained earlier this year. "Federal agents in military-style combat fatigues eventually stood down. ... Cliven Bundy wasn't arrested until almost two years later."

Yet attempts to prosecute the Bundys have proven as halting as the attempts to arrest them.

Ammon and Ryan Bundy, along with several other codefendants, were acquitted last year on similar — but separate — charges for their role in the 2016 armed occupation of Oregon's Malheur National Wildlife Refuge. While two of their fellow occupiers were later convicted on federal conspiracy charges, the brothers Bundy had successfully argued that they were simply exercising their First and Second Amendment rights during that 41-day standoff.

They remained on the hook for charges related to the 2014 Nevada standoff — though that prosecutors there experienced several starts and stops of their own even before Wednesday's ruling, as The Associated Press notes:

"Six men [besides the Bundys] who acknowledged carrying assault-style weapons faced a trial and a retrial. Two were acquitted, two were convicted of some charges and two are free after pleading guilty to misdemeanors to avoid a third trial. None was found guilty of a conspiracy charge."

Speaking with reporters after the ruling Wednesday, Ammon Bundy celebrated the mistrial as a victory over the federal government.

"I think there's enough evidence there to appear that they wanted a confrontation," he said outside the courthouse, surrounded by his supporters. He argued that he believes the agents were seeking the confrontation "so that they could show the world — or have excuse to say, 'Look, Cliven Bundy is violent, Cliven Bundy's sons are violent.' "

"We are not violent people," he added.

"This should be a pretty straightforward case," Kieran Suckling, executive director of the Center for Biological Diversity, told Kirk outside the courtroom where he had been protesting against the Bundys.

Copyright 2017 NPR. To see more, visit http://www.npr.org/.