A judge declared a mistrial in the conspiracy case against rancher Cliven Bundy and his family, dealing a major blow to the US government and another victory for those who have long fought federal regulators over land rights.

A Nevada federal judge ruled Wednesday that prosecutors willfully withheld evidence in the case against Bundy and two of his sons, who were facing a slew of felony charges stemming from a 2014 standoff with federal agents at the family’s ranch north of Las Vegas. The mistrial marks the latest in a series failures by the US government to prosecute the ranching family and their supporters, who were found not guilty in a surprise verdict last year surrounding an armed takeover of a national wildlife refuge in Oregon.

The Bundys – who were accused of assault, threats against the government, firearms offenses, obstruction and a range of other charges – have become heroes in the American west and in rightwing militia movements after their high-profile protests of federal land regulations.

“We’re just happy that the truth is finally coming to light,” said Angie Bundy, wife of Cliven’s son Ryan, who was also on trial. “We’re wanting to go back to our lives.”

The mistrial means the government might have another chance to try the family next year, but nonetheless marks a significant defeat for the federal prosecutors, who have aggressively targeted the family and dozens of supporters over the last two years.

The Bundys first received international attention in 2014, when the government attempted to seize the family’s cattle after the ranchers refused to pay public land grazing fees for years. That led to an armed standoff between federal agents and the family and hundreds of supporters who flocked to the Bunkerville ranch to defend the ranchers. The government eventually retreated.

Supporters of Cliven Bundy outside a Las Vegas federal courthouse in 2016. Photograph: John Locher/AP

In early 2016, Cliven’s sons Ryan and Ammon helped lead a similar standoff at the Malheur national wildlife refuge in eastern Oregon to protest the government’s prosecution of local ranchers. After that conflict ended, following law enforcement’s fatal shooting of one of the protest leaders, the federal government arrested the Bundys and their followers across the country, eventually filing conspiracy charges surrounding both the Oregon and Nevada conflicts.

After the Bundys were acquitted in Oregon last year, the Nevada case provided a high-stakes second opportunity for the US attorney’s office to convict and imprison the family. But the second trial recently fell apart surrounding prosecutors’ decision to withhold documents that could have bolstered the defense’s case, including records about the conduct of federal agents and the government’s surveillance and use of snipers during the 2014 standoff.

The prosecution’s missteps speak to the government’s eagerness to secure a conviction that would strengthen federal control of land, said Bret Whipple, Cliven’s attorney.

“It’s a very high priority for the government. They are under so much pressure,” he said in an interview after the decision. “It really comes down to who controls the range and who will have access to it in the future … This is certainly a blow to anybody who believes in federal rights over states’ rights in my opinion.”

Claims of federal misconduct have caused problems in both cases against the Bundys. Earlier this year, it was revealed that the FBI had posed as journalists in an effort to extract information from the defendants in the Nevada case. A key Bureau of Land Management agent in the case was also caught up in an unrelated ethics scandal.

In Oregon, FBI agents were investigated for allegedly covering up facts about the killing of one of the protest leaders.

Ammon Bundy after being released from custody on 30 November 2017. He is now living under house arrest. Photograph: Joel Angel Juarez/AP

Environmental groups and others supporting the prosecution have argued that the Bundys and their movement against federal regulations pose major threats to land sustainability and conservation and has emboldened militias and armed threats against the government.

In January, the Nevada judge will determine whether the prosecution is allowed to bring another trial.

US attorney Steven Myhre said in a statement, “We respect the ruling of the court and take very seriously our discovery obligations.” A US Department of Justice spokesperson also said that attorney general Jeff Sessions had directed an expert to “be deployed to examine the case and advise as to next steps”.

Aaron Weiss of the Center for Western Priorities, a conservation group that has opposed the Bundys, said the mistrial was only a setback: “We still fully expect Cliven and the rest of the Bundy family to be held accountable.”

Ryan and Ammon were recently released from jail after nearly two years behind bars and have been living under house arrest.

“It’s been the best thing in the world to have him home,” said Angie, adding that she hopes there will be no further trials. “I don’t know what kind of case they have to come against us.”

Cliven chose not to leave jail on house arrest, arguing that he is innocent and should not have to be monitored in any form, said Whipple, who said he was seeking to now get him released without any conditions. “I’m trying to get him out for Christmas.”