By Steven Dubois Associated Press

PORTLAND, Ore. – A military veteran accused of taking leadership roles in two armed standoffs involving federal authorities pleaded guilty Tuesday in Oregon to a conspiracy charge and is expected to do the same involving charges in Nevada, prosecutors said.

Meanwhile, a federal judge decided to keep brothers Ammon and Ryan Bundy behind bars as they await their September trial in Portland on conspiracy charges.

The brothers have been accused of leading the standoffs at a wildlife refuge in Oregon and their family ranch in Nevada.

At the federal courthouse in Portland, Ryan Payne of Anaconda, Montana, acknowledged that he conspired with others to prevent Interior Department employees from doing their jobs this winter during the occupation of the Malheur National Wildfire Refuge.

In a plea deal that included talks with prosecutors in Nevada, the U.S. attorney’s office in Oregon recommended that Payne’s likely 31/2-year prison sentence run at the same time as the punishment he could receive for his role in a 2014 standoff with federal agents at a Nevada ranch owned by Cliven Bundy, Assistant U.S. Attorney Craig Gabriel said.

In Nevada, the deal calls for Payne to plead guilty to three charges, with one involving the brandishing of a firearm that carries a mandatory minimum sentence of seven years, Gabriel said.

Nevada prosecutors plan to recommend 12 years in prison, and Payne’s defense will push for less, Gabriel said.

Payne, 32, told U.S. District Court Judge Anna J. Brown in Portland that his first adult decision was joining the military, where he took an oath to uphold the Constitution.

Payne said he came to Oregon last year to do that by defending two ranchers he believes were wrongly imprisoned for setting fires.

He and others, including Ammon and Ryan Bundy, occupied the refuge from Jan. 2 until their arrests nearly a month later. A few holdouts continued the armed protest until Feb. 11.

“In pursuing that effort, I have come to understand that folks who work for the government perceived my actions as intimidating and threatening,” Payne said in court.

Payne was arrested during a traffic stop while traveling with Arizona rancher Robert “LaVoy” Finicum and others to a community meeting off the refuge.

Payne complied with officers and left the vehicle. Finicum and the others drove away, and Finicum was fatally shot by authorities at a roadblock.

Gabriel said Payne, the eighth man to plead guilty in the Oregon case, took a leadership role in the occupation, coordinating armed guards and providing tactical training.

He is scheduled to be sentenced Nov. 18 but that date could get pushed back based on developments in Nevada, where authorities say Payne recruited gunmen and led an armed assault on federal officers who attempted to round-up the Bundys’ cattle near Bunkerville.

Ammon and Ryan Bundy are also charged in that case, and would have likely been sent to a Nevada jail if U.S. District Court Judge Robert Jones had not decided Tuesday to keep them in custody at a downtown Portland jail.

Jones previously granted pretrial release to many of the men and women indicted on conspiracy charges in the case. But in a written opinion, Jones said the Bundys are not good candidates for release because the confrontations show they believe they are justified in refusing federal orders and might not appear for trial Sept. 7.

“More dangerously, they may attempt to recruit another standoff or occupation,” he wrote.

The judge also cited what jailhouse deputies described as an effort by Ryan Bundy to escape. A search of his cell on April 8 yielded a rope made with multiple sheets tied together, authorities said.

“I reject his excuse that he was practicing braiding,” Jones wrote.

Copyright 2016 Associated Press. All rights reserved. This material may not be published, broadcast, rewritten, or redistributed.