IOWA CITY, Iowa (AP) — A judge Wednesday ordered the detention of a Colorado firearms enthusiast who raised alarm at an Iowa gun store last week when he said he was surprised people didn't suspect he was the Boulder mass shooter.

Adam Vannoy, 40, attempted to buy guns in Iowa after he was released on bond from a jail in Nebraska, where troopers had seized several firearms and marijuana from his vehicle during a March 14 traffic stop, U.S. Magistrate Stephen Jackson found.

A firearms dealer in Ankeny, Iowa refused to sell Vannoy an AR-15-style semi-automatic rifle and alerted the Bureau of Alcohol, Tobacco, Firearms and Explosives after Vannoy said he was surprised friends hadn’t called to ask whether he was responsible for the shooting in which 10 people were killed at a Boulder grocery store.

After he was unable to secure a firearm, Vannoy purchased “kits that would enable him to assemble firearms,” the judge said in his ruling Wednesday. Video posted by Vannoy to his Instagram account showed that he spent nearly $3,000 buying firearms accessories at Brownells, a retailer in Grinnell, Iowa.

“This continued attempt to obtain weapons, coupled with the behavior described at the hearing, leads to the conclusion that the government has met its burden and detention is appropriate," Jackson wrote after a detention hearing earlier Wednesday.

The judge ordered federal authorities to transfer Vannoy to Nebraska, where he is charged in federal court with possessing a firearm as an unlawful drug user.

The Nebraska State Patrol initially arrested Vannoy on March 14 on Interstate 80 in Lancaster County, after a driver had called police to report he was driving recklessly at about 120 mph.

During a search of his packed truck, troopers seized a handgun from Vannoy’s jacket, a loaded AR-style semi-automatic rifle with an illegal silencer, four other firearms, ammunition, a bulletproof blanket and vest, two brown wigs and an Air Force costume. They also found marijuana.

Vannoy said his truck was packed with all of his belongings since he was abruptly leaving Colorado. Records show he told a Nebraska trooper during the stop that he was leaving Denver because his neighbors didn’t like him, he had a mental breakdown and quit his job. He told the trooper that he would use his time in jail to “think about getting even with people,” a remark the trooper viewed as threatening.

They jailed the Denver man on weapons and drug charges. He was released after posting $5,000 bond on March 17, even though he threatened to kill a guard, exposed his penis to guards and threw feces from his cell into a common area, according to a federal complaint unsealed Friday.

The case comes as Iowa Gov. Kim Reynolds faces pressure to veto a bill passed by the Republican-controlled Legislature that would eliminate the need to obtain permits to purchase handguns from private sellers or carry them in public. People would still have to pass background checks or present permits to purchase weapons at retailers, but critics say the unregulated private sales would allow more unqualified and dangerous people to obtain firearms.