Prosecutions of those who violate straw purchase laws — which make it illegal to buy guns for other people — are up in Pennsylvania, but down in Maryland, according to researchers from the Johns Hopkins Bloomberg School of Public Health.

The study aimed to identify what factors affect the enforcement of comprehensive background check and straw purchase laws.

“We often hear that we don’t need more laws, we just need to enforce the ones we have,” said lead author, Cassandra Crifasi. “And so we wanted to explore that, and see what could we be doing better, or what are we doing well, with regard to enforcement.”

To answer that question, Crifasi and her co-authors compared prosecutions in Maryland and Pennsylvania linked to comprehensive background check and straw purchase laws. They chose the two states because of their proximity, similar demographics, and because both passed straw purchase laws in the mid 1990s.

But in recent years, divergent policies have changed the way Pennsylvania and Maryland approach violations of the laws.

In 2006, Maryland’s highest court ruled that temporary loans of firearms didn’t fall under the “transfers” cited in the law and were therefore exempt from the background check requirement.

“We were concerned that savvy defense attorneys or maybe savvy criminals would say, ‘Well, I didn’t sell the gun to that person. I just loaned it to him or her, so I didn’t need to do a background check,’ ” Crifasi said. “And so we were hypothesizing that that would decrease prosecutions for violating the background check law.”

Meanwhile, Pennsylvania devoted resources to clarifying and spreading information about its straw purchase and comprehensive background check laws. In 2012, it also passed a law requiring a minimum five-year sentence for anyone convicted of multiple straw purchase violations.

The researchers then compared prosecution data from the years 1996 to 2014 in Maryland, and 2006 to 2015 in Pennsylvania. They found that, after the 2006 court case, prosecutions in Maryland fell by roughly half. In Pennsylvania, meanwhile, they rose by a factor of 16 following the state’s 2012 law increasing penalties.

“The main takeaway from our paper is that the language of the law really matters,” Crifasi said. “And the penalties associated with laws can change incentives to move forward with a case. I don’t really want to say get more bang for your buck, but it’s more worth the investment resources than it may be otherwise when the penalties are low.”

Pennsylvania’s attorney general recently announced that the state was cracking down on illegal gun trafficking in Philadelphia — in part, through an enhanced focus on straw purchases. Collaborations between city, state and federal authorities have yielded a string of recent convictions.

In June, a Chester City man was sentenced to five years after buying firearms for a convicted felon at a Philadelphia gun show. In July, the state charged two men from Northeast Philadelphia with the straw purchases of 11 semi-automatic handguns. In August, a Chester City woman received a five-year sentence after buying nine guns for her nephew.

“Prosecutors, like lots of people in lots of positions, have limited resources — they have to choose strategically where they’re going to dedicate those resources,” Crifasi said. “Being able to have stricter penalties for someone who’s violating a law that really does put the public at risk, that could lead to greater prosecution and a decision to invest resources in those cases.”