Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A man who has been described as a commander of an armed group accused of detaining migrants in New Mexico has pleaded guilty to a federal weapons charge, prosecutors said.

Larry Mitchell Hopkins, 70, pleaded guilty last week in federal court in Albuquerque to being a felon in possession of a firearm and could face up to 10 years in prison, the U.S. Attorney's Office for New Mexico said Thursday.

Hopkins was arrested in April after Gov. Michelle Lujan Grisham, a Democrat, demanded that members of a militia group, some of whom were armed, stop detaining migrants at the New Mexico-Mexico border.

Hopkins' attorney, Kelly O'Connell, told Reuters last week that Hopkins agreed to plead guilty to the firearms charge because he "felt like he had made his point" to the U.S. government and because the charge would be easy to prove.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Hopkins, whom a federal grand jury indicted on April 24, admitted in his plea agreement to having possessed nine pistols, rifles and shotguns on Nov. 28, 2017, in San Juan County, the U.S. attorney's office said.

Larry Mitchell Hopkins. Dona Ana County Detention Center

He is barred from having guns because of previous convictions in Michigan, Oregon and South Dakota, the U.S. attorney's office said in the statement. The offenses included illegal weapon possession and impersonating a peace officer, the office said.

At the time of Hopkins' arrest, Jim Benvie, a spokesman for United Constitutional Patriots, said Hopkins was their "national commander."

The group had been accused by the American Civil Liberties Union of New Mexico of capturing nearly 300 people near Sunland Park, a city about 10 miles from El Paso, Texas.

Download the NBC News app for breaking news

The state attorney general, Hector Balderas, said at the time Hopkins was arrested that "the rule of law should be in the hands of trained law enforcement officials, not armed vigilantes."

U.S. Customs and Border Protection said at the time that it "does not endorse private groups or organizations taking enforcement matters into their own hands."

Hopkins is in custody pending his sentencing, federal prosecutors said. Online court records did not list a sentencing date.

He also faces a possible fine of no more than $250,000 and a mandatory term of supervised release of at least three years.

While the charge carries up to 10 years in prison, prosecutors said in the plea agreement that as long as Hopkins continues to accept responsibility, they will recommend reductions under sentencing guidelines.