A heavily armed man who frightened shoppers and employees at a Walmart in Missouri told the police he was testing his Second Amendment rights when he recorded himself entering the store, according to a prosecutor, who charged him on Friday with making a terrorist threat.

The man, Dmitriy N. Andreychenko, 20, of Springfield, Mo., was carrying a tactical rifle slung across his chest, a handgun and 100 rounds of ammunition on Thursday when he caused a panic at the store, the police said.

Pictures taken by a witness showed that Mr. Andreychenko was wearing a bulletproof vest.

“This is Missouri, I understand if we were somewhere else like New York or California, people would freak out,” Mr. Andreychenko told a police officer, according to an arrest report.

He was taken into custody without incident after another shopper held him at gunpoint, the police said. It was not immediately clear if Mr. Andreychenko, who was being held at the Greene County Jail with bail set at $10,000, had a lawyer.