(CNN) A federal judge on Monday dismissed a case against rancher Cliven Bundy that stemmed from an armed standoff with federal authorities in Nevada four years ago, according to court papers.

Bundy and several others -- including his sons, Ryan and Ammon Bundy -- were indicted by a federal grand jury in 2016 after the showdown two years earlier against federal land managers on the open range where Bundy's cattle grazed and fed.

Cliven Bundy would not pay grazing fees, arguing the land belongs to the state and not the US government.

In December, US District Judge Gloria Navarro declared a mistrial in the case against the Bundys and self-styled Montana militia leader Ryan Payne, CNN affiliate KLAS reported. Navarro said then a fair trial was impossible because prosecutors failed to hand over evidence that could have helped the defense, KLAS reported.

Navarro dismissed the case against the Bundys and Payne in a hearing on Monday, according to court papers.

Bundy was released Monday, his attorney Bret Whipple told CNN.

"Today was the hearing to determine if the mistrial of the court was with prejudice or without prejudice, and Judge Gloria Navarro dismissed the case with prejudice, meaning that the US Attorney's Office could not bring the case against Cliven Bundy back," Whipple said Thursday.

Navarro had released Cliven Bundy in November during the trial but he chose to stay in prison, saying he didn't want to violate the principle "that other people are still in custody and he would be free," according to Whipple.

"It was important for [Cliven] to go home to his family but it was important to him to go home as a free man, with no contingencies, no conditions," Whipple said.

The federal Bureau of Land Management and local authorities backed down in the face off, halted the roundup of Bundy's cattle and returned about 300 head to avoid any violence.

Authorities later accused Bundy of conspiracy to commit an offense against the United States, assault on a federal law officer by use of a deadly and dangerous weapon, interference with commerce by extortion and obstruction of justice.

Cliven Bundy was the leader of the movement to extort the federal government into returning his cattle, the indictment said.

"The defendants recruited, organized, and led hundreds of other followers in using armed force against law enforcement officers in order to thwart the seizure and removal of Cliven Bundy's cattle from federal public lands," the indictment said.

Bundy faced life in prison if convicted.

JUST WATCHED The rise and fall of Cliven Bundy Replay More Videos ... MUST WATCH The rise and fall of Cliven Bundy 05:28

In 2016, Ryan and Ammon Bundy were among those who took part in a 41-day occupation of the Malheur National Wildlife Refuge in Oregon after gathering outside for a demonstration to support two ranchers who were convicted of arson, and in defiance of federal land policies.

One man was killed during an attempted traffic stop weeks into the occupation of a vacant building on the refuge. Police said he was reaching for a gun; prosecutors said the shooting was justified. The standoff ended after the last holdouts surrendered to authorities.

Before the final surrender, federal agents arrested the elder Bundy, who did not take part in the 2016 standoff.

In October, the younger Bundys and others were found not guilty of firearms charges and conspiracy to impede federal workers in the wildlife refuge standoff.

The US Attorney's Office had not responded to CNN's calls for comment on Monday.