President Barack Obama has, despite expectations, been great for the gun industry. "I've been now president for over seven years and gun sales don't seem to have suffered during that time," Obama said at a recent CNN town hall. "They've gone up. I've been very good for gun manufacturers."

That's not a fact that people expected when Obama won elections in 2008 and 2012, but it's been backed by media reports. Most recently, the New York Times reported massive increases in gun purchases throughout Obama's presidency. Why? The Times suggested it was a result of people running out to buy guns after Obama called for new restrictions on firearms — which people wanted to avoid before they went into effect.

Now a study by Emilio Depetris-Chauvin, an economist at the Universidad de los Andes in Bogota, Colombia, backs up the Times's report. The study found that Obama's 2008 election had a permanent effect on the number of US guns in circulation. Moreover, the states with the biggest increases in demand for firearms had larger increases in gun-related crimes.

For gun control advocates, the findings pose a troubling dilemma: Efforts to restrict access to guns may actually lead to more guns in circulation — potentially hindering the purpose of such measures.

Obama's election led to way more gun sales

The study used the federal background check system — the National Instant Criminal Background Check System — to gauge firearm purchases across the country. Although this system does not capture all gun sales, the study concluded that it is the best measure available, and it's credible enough to at least provide a floor for overall sales.

By leveraging this data, Depetris-Chauvin looked at the effect Obama's victory in the 2008 Democratic primaries and general election had on gun purchases. He found that firearm sales significantly rose after Obama's nomination and election.

Why is this the case? Depetris-Chauvin suggested it was a fear of upcoming gun control measures. During the 2008 campaign, Americans were bombarded by ads that suggested Democrats would pass big restrictions on firearms — possibly leading to the full confiscation of people's firearms. (This has been a standard line by the NRA since at least the 1970s: the idea that any gun control laws will lead to a full gun ban.) So many Americans stockpiled guns in order to avoid restrictions that might come in the future.

Still, Depetris-Chauvin didn't completely rule out other explanations related to Obama. It's possible, he wrote, that people bought more guns because Obama's name and race made them think he posed a security threat. Or perhaps people feared that Obama's liberal views would lead to tyrannical policies that would warrant an armed rebellion.

But there's more evidence for the idea that fears of gun control led people to stock up on firearms. The New York Times, for instance, reported that gun sales consistently soared after Obama called for new restrictions on firearms at various points in his presidency. Gregor Aisch and Josh Keller wrote for the Times, "Fear of gun-buying restrictions has been the main driver of spikes in gun sales, far surpassing the effects of mass shootings and terrorist attacks alone, according to an analysis of federal background check data by The New York Times."

"Fear of gun-buying restrictions has been the main driver of spikes in gun sales"

Whatever the cause, Depetris-Chauvin's study concluded that Obama's election had a permanent impact on the number of guns in circulation: Four years after his election, the demand for guns was 30 percent higher in states that had the largest increases in demand immediately following Obama's electoral victory.

The states with the largest increases in demand also had the largest increases in gun-related crimes. "In particular," Depetris-Chauvin wrote, "those states were 20% more likely to experience a shooting event where at least three people were killed."

The findings pose a worrying lesson for gun control advocates, according to Depetris-Chauvin: "[A] gun policy aimed at reducing the number of guns in circulation may have unintended consequences: increasing the demand for guns."

The findings complicate the case for gun control

Fundamentally, the point of gun control measures is to reduce the number of firearms in circulation. Whether this is done over time as access to guns is tightened or quickly as guns are immediately confiscated depends on the policy. But the underlying idea is to cut levels of gun ownership — and therefore gun violence.

The support for these types of policies is that, generally, the research shows more guns mean more gun violence: Whether at the state or country level, places with higher levels of gun ownership tend to have more deadly shootings, including homicides, suicides, domestic violence, and violence against police, after controlling for other factors.

But if the threat of gun control measures spurs more people to purchase firearms, then support for such measures is in some ways self-defeating.

Still, it's likely that gun control measures on net reduce levels of gun ownership and gun crimes. The research shows, for instance, that stronger gun control laws reduced gun homicides and suicides in Connecticut and Missouri, and that homicides and suicides tend to be lower in states with stronger background checks. A New York Times analysis of gun laws also found that the repeal of firearm restrictions led to sustained increases in gun sales and registered guns in Missouri and Washington, DC.

Nonetheless, Depetris-Chauvin's study complicates the case for gun control a bit — providing a potential consequence US lawmakers will likely need to consider in their own pushes for tighter gun laws.