KANSAS CITY, Mo. — A southwest Missouri man accused of plotting attacks at a movie theater and Walmart was able to legally buy the guns he allegedly planned to use, despite being forced to undergo a psychiatric evaluation three years ago for stalking a store clerk he said he intended to kill, authorities said.

Blaec Lammers, 20, was arrested last week after his mother told police she feared he was planning an attack. Investigators who questioned him last Thursday say he said he had bought a ticket to the latest “Twilight” movie on its opening weekend and planned to open fire on filmgoers before going to a nearby Walmart to shoot shoppers. He is charged with first-degree assault, making a terroristic threat and armed criminal action, and remained jailed Wednesday on $500,000 bond. The case against Blaec Lammers, 20, of Bolivar, has gun control advocates concerned. Lammers is jailed on $500,000 bond after being charged Friday with first-degree assault, making a terroristic threat and armed criminal action in the “Twilight” plot.

Daniel Vice, a senior attorney for the Brady Center to Prevent Gun Violence, said Lammers’ case reminds him of what happened before the Virginia Tech shooting in 2007. Student Seung-Hui Cho, who fatally shot 32 people before killing himself, was able to buy two guns even though he had been ruled a danger to himself during a court hearing in 2005.

“We’ve seen it before,” Vice said. “We’ve been trying to fix this.”

Lammers’ attorney, DeWayne Franklin Perry, declined to comment about the case. The National Rifle Association didn’t respond to a phone message seeking comment.

Lammers’ mother said this week that her son had undergone inpatient treatment and has shown signs associated with Asperger’s syndrome, borderline personality disorder and other conditions.

“He didn’t ask to be born different,” Tricia Lammers said at a news conference this week at the National Alliance for Mental Illness in Springfield. “He grew up his whole life in (his sister) Kristyn’s shadow. He wanted to be successful and be somebody. Just two weeks ago he asked me — both my kids still call me mommy — he said, ‘Mommy, do you think I’m a failure?’ I said, `No, Blaec, I don’t.’”

Since 1968, federal law has banned certain types of mentally ill people from buying guns, including those who have been deemed a danger to themselves or others, involuntarily committed or judged not guilty by reason of insanity or incompetent to stand trial.

A three-year-old Polk County Sheriff’s Office report said Lammers brought a knife and rubber mask with him to a Walmart store and followed around a clerk for more than two hours after watching the horror film “Halloween” in 2009. The then 17-year-old told authorities he was getting ready to follow the clerk into a storage room with the intention of killing him and then to keep killing “until he was stopped” when he heard his name over the public address system and his dad hollering at him.

He wasn’t charged, but was involuntarily committed for 96 hours for a mental health examination. In Missouri, hospitals, law enforcement officials and private citizens can request a person be held against their will for up to 96 hours if he or she appears to be a threat to themselves or others.

But such an involuntary hold doesn’t necessarily bar someone from purchasing a firearm because the federal law requires that a person be “adjudicated as a mental defective,” said Trista K. Frederick, a special agent and spokeswoman for the Bureau of Alcohol, Tobacco and Firearms office in Kansas City.

Each state has its own system for making that determination and submitting those records to a federal database. Frederick had no details about Missouri’s system, and the Missouri Department of Mental Health didn’t respond to repeated requests for information. Frederick said the ATF looked into Lammers’ case but had no information to show he should have been prohibited from having firearms.

Mick Covington, executive director of the Missouri State Sheriff’s Association, said people don’t lose their gun rights in Missouri simply because of a 96-hour commitment for a mental evaluation.

“The fact that somebody is held for 96 hours, if there’s nothing else besides that, it’s like picking somebody up on a reasonable suspicion arrest and no other charges are filed,” Covington said. “It’s a big difference between being picked up and looked at and picked up and having a medical person say this person is incompetent.”

Polk County prosecutor Ken Ashlock wasn’t the prosecutor in 2009 and said he doesn’t know what happened to Lammers after the 96-hour evaluation ended. A longer mental health commitment would have required the type of court preceding that would have barred Lammers from obtaining a gun. Given that Lammers was able to purchase two firearms last week, Ashlock suspects nothing more happened after the initial evaluation.

Steven Bruce, the sheriff of Polk County, said he’s worried about how the state handles cases involving the mentally ill.

“If you have mental issues, if there has been enough of a concern from a family member or public or whatever to alert us to a condition that they feel that you have and we then 96-hour you, good, bad or otherwise, I think that needs to be a point of record,” Bruce said.

Investigators wrote in the probable cause statement that Lammers bought two assault rifles legally in Bolivar. When they questioned him last Thursday he said he bought tickets to a Sunday “Twilight” screening in Bolivar and planned to shoot people inside. The town of roughly 10,000 people is about 130 miles southeast of Kansas City.

Lammers also said he planned to “just start shooting people at random” at the Walmart store less than a mile away, so if he ran out of bullets, he could “just break the glass where the ammunition is being stored and get some more and keep shooting until police arrived,” investigators wrote.

Investigators said Lammers was “off of his medication,” but his mother said Tuesday that she didn’t think that was the case. A judge has ordered Lammers to undergo another mental health exam.

Bruce, the sheriff, said mental health care is “pretty precarious in the state of Missouri” and because “funds are low” the help people need isn’t always there.

“The biggest problem is people with issues who it takes medication to keep what we would consider a normal balance,” he said. “And when they don’t take those, I don’t know that they necessarily realize how imbalanced they can become.”