Editor's note: This story has been updated with comments from Dee Wampler, an attorney for the accused, along with family members.

A Springfield man has been charged with a felony for allegedly walking through a Walmart store with body armor and a loaded rifle.

Dmitriy N. Andreychenko, 20, was charged Friday with making a terrorist threat in the second degree. That's a Class E felony punishable by up to 4 years in prison.

Andreychenko allegedly said he was testing whether Walmart "honored the Second Amendment."

Police say Andreychenko went to the Walmart Neighborhood Market at 3150 W. Republic Road just after 4 p.m. Thursday, donned body armor and walked inside with a loaded "tactical rifle" and another gun.

Panic ensued, and shoppers went scurrying out of the building as Andreychenko allegedly walked around pushing a shopping cart and recording video on his phone.

The store manager pulled the fire alarm, and the building was evacuated.

Andreychenko then walked outside, where he was held at gunpoint by a citizen until officers arrived moments later, according to Lt. Mike Lucas with the Springfield Police Department.

Lucas described the suspect as "pretty stoic" during his initial contact with police. Video from a customer showed Andreychenko slowly walk down a grassy hill outside of the store and surrender.

Greene County Prosecutor Dan Patterson explained in a news release Friday that Missouri's open carry laws don't give citizens the right to act recklessly. He compared it to free speech laws not allowing people to shout "fire" in a crowded theater, causing panic.

Lucas said the Walmart call was initially dispatched as an "active shooter" situation, and those rushing to the scene could not help but think of El Paso, Texas, where a gunman killed 22 people at a Walmart this past weekend.

More than a dozen law enforcement cars responded to the scene in southwest Springfield, which Lucas described as chaotic, with shoppers fleeing and taking cover outside the store.

As Andreychenko was being booked into the Greene County Jail on Thursday evening, Lucas said the suspect was lucky to be alive after walking through the store with two rifles and more than 100 rounds of ammo.

According to a probable cause statement, Andreychenko later told police his intention was to buy grocery bags at the store, and he was filming himself in case anyone told him to leave the store.

Andreychenko allegedly said he brought the weapons to protect himself because of the recent mass shootings in Texas and Ohio, and he was surprised by the reaction of other shoppers.

"This is Missouri," the statement quotes Andreychenko as saying. "I understand if we were somewhere else like New York or California, people would freak out."

The statement says before Andreychenko went to the Walmart, he asked his sister if she would film him doing a "social experiment," but she told Andreychenko it was a bad idea in light of the recent shooting in Texas.

Andreychenko's wife allegedly told police Andreychenko was an immature boy.

While no injuries were reported at the Walmart, a Battlefield Police Department officer rushing to the scene was involved in a crash that sent him to the hospital and left a 74-year-old woman with serious injuries.

As news of the arrest spread, many readers took to social media to question whether walking through a store with a loaded rifle was a crime in Missouri, which is a constitutional carry state.

Patterson, the prosecutor, evidently felt Andreychenko's actions rose to the level of criminal behavior. It could ultimately be up to a jury to determine whether Andreychenko should be convicted. Meanwhile, he is being held in the Greene County Jail.

Prosecutors explained Friday that making a terrorist threat in the second degree constitutes recklessly disregarding the risk of causing the evacuation of any portion of a building and knowingly communicating an express or implied threat to cause an incident or condition involving danger to life.

Andreychenko is being represented by defense attorneys Dee Wampler and Joseph Passanise.

“It is a serious charge,” Wampler said in a press conference late Friday afternoon. “Our client takes it seriously.”

Story continues below

He said Andreychenko has lived in the United States for 18 years and moved to Springfield from Oregon. Family members present at the conference said Andreychenko is a legal permanent resident. They said he was born in Ukraine and has had little contact with that country.

Andreychenko has no criminal record, with the possible exception of a speeding ticket, and no history of violence, Wampler said.

Wampler said that based on the evidence he has seen, he does not believe Andreychenko verbally threatened anyone while inside the Walmart Thursday.

Asked whether the off-duty firefighter who detained Andreychenko might be subject to any prosecution, Wampler said he did not think so. He called the firefighter “a good citizen” making what the man thought was a “citizen’s arrest.”

Andreychenko's wife, Angie Andreychenko, said that her husband had discussed his plan to go to Walmart with her in advance. "He was pretty persistent," she said at the press conference.

One of Andreychenko's sisters, Anastasia Andreychenko, joined her relatives at the press conference in saying that her brother had no intention of hurting other people at the Walmart store.

"I guess he didn't evaluate the situation to the full extent," she said.

Andreychenko's older sister, Irina Usik, said, "He's very blessed that he wasn't shot by anyone else."

As the all-clear was announced and shoppers were let back inside the Walmart on Thursday afternoon, authorities surrounded Andreychenko's car with crime scene tape in the parking lot.

A fire marshal was called to the scene to check for explosives, but evidently, none were found.

Walmart said through a spokesperson that it is working with authorities in Springfield as they investigate the incident.

"This was a reckless act designed to scare people, disrupt our business and it put our associates and customers at risk," said LeMia Jenkins, Walmart's director of national media relations, in a statement. "We applaud the quick actions of our associates to evacuate customers from our store, and we’re thankful no one was injured.

"This person is no longer welcome in our stores. We are working with the authorities however we can and we appreciate their quick response that prevented this situation from escalating further."

Lt. Lucas, with Springfield police, said Thursday that police would be reviewing surveillance video from Walmart and the suspect's own recording as they investigate the case.

Reporter Gregory J. Holman contributed to this story.