Last year, the mayor of Baltimore reacted to riots over the death of Freddie Gray by placing a 10 pm curfew on the city. The idea was simple: Fewer people in the streets, fewer chances of violence breaking out.

But maybe that wasn't a good idea. According to a new working paper by economists Jillian Carr and Jennifer Doleac, curfews can increase levels of violence. Carr and Doleac looked at the effect of the juvenile curfew in Washington, DC, on gun violence, and found that it led to about 50 percent more incidents of gunfire during the late hours.

How? Although in theory the curfew should reduce violent crime by keeping would-be offenders and victims indoors, Carr and Doleac suggest that "removing bystanders and witnesses from the streets could reduce their deterrent effect on street crime."

This actually isn't a new theory in criminal justice. Research has shown that merely putting police on the streets can reduce crime by deterring criminal activity — after all, if criminals know a cop is around, they're less likely to act out. A similar deterrent effect could apply with civilians, too.

Carr and Doleac tested the effect of DC's curfew by exploiting a change in the law. In September, the weekday curfew time changes from midnight to 11 pm. Researchers looked at how gun violence changed at 11 pm with a curfew now in place, and compared it with times that weren't impacted by the curfew change, such as 11 pm on weekends and midnight on all days.

"These results suggest that on balance, the deterrent-reducing effect of juvenile curfews outweighs the incapacitation effect," Carr and Doleac wrote.

The study carries some caveats. For one, it analyzes ShotSpotter data, which uses high-tech audio sensors to report gunshots. The researchers argue this is a better way to measure gun violence since traditional reporting, such as 911 calls, would likely be influenced by the curfew itself: If fewer people are out in the street, they're less likely to report crime — and, indeed, reports of gun violence drop with the curfew change. But the ShotSpotter technology is relatively new, so it may have flaws not controlled for in the study. (Still, the ShotSpotter system is generally considered quite accurate.)

The study also doesn't look at the number of victims but instead the total count of gunshots. Since the curfew presumably means that fewer people are in the street, it's possible that while there are more gunshots, there are actually fewer victims — or, at the very least, fewer bystanders that can be hit by stray gunshots.

Finally, the paper doesn't measure the curfew's effects on other types of crime. It's possible that even if the curfew increases gun violence, it might reduce incidents of theft and other lower-level offenses.

Still, the research is one of the best looks at the effect of curfews on gun violence yet. At the very least, it suggests that officials may want to rethink one of their traditional methods of combating violence.