The warning signs were there: The gunman who walked into his former workplace in Aurora, Illinois, on Friday afternoon and opened fire on workers and police had a long history of violence leading up to the attack.

The gunman, 45-year-old Gary Martin, had at least six prior arrests on his record in Aurora, Police Chief Kristen Ziman said Saturday, “including arrests for traffic and domestic violence-related issues,” plus an out-of-state felony conviction. He should never have had a gun in his possession, yet he was still able to go into a shooting rampage at the Henry Pratt Company warehouse on Friday, killing five workers and injuring another. At least five police officers were also wounded in a tense gunfight that ultimately ended with Martin being shot dead.

Police have now released the identities of those killed — many were longtime employees at the company while one was just a student at Northern Illinois University. Their names are Clayton Parks, a human resources manager; Russell Beyer, a mold operator; Vicente Juarez, a stock room attendant and forklift operator; Josh Pinkard, a plant manager; and Trevor Wehner, a human resources intern.

Martin’s name, however, will be added to the long list of high-profile shooters with records of domestic abuse. The local NBC affiliate found that a woman filed two separate orders of protection against him. Martin was arrested for violating one of those in 2008; the other was filed in 2013 with allegations of stalking.

Vox’s German Lopez has kept a tally of high-profile shooters with records of domestic violence, and the list keeps getting longer each year:

Several perpetrators of previous mass shootings were accused or convicted of domestic violence in the past: Omar Mateen, who carried out the Pulse nightclub shooting in Orlando, Florida, in 2016; Robert Lewis Dear, the alleged 2015 Planned Parenthood shooter; John Houser, who killed two and injured nine in a movie theater in Lafayette, Louisiana, in 2014; and James Huberty, who killed 21 people at a California McDonald’s in 1984. This all points to a disturbing fact: There is a very real connection between past domestic violence and a propensity to future violence, including mass shootings. Policymakers know this, but the steps that they’ve taken to actually do something about it have so far fallen far short of what’s necessary.

And as this latest case underscores, the many loopholes and the ready access to guns mean that even if the warning signs were bright and apparent, they’re still often not enough to prevent future violence.

The shooter was supposed to surrender his gun. But he never did.

The Aurora shooting is a case study of how cracks in the system allow guns to get into the hands of people who are legally barred from owning a firearm.

Martin, for example, should never have been able to own a gun, police said Saturday. Not only did he have the two domestic violence-related charges, but he also had a 1995 felony conviction in Mississippi for aggravated assault, which barred him from ownership rights. Still, he applied for a firearms owner ID card in Illinois in January 2014, authorities said. After a waiting period and passing a background check, he was able to get his hands on a gun months later.

That background check did not include fingerprinting, Chief Ziman said Saturday. But when Martin applied for a conceal-carry permit, Illinois State Police rejected his application and demanded that he voluntarily surrender his firearm. Martin never did, and police never confiscated it from him.

The gun that Martin was supposed to surrender was the same firearm used in Friday’s deadly attack, police said. And this isn’t an uncommon occurrence — federal laws don’t outline exactly how police should approach confiscating guns from people who should never have them, particularly in cases involving domestic violence, leaving wide gaps in enforcement that varies from state to state. And seizures can often be dangerous, even deadly, for both the gun owner and police officers — assuming local police departments even have the resources necessary to adequately enforce relinquishment laws.

Getting guns off the streets would likely lead to less deadly violence, though. The empirical research seems clear: Where there are more guns and more access to guns, there are more gun deaths.

So many gun deaths, in fact, that now any mention of an “Aurora shooting” must clarify which deadly rampage is being referenced.