A Twin Cities man has admitted to buying gun parts from an undercover FBI informant allegedly in preparation for the mass killing of police.

River W. Smith, 21, of Savage, pleaded guilty Monday in U.S. District Court in Minneapolis to illegal possession of a machine gun in connection with allegations that he bought three inert grenades and three auto sear devices that could convert pistols into fully automatic weapons.

As part of the plea filing, the prosecution has said it intends to have dismissed a charge of attempting to receive or possess unregistered destructive devices.

Smith remains in federal custody in the Sherburne County jail. His sentencing has yet to be scheduled.

Prosecutors have linked Smith to a desire to join Nazi paramilitary groups and threats against law enforcement and the LGBTQ community.

According to court documents:

Smith's peaceful arrest occurred in Savage in December, when he was wearing soft armor and possessed a loaded Glock handgun with a bullet in the chamber and additional magazines. Afterward, agents recovered from his vehicle an AR-style rifle, thousands of rounds of ammunition in magazines, body armor, ballistic helmets with goggles and plates, edged weapons for fighting in close quarters, targets and a battle belt.

When agents searched his home that same day, they found firearms and a "Black Sun" flag near Smith's bedroom that prosecutors say is affiliated with neo-Nazi groups.

Smith first landed on law enforcement's radar at age 17 in 2019, when he discharged an AK-47 in the home he shared with his grandparents in Savage. His grandmother was struck in the hand with debris or fragmentation, according to court records.

Police found several handguns, a rifle, shotgun, magazines, tactical equipment and ammunition during a search of the home. And law enforcement turned up on his electronic devices searches relating to Hitler and Nazis, files related to bomb-making and videos of gay people being killed.

The FBI began tracking Smith after two people reached out in September 2022 with concerns about his behavior at a shooting range, where he would fire off large volumes of ammunition around barriers while wearing body armor and lying on the ground.

The FBI collected texts between Smith and two informants late last year leading up to his arrest. During that time, he described preparations to fight and die in gun battles with police. He also discussed how he wanted to join a neo-Nazi paramilitary group but was deterred when he read reports of its dismantling by law enforcement. And when asked about the shooter behind a deadly attack on a Colorado Springs LGBTQ night club, Smith wrote: "I think the guy's a hero."

Smith's attorney, Jordan Kushner, hinted that the FBI set up Smith, and that the young man was not out to hurt anyone.

"Mr. Smith was legally at the fire range. The FBI informant acted like a fellow shooter, showed off his own switch, which prompted Mr. Smith to express interest in auto sears," Kushner said. "He pleaded guilty, taking responsibility for his actions. The government has made a huge deal about problematic chatter with the informant and on the internet.

"However, Mr. Smith has never harmed anyone in his life, and there is no evidence of any specific plan to do so."

Staff writer Stephen Montemayor contributed to this report.