A judge has dismissed conspiracy charges against rancher Cliven Bundy and his sons, marking an extraordinary failure by US prosecutors and a decisive victory for the Nevada family who ignited a land rights movement in the American west.

The Bundys, who led armed standoffs against the government in Nevada and Oregon, galvanizing far-right militia groups, saw all charges dismissed in Las Vegas on Monday. It was the second major court win for the ranchers in their decades-long battle to oppose federal land regulations.

Cliven Bundy, 71, and his sons Ammon and Ryan were accused of assault, threats against the government, firearms offenses and obstruction, stemming from the family’s refusal to pay grazing fees for their cattle in Nevada, which escalated into an armed conflict at their ranch in 2014. The judge declared a mistrial in December and ruled on Monday that prosecutors could not retry the case, arguing that the US attorney’s office had willfully withheld evidence and engaged in misconduct.

Angie Bundy, Ryan’s wife, said she hoped the ruling would boost states’ rights and encourage federal regulators to leave ranchers alone.

“The federal government is overstepping so many bounds. I’m hoping they will let states and counties do their jobs and stay out of our land,” she told the Guardian by phone from court. “I hear from ranchers all the time about the horrible abuses they are enduring. I’m hoping this will give some people relief.”

From left to right outside the courthouse: Ammon Bundy, Ryan Payne, Jeanette Finicum, widow of Robert ‘LaVoy’ Finicum, Ryan Bundy, Angela Bundy (wife of Ryan Bundy) and Jamie Bundy (daughter of Ryan Bundy). Photograph: John Locher/AP

The stunning defeat for the government – which has also been accused of lying and deceptive tactics in their prosecution of the Bundys – outraged environmental groups that have advocated the punishment of ranchers who defy land-use laws and have supported tighter regulations to protect public lands.

“It’s just a horrific outcome,” said Kieran Suckling, executive director of the Center for Biological Diversity. “This is going to empower both the militia and the politicians who want to steal America’s public lands. It’s an absolute disaster.”

The Bundys first made international headlines in 2014 when the government attempted to seize their cattle, but retreated in the face of hundreds of supporters at the family ranch in Bunkerville, some heavily armed. Emboldened by the victory, Ammon and Ryan helped lead a takeover of the Malheur national wildlife refuge in eastern Oregon in January 2016 to protest against the imprisonment of two local ranchers.

That standoff ended after police killed one of the leaders and arrested the Bundys and their followers. US prosecutors subsequently charged the family and dozens of other men with conspiracy and other charges for both the Nevada and Oregon cases.

A jury found the Bundys not guilty in Oregon in 2016, a surprise verdict that increased pressure on the federal government to secure a conviction in Nevada. But the case unraveled after defense attorneys argued that prosecutors failed to disclose evidence relating to government surveillance cameras and snipers at the ranch during the 2014 dispute. Last month, the attorney general, Jeff Sessions, directed a US justice department expert to assist in the case.

Rancher Cliven Bundy, who was released from jail on Monday, pictured near Bunkerville, Nevada. Photograph: John Locher/AP

Suckling pointed out that Bundy’s cattle continue to graze on federal lands in violation of the law and argued that the decision could encourage supporters to launch new conflicts to fight for unregulated grazing, mining and logging on public lands. “I’m really distraught and outraged at the prosecution and the FBI for their incompetence.”

Cliven Bundy, who became a hero to some rightwing activists in the west and has been in jail for nearly two years, emerged from court on Monday wearing a cowboy hat, telling reporters: “I’m feeling pretty good … I’m not used to being free. I’ve been a political prisoner.”

Angie said she was grateful to hear the judge Gloria Navarro reprimand prosecutors.

“Her words today gave me some hope in the justice system,” she said, adding, “We are so excited to get grandpa home and get our family back together.”