Chicago has heralded much-welcome reductions in gun violence this year, but the city is still regularly convulsed by shootings, with some 50 people injured or killed by gunfire in the first week of May alone. Just how easy it is for Chicago’s shooters to obtain their weapons came into sharper relief this month, thanks to innovative new research.

The study shows that a few degrees of separation stand in the way of criminals and someone who could supply them with a gun. Its findings could help law enforcement and anti-violence groups direct their resources more efficiently as they work to interrupt the flow and use of illegal firearms.

Published in the Journal of Urban Health, the research opens a window into Chicago’s illicit gun trade and highlights the importance of gangs and social connections in accessing firearms. Among the researchers’ findings is that criminals who had been arrested were on average between two and three “handshakes” away from someone caught with an illegal gun.  Belonging to a gang puts guns within even easier reach.

“It’s the equivalent of me asking Brian for a gun and Brian saying, ‘I don’t have one, but I got a guy,’” Andrew Papachristos, a sociology professor at Northwestern University and one of the study’s authors, told The Trace. “So it’s not immediate, but it’s pretty darn close.”

Previous research suggests that Chicago’s illegal gun market consists of a relatively small number of buyers and sellers. As a result, the new study argues, connections play a huge role. Gangs may make the process of acquiring illegal guns even easier by stockpiling firearms for leaders to distribute or loan out, and by facilitating introductions to brokers and traffickers. The study found that gang membership reduced the distance to an illegal firearm by 27 percent.

Papachristos conducted the study along with Anthony Braga, a criminologist from Northeastern University, and Elizabeth Roberto, a sociologist from Rice University.

To conduct their research, the team pored over hundreds of thousands of police records to conduct what is known as a network analysis. Using Chicago Police Department data, the team identified “co-offenders” — individuals who had been arrested together — and tagged those identified by the CPD as gang members. People arrested with an illegal gun were also tagged. Then the team mapped out the associations between all the parties, producing a network of more than 123,000 directly or indirectly connected offenders. Using that network map, researchers calculated how close an offender in the network was to someone known to have possessed an illegal firearm.

Law enforcement officials and anti-violence workers could use similar mapping techniques to target the suppliers of illegal guns and get those weapons off the street, Papachristos said.

“If part of the network has a ton of guns, that might be where you want to send your specialists, to get people to put them down, turn them in, or at the very least, not use them,” he said. “We need people who deal with the impacts of gun violence to use these maps to direct those efforts.”

Chicago police have long acknowledged the importance of cracking down on illegal guns, boasting that they seize an average of 7,000 firearms each year. But officials complain that their efforts are consistently overwhelmed  by traffickers who exploit weaker gun laws in other states and elsewhere in Illinois  to obtain firearms that they then ferry into the city. A report released by the city in October showed that more than half — 60 percent — of guns recovered by police between 2013 and 2016 were originally purchased in another state.

Researchers also looked at which offenders in the network had been victims of gun violence. They found that the closer gang members were to someone with an illegal firearm, the likelier it was that they had been shot themselves, underscoring how proximity to guns through social connections can put people at greater risk of death and injury, even if they do not possess weapons themselves.

“These guns are in these cars, in these houses, with these individuals in their hands, and even if people don’t know it, their risk could be elevated,” Papachristos said. “Just because you don’t see it, doesn’t mean it’s not going to kill you.”