When Donald Trump talks about the Second Amendment on the campaign trail, he often mentions Chicago as evidence of the futility of gun control. The city, with its high crime rate, is a favorite example of supporters of gun rights and an important talking point in the Republican presidential nominee's final pitch to conservative voters.

“In Chicago, which has the toughest gun laws in the United States — probably, you could say, by far — they have more gun violence than any other city,” Trump said in the final presidential debate last week. “We have the toughest laws, and you have tremendous gun violence.”

It is true that Chicago has more homicides than any other city in the United States, although that is partly a result of Chicago's size. Relative to its population, Baltimore had about three times as many killings as Chicago had last year.

Compared with other major cities, Chicago's laws on guns are not especially restrictive. While Chicago had some strict ordinances in the past, many are no longer in force — notably the ban on handguns, which the U.S. Supreme Court struck down in 2010. Residents are allowed to carry concealed firearms, and while assault weapons are banned, they are also illegal in New York and Los Angeles, which have much lower homicide rates.

Trump, however, did not mention a third factor that law enforcement officials and crime experts say is important in explaining Chicago's violence. Police department data suggest that there may be substantially more guns in Chicago than in other cities. The presence of these weapons could make ordinary disputes more violent and more lethal.

A firearm can turn a disagreement or an argument into something much more dangerous, converting what might have otherwise been a fistfight into a killing. “All the gun does is make things much more likely to end up terribly,” said David Hemenway, an expert on public health and firearms at Harvard University. Hemenway was one of the authors of a state-by-state study that found that the prevalence of firearms is closely associated with the number of deaths involving guns: The more weapons, the more people are killed.

Other studies have shown that homicide is more common in households where guns are present and in cities and developed nations where more residents own guns.

Former Chicago police superintendent Garry McCarthy, who left the department last year, was a forceful advocate for stricter rules on guns. He oversaw a report detailing how guns used to commit crimes in Chicago come from all over the South and the Midwest. Many were initially purchased in states that do not require buyers to obtain a license from police, as Illinois does.

More than 1,200 weapons came from Mississippi, the report found. Some came from as far away as Texas and Florida. According to the report, dealers in other states and elsewhere in Illinois are part of the reason that police in Chicago are seizing guns at such a rapid pace: nearly three firearms per 1,000 residents annually. That is more than six times the rate at which police in New York recover guns, suggesting that far more of Chicago's residents are illegally armed.

Criminal gangs in the city are responsible for importing many of these guns, said Philip Cook, an economist at Duke University who has studied guns in Chicago extensively. Forty-four percent of guns that police seize from members of gangs are from outside the state, according to Cook's most recent calculations.

“Guns are readily available to the most dangerous people in Chicago, namely the gang members,” Cook said. “They know how to circumvent the local regulations and obtain them.”

Cook also noted that gangs in Chicago tend to use older guns. On average, the weapons that police seize from members of gangs were purchased at retail nearly a dozen years earlier.

That gangs can get so many guns secondhand poses a problem for public safety. There are already more guns than people in the United States, so policymakers who want to keep firearms away from dangerous people have to focus not only on regulating dealers but also on enforcing rules on the resale market.

Doing so would mean investigating resale dealers who supply guns from other states to Chicago's black market and prosecuting straw purchasers, or people with clean records who buy guns on behalf of someone involved in crime. Often, straw purchasers are girlfriends or other women who shop for gang members.

It is a tall order for law enforcement agencies already tasked with solving so many of society's problems, Cook said. “The laws and the regulations can only do so much. You really have to invest in enforcing them.”

The available research suggests that the city is violent not because it has gun laws, but because it has guns, and lots of them.