By Julie Bosman

New York Times News Service

AURORA, Ill. — An angry worker who stormed through a suburban Chicago factory shooting his co-workers was barred from having the handgun he was carrying, authorities said Saturday.

Gary Martin, 45, who died in a shootout with police after a rampage Friday that left five workers dead and at least six people wounded, had his state weapons permit revoked years ago because of a felony assault conviction, police in Aurora, Illinois, said. They said, Martin’s gun — a .40-caliber Smith & Wesson handgun with a laser sight — was never taken away.

“Some disgruntled person walked in and had access to a firearm that he shouldn’t have had access to,” said Kristen Ziman, chief of police in Aurora, where the shooting took place as Martin was being fired.

Ziman said the police were trying to determine why Martin had a gun, despite having his permit revoked five years ago.

According to Illinois gun law, a person must be granted a Firearm Owners Identification card, or FOID, to possess a firearm. At least 2 million people in the state have the cards.

Under the law, the process of removing firearms from people whose cards have been revoked is weak, making it easy for some to keep their weapons with little threat of enforcement or penalty.

That appears to have been the case with Martin, who police said received a card in January 2014. That March, he applied for a concealed-carry permit, and a background check revealed that he had a felony conviction for aggravated assault in Mississippi from 1995. With that, the Illinois State Police revoked Martin’s card and mailed him a letter ordering him to relinquish his firearm and card within 48 hours.

The statute allows law enforcement agencies to petition the courts to seize weapons if they aren’t turned in, but in many instances, the remaining weapons go unchecked. Experts said that the state rules — without a mandatory enforcement requirement — leave a gaping loophole for those who choose not to give up their guns.