A man who wore body armor and carried a loaded weapon into a Walmart in Missouri over the summer to test the Second Amendment pleaded guilty Friday to making a false report.

Dmitriy Andreychenko, 21, pleaded guilty to the misdemeanor charge after originally being charged with making a terrorist threat.

Under an agreement with prosecutors, he received a 180-day suspended sentence and two years' probation. He also must receive firearm training, Greene County Prosecuting Attorney Dan Patterson said in a news release. The terrorist threat charge carried a sentence of up to four years in prison.

MISSOURI MAN WEARING 'IT'S NOT A CRIME UNLESS YOU GET CAUGHT' T-SHIRT WANTED FOR ROBBING LAUNDROMAT

Dmitriy Andreychenko, who caused a panic at a Missouri Walmart when he walked inside wearing body armor and carrying loaded weapons in what he described as an effort to test his Second Amendment rights.  (Greene County Sheriff via AP) .

The Springfield resident caused panic inside the big-box store on Aug. 8 when he filmed himself entering while armored and armed. A store manager pulled a fire alarm, causing shoppers to flee.

The incident came days after a gunman killed 22 people inside a Walmart in El Paso, Texas, and another killed nine people hours later in Dayton, Ohio.

"I wanted to know if Walmart honored the Second Amendment," Andreychenko said, according to a probable cause statement.

Patterson said Andreychenko was conducting a "social experiment" and didn't intend to shoot anyone.

He said Andreychenko researched both shootings. The day before, he posted a photograph to Snapchat of a family member wearing his body armor looking down the sights of a rifle with the caption, "Watch out Walmart," Patterson said.

CLICK HERE TO GET THE FOX NEWS APP

Andreychenko told local media outlets his actions were "foolish" but that he didn't regret it. His attorney, Dee Wampler, admitted his client's actions were ill-timed.

The Associated Press contributed to this report.