AURORA, Ill. – Gary Martin, the gunman who killed five people and wounded six in a shooting rampage last week, slipped through a background check process to buy the Smith & Wesson he used in the attack – even though the law prohibited him as a felon from owning a gun.

The system failed again days later, when Illinois State Police figured out he had a conviction in 1995 in Mississippi for aggravated battery – the felony that should have prevented him from getting a state firearms license.

Martin opened fire Friday at the Harry Pratt Co. plant in Aurora, where he had worked for 15 years. Authorities said Martin, 45, had just been told he was fired.

Terrified co-workers called police. Responding officers found themselves in a gunbattle. Martin shot and wounded five officers before he was killed.

Illinois State Police records show Martin was sent a letter April 15, 2014, telling him he was required to relinquish his state firearms license. Police gave Martin 48 hours to transfer his firearms to a licensed gun owner or give them up to police.

If he saw the letter, he ignored it.

He would hardly have been alone.

Fewer than half of Illinois gun owners whose licenses are revoked follow through with the requirement to show authorities that they no longer own firearms, according to state police data.

State police sent more than 10,800 revocation letters to Illinois residents last year. “In most instances,” the agency said in a statement, the gun owners failed to vouch that they no longer possessed a firearm.

Cook County Sheriff Tom Dart launched a gun suppression team in 2013 that tracks down gun owners whose licenses have been revoked.

“There are easily thousands and thousands of guns in people’s houses right now who have had their rights revoked,” he said. “When you are trying to get your arms around the magnitude of this problem – good luck. The system is so perverted.”

Apology:Aurora gunman’s family: ‘We deeply apologize’ for killings

The victims:Factory shooting rampage victims include HR manager, college intern and forklift operator

Departing message:Aurora shooting victim Josh Pinkard texted love to his wife as he lay dying

More:Who was Gary Martin? Alleged Illinois gunman seemed fine hours before killing co-workers

Illinois has some of the strictest gun laws in the nation. All gun owners are required to have a license. State law requires gun sellers, whether licensed dealers or at a gun show, to verify with Illinois State Police that the buyer's license is valid.

As part of the check, the agency performs an automated search of criminal and mental health databases to check for circumstances that would disqualify a potential buyer.

Some fall through the cracks.

State police acknowledged Martin shouldn’t have been granted a license in January 2014. The agency said the Aurora Police Department should have been informed through a statewide police database that his license had been revoked.

Martin managed to get through the background check process without his conviction in Mississippi surfacing.

Asked on his application whether he'd ever been convicted, Martin answered no, state police said.

The search of records conducted by the agency firearms licensing staff produced only his Illinois criminal history information, which revealed nothing that would disqualify him, state police said.

His application was approved, and he was issued his license.

Martin bought the Smith & Wesson in March 2014. Ten days later, he applied for a concealed carry permit.

He chose to submit fingerprints, which cuts the maximum processing time for an application from 120 days to 90 days.

The fingerprints helped surface his conviction in Mississippi, state police said. They sent Martin the letter informing him his license had been revoked.

The agency was supposed to notify police in Aurora, where Martin lived, of the revocation.

Kane County State’s Attorney Joseph McMahon told reporters Tuesday that his office was conducting an investigation of the shooting. The probe, he said, would include a review of where the revocation notices were sent by Illinois State Police.

Sgt. Bill Rowley, an Aurora police spokesman, said Tuesday that Aurora police have not found any record of receiving a revocation notice about Martin from State Police. He noted that State Police have also yet to find record of sending a notice to Aurora police.

“It doesn’t mean we didn’t receive one, we just don’t have any record of that,” Rowley said.

If police had known that Martin failed to comply with the revocation letter, they could have petitioned a county judge to issue a search warrant and attempted to retrieve the weapon.

State law doesn’t require departments to seek warrants in such circumstances.

“This is primarily a resourcing problem,” said Kyleanne Hunter, vice president of programs at the Brady Campaign to Prevent Gun Violence. “Unfortunately, we see this too often with things to do with enforcement of firearms law. In Illinois, they have a process, but they don’t have the resources to implement it.”

Illinois lawmakers attempted to bolster regulations that ensure that gun owners whose licenses are revoked comply with laws.

State Rep. Kathleen Willis, a Democrat who represents a district west of Chicago, introduced legislation in 2016 that would have required police to seek warrants to retrieve weapons.

The legislation failed, in part because many departments don’t have the personnel to track down unlicensed gun owners.

Willis said the attack in Aurora should force lawmakers and law enforcement to reconsider the issue.

“Maybe this moment will make some consider that this is a burden worth taking,” she said. “It is a heavy lift to take. But we have laws in place that need to be enforced.

"It doesn’t do us any good to tighten up our (gun) laws if we’re not following all the way through to make sure they’re enforced.”