AURORA, Ill. — An initial background check failed to detect a felony conviction that should have barred the man who killed five co-workers and wounded six others at a suburban Chicago manufacturing plant from buying the gun.

Months later, a second background check of Gary Martin found his 1995 aggravated assault conviction in Mississippi involving the stabbing of an ex-girlfriend. But it prompted only a letter saying his gun permit had been revoked and ordering him to turn over his firearm to police – raising questions about the state’s enforcement to ensure those who lose their permits also turn over their weapons.

More than 1,500 people braved snow and freezing drizzle to attend a prayer vigil Sunday for the five victims, who included a university student on his first day as an intern and a longtime plant manager.

The Rev. Dan Haas told those who gathered outside the Henry Pratt Co. in Aurora, about 40 miles west of Chicago, that Friday’s “senseless killings” had left the victims’ families brokenhearted and in mourning.

“All of these were relatively young people – many of them were very young people. We will never know their gifts and talents. Their lives were snuffed out way too short,” he said.

Martin, 45, was killed in a shootout with officers Friday, ending his deadly rampage at the plant. His state gun license permit was revoked in 2014, Aurora Police Chief Kristen Ziman said.

But he never gave up the .40-caliber Smith & Wesson handgun he used in the attack. Investigators are still trying to determine what exactly law enforcement agencies did after that letter was sent, Ziman said.

Illinois lawmakers who support more gun control measures said Martin was able to keep the gun because of a flaw in the 1968 law that requires residents to get a Firearm Owner’s Identification card, or FOID card, to purchase firearms or ammunition. They must pass a background check, but the law does not mandate that police ensure weapons have been removed if a red flag is raised later.

Legislation was introduced in 2016 to require police to go to the homes of gun owners who have their FOID cards revoked and search for the weapons, but it failed over concerns it would overtax police departments, said Democratic Rep. Kathleen Willis. She wants to see a similar measure introduced again.

“Let’s use some common sense. If you have someone with a felony, obviously they are not the best law-abiding citizens who are going to follow through when they get the letter and go, ‘oh yeah, here’s my gun, no problem,”‘ Willis said. “We have to have oversight. That’s the biggest flaw in the whole system. We’re asking people, who already have done something wrong, to do something right.”

Last year, Illinois joined other states like California in passing a law that allows a family member to petition to have a gun removed from a home and a person’s permit revoked if they believe they might use it to harm themselves or others.

Lawmakers are also working to add teeth to restrictions on the transfers of gun ownership from a person whose permit has been revoked, Willis said. The change follows a 2018 shooting at a Tennessee Waffle House involving a man who had to give his guns to his father after his Illinois FOID card was revoked, but his father later gave them back to him.

Legislators want people who obtain such weapons to sign an affidavit vowing to not return the weapons to the original owner.

Martin was no stranger to police in Aurora, where he had been arrested six times for what Ziman described as “traffic and domestic battery-related issues” and for violating an order of protection.