Image copyright EPA Image caption The man said he did not expect people to panic despite being heavily armed

A man who sparked panic by walking into a Walmart with a rifle and body armour told police he was testing his right to bear arms in public.

Dmitriy Andreychenko entered the shop heavily armed, days after a mass shooting at another of Walmart's stores.

"I wanted to know if that Walmart honoured the second amendment," the 20-year-old told police after his arrest.

Prosecutors have charged him with making a terrorist threat.

If found guilty, the charge could result in a four-year prison sentence and a fine of $10,000 (£8,300), Greene County prosecutor Dan Patterson said in a statement.

On 8 August, Mr Andreychenko entered the store "armed with an AR style rifle slung across his chest", police said, wearing a ballistic vest and recording himself. Both the rifle and a handgun he carried were loaded.

He told police he did not expect the reaction his walk generated.

"This is Missouri, I understand if we were somewhere else like New York or California, people would freak out," he said, according to police filings.

Days before, 20 people had been killed in a Walmart in El Paso by a gunman carrying an automatic rifle.

Media playback is unsupported on your device Media caption Roman's friend died in the attack: 'I wish the killer had known the real El Paso'

The police statement also revealed that his wife, Angelice, had told him "it was not a smart idea".

"She told him that people were going to take this seriously due to recent events... she told him he was just an immature boy," it said.

His sister Anastasia also told police he had asked her to record video of what he called his "social experiment".

"She told him that it was a bad idea and that she did not want to do that," it said.

Mr Andreychenko told police he only intended to buy some grocery bags and check if anyone tried to stop him.

Image copyright Reuters Image caption Mr Andreychenko surrendered to police without incident

The store manager "believed Andreychenko came to the store to shoot people", the police statement said, and triggered the fire alarm to evacuate customers.

Mr Andreychenko was held at gunpoint by an off-duty fire fighter, who was legally carrying his own weapon, until police arrested him.

Prosecutor Dan Patterson said that while residents of Springfield, Missouri, were allowed to carry weapons, "that right does not allow an individual to act in a reckless and criminal manner endangering other citizens."

The terrorist threat charge covers an act which "recklessly disregards the risk of causing the evacuation" of a building, or "knowingly causes a false belief or fear... that a condition exists involving danger to life."

Mr Andreychenko is being held on a $10,000 bond, and will not be allowed to possess a firearm if he does make bail.