In New Hampshire, the process for buying a gun is easy — easier than getting a driver’s license.

You go to a gun store, you show your ID, and if you pass a background check that looks at your criminal record and some of your mental health history, you can walk out with a firearm. No training required. No registration of the gun. In the great majority of cases, not even a waiting period.

Still sound arduous? Well, there’s a workaround: Private sellers — say, a family member or someone online — can sell you a gun without any background check at all.

Drive a few miles south to Massachusetts, though, and the process is very different. First off, it doesn’t begin at a gun shop; it begins by obtaining a permit to purchase a gun from your local police department — basically, a gun license. Obtaining this permit is a potentially weeks-long process, which requires paperwork, an interview, a background check, and, even if you pass all of that, the police chief has some discretion to deny the license anyway — if he or she, for example, knows something about your past that may not necessarily show up in your criminal record.

Only once you clear that entire process can you go to a gun store. Then, you have to show your license and pass additional background checks. If you do that, you can get your gun, which will have to be registered in a database of all the state’s firearms, the Massachusetts Gun Transactions Portal.

There are also rules for private sellers: Even if your dad gives you a gun, he has to make sure you have a firearm license and that the transfer of the gun is recorded in the state database — or seriously risk legal troubles of his own, since police may notice he’s not in possession of a firearm the database indicates he owns.

It’s a strict system, but one that may offer some answers for America’s big gun problem.

Over the past few months, mass shootings have repeatedly propelled gun violence into the national spotlight. Meanwhile, studies have found that the US leads developed nations in gun deaths, with one recent study in JAMA finding that the US’s civilian gun death rate is nearly four times that of Switzerland, five times that of Canada, 35 times that of the United Kingdom, and 53 times that of Japan.

Yet there’s been little movement, at least at the federal level, to do something about these trends in the US.

But surely, I thought, there’s some place in the US getting this right, which could perhaps show a path forward for the rest of the country. So I asked gun policy researchers and experts about which state is doing the most to prevent gun violence. They pointed not to states like New Hampshire and others that have weak restrictions on firearms, but to Massachusetts, which over time built one of the most comprehensive gun control regimes in the US.

In particular, experts honed in on Massachusetts’s gun licensing system, which treats the ability to own and use guns much like the ability to own and use a car: with license and registration required.

The system, experts said, is one of the major reasons Massachusetts consistently reports the lowest gun death rates in the US. Based on Centers for Disease Control and Prevention data, Massachusetts had 3.6 gun deaths per 100,000 people in 2016. In comparison, New Hampshire’s gun death rate was 9.9 per 100,000 people, and the top three worst states for gun deaths in the country — Alaska, Alabama, and Louisiana, all of which have loose gun laws — each had more than 21 gun deaths per 100,000 people.

As David Hemenway, director of the Harvard Injury Control Research Center, put it, “All other things equal, [places] where there’s strong laws and with few guns do much better than places where there’s weak laws and lots of guns.”

The idea is not to remove the ability to own a gun, which is, for better or worse, a constitutional right in the US. In fact, at least 97 percent of license applications are accepted in the state, according to a 2017 analysis by Jack McDevitt at Northeastern University and Janice Iwama at the University of Massachusetts in Boston.

But Massachusetts’s laws create several hurdles that make it far more difficult for people, particularly those with ill intent, to purchase a firearm.

“The end impact is you decrease gun ownership overall,” Cassandra Crifasi, a researcher (and gun owner) at the Johns Hopkins Center for Gun Policy and Research, told me. “Lots of folks think, ‘Well, it’s probably not worth going through all these hoops to buy firearms, so I’m not going to buy one.’ And then you have fewer firearms around, and less exposure.”

That helps keep Massachusetts’s gun ownership rates among the lowest in the country. The evidence is pretty clear on the benefit here: Where there are more guns, there are more gun deaths. The research, compiled by the Harvard Injury Control Research Center, has found this to be true not just with homicides, but also with suicides (which in recent years were around 60 percent of US gun deaths), domestic violence, and even violence against police.

For the rest of the country, this could make Massachusetts a model — a way to combat a deadly problem with mass shootings and gun violence in general that, among developed nations, is fairly unique to the US.

“I’m just so happy to live in Massachusetts,” Hemenway told me. “There are several reasons, but this is one of them. It’s just a lot safer.”

In Massachusetts, getting a gun takes time

The licensing system is not necessarily the be-all, end-all of gun laws, but it helps exemplify the comprehensive approach that Massachusetts has taken to gun violence.

Under federal law, all that’s required to buy a gun is a background check, which scans for certain felonies, some kinds of domestic abuse, and some documented mental health issues. Waiting periods are rarely applied. And even then, the “gun show loophole” — a name given to the private seller loophole described above — provides a sidestep to the federal background check. States can pass requirements far above and beyond federal law, but most don’t do anything significant.

Massachusetts is not most states.

To buy a gun, one first must have a license to carry (LTC) or firearms identification card (FID). The LTC encompasses all firearms, including handguns, while the FID only covers rifles and shotguns. The minimum age for an LTC is 21. For the FID, it’s 18 — or 15 with parental permission. Both documents are good for six years. The vast majority of people, police chiefs across the state told me, apply for an LTC since it’s more expansive.

To obtain either of these, someone first must pay a $100 fee and submit some paperwork to their local police department, where they’re also photographed, fingerprinted, and interviewed. Their information is sent through a state background check system known as MIRCS, which looks at criminal, mental health, and other records. Police can also run other checks, such as via Coplink, which shares information between police departments.

Applicants also have to take a gun safety course, which teaches safe storage and handling of a firearm but does not involve live firing.

If applicants make it through all of that, police departments can also use some discretion to decide whether the applicant is a threat to public safety — what’s known as the “suitability” standard. For an FID, police chiefs must petition a court. For an LTC, police chiefs can deem an applicant unsuitable on their own.

The whole process usually takes two to six weeks, depending on the police department and circumstances involved.

The idea behind the suitability standard is that there are some things that may not pop up in a person’s criminal or mental health record, but are relevant to whether someone can own a firearm. “Let’s say we’ve been to a house the last four years because the guy is passed out drunk on the front lawn,” Police Chief Bill Brooks of Norwood, Massachusetts, told me. “That would not be a statutory disqualifier. … But it would indicate — to me, anyway — that this person is unsuitable to hold a firearm.”

Police do not use the suitability standard very often. Among the police departments I spoke to, they said upwards of 95 percent of applications are accepted. It’s only in a few cases where there’s a denial, and most of the time it’s an automatic denial, when a disqualifier pops up in a background check.

Deputy Superintendent Pauline Wells at the Cambridge, Massachusetts, Police Department told me in August that she only had to use the suitability standard once in her past year on the job in charge of the local licensing process. In that case, a woman with a gun license was arrested. And while the woman was not convicted of a crime (which could automatically disqualify her from a license), information in an affidavit for a restraining order “was so disturbing that we thought that it would be in the best interest of public safety not to renew her license.”

“We don’t take it lightly,” Wells said. “Even if we suspend or take something from someone, we can give it back to them.”

If applicants disagree with the police chief’s suitability decision with an LTC, they can appeal it to a court, which can decide if a chief’s decision was “arbitrary and capricious.”

Once licensed, people can then actually buy guns. Licensed gun dealers are required to ensure someone has a license — by scanning the person’s card or fingerprints — and run a background check. And the purchase is recorded in the state’s Gun Transactions Portal.

Private sellers — essentially, sellers who aren’t licensed — aren’t allowed to sell more than four guns a year. They also must conduct a real-time check of gun licenses, and they must record transfers in the state’s portal.

Gun owners are required to store their firearms with a trigger lock or safe. If any guns are lost or stolen, owners legally have to report the loss or theft; failure to do so can result in the revocation of a license or even prison time.

If a licensee gets in future trouble with the law or other red flags are raised, police can suspend a license on the spot through an electronic system. “If he were to go into a gun store tomorrow, that sale would be blocked,” Brooks said.

In case of revocation, the gun owner would also be required to give up all firearms. Police can enforce this with a warrant if needed, which is made easier since cops have access to the Gun Transactions Portal to see what firearms someone has.

Arlington Police Chief Fred Ryan cited the example of a domestic violence case. If the police are called in, “we can, on the spot, temporarily suspend someone’s gun license and remove the firearms from the home if there’s any information leading us to believe that there’s domestic abuse going on.”

The police chiefs I spoke to were generally positive about the state’s system. Brooks called it “excellent.” Chelsea Police Chief Brian Kyes said the system is “balanced” and that “we have a good system in place.”

Still, this system is not without shortcomings. Despite generally liking it, Ryan pointed out that police have access to records for state mental health facilities, but not private mental health care records. In his view, if the state is already disclosing state institution records, there’s no reason to treat other records differently just because someone went to a private facility. “If you’re wealthy and go to McLean Hospital on your parent’s dime, nobody ever knows about it. It’s inherently unfair,” he said.

Jason Guida was previously the director of the Massachusetts Firearms Records Bureau — where he worked with police departments on how to license gun owners — and is now an attorney helping people appeal police licensing decisions. He argues that the current legal standard makes it too difficult to appeal a license rejection decision, by requiring appellants to prove a police chief’s decision was arbitrary and capricious.

“For many of my clients, this is putting all the pieces back together — this is a part of them, it’s a right that they believe in and makes them whole when they are able to obtain it,” Guida said. “In many of these cases, you’re talking about things that happened many years ago — in some cases, juvenile offenses, things that kids did at 14 or 15 years old — that are now haunting them 15 or 20 years later.”

Brooks, who’s faced Guida in court before, said it’s true that appellants have to clear a high bar to get a license. “But I happen to think the system is good because the legislature opted to not set up a system where a judge would second-guess the chief,” Brooks said.

A growing body of research supports the gun licensing system

Several studies have looked at permit-to-purchase systems similar to Massachusetts’s over the years, and the findings have consistently been positive.

The big studies so far come out of Connecticut and Missouri. In Connecticut, researchers looked at what happened after the state passed a permit-to-purchase law for handguns — finding a 40 percent drop in gun homicides and 15 percent reduction in handgun suicides. In Missouri, researchers looked at the aftermath of the state repealing its handgun permit-to-purchase law — finding a 23 percent increase in firearm homicides but no significant increase in non-firearm homicides, as well as 16 percent higher handgun suicide rates.

Crifasi, of Johns Hopkins, said that researchers haven’t fully teased out what makes gun licensing requirements effective. She suggested, though, that licensing laws work because they’re “increasing accountability — the process you have to go through to be able to buy a gun, the training that’s required, teaching people how to store their guns appropriately, and when they can use their guns in an appropriate way.”

“I can say with a large deal of certainty that requiring a permit is effective,” Crifasi said. “We just don’t know yet which piece of the permit works the best.”

Crifasi can say that with certainty because she, along with her colleague Daniel Webster, have done a lot of the research on gun licensing laws, consistently finding that these measures reduce gun deaths. In fact, one of their recent studies had a finding that may surprise gun control advocates: In urban counties, comprehensive background checks are associated with higher levels of firearm homicides, but licensing rules like Massachusetts’s are associated with lower levels of gun homicides.

“Now, we don’t think that requiring people to undergo background checks is actually leading to increases in violence,” Crifasi said.

She explained that states that passed comprehensive background check laws likely did so because they already had relatively high levels of gun violence. Her analysis found that background checks likely leveled off a rise in gun violence, but background checks “weren’t sufficient on their own to make a substantive impact. That’s why we feel very strongly that if states are going to be tough, they should be passing permit-to-purchase — because we’ve seen repeatedly that there’s strong protective effects.”

The idea also has strong public support: A 2013 survey, published in The New England Journal of Medicine, found that more than 77 percent of Americans would back a gun licensing policy.

Massachusetts, however, goes beyond a typical licensing scheme by giving police chiefs extra discretion in the process through the suitability standard. Webster, who’s director at the Johns Hopkins Center for Gun Policy and Research, said this is a key component of Massachusetts’s law. “It’s another opportunity for law enforcement to identify individuals who might be too risky to have guns,” he said.

“When people talk about gun policy and who is or is not legally qualified to have a gun, they really oversimplify it,” Webster explained. “They paint you two caricatures — one is you’re a law-abiding gun owner who’s never done anything wrong or crossed the line, and then the other side is this hardened criminal who’s terrible forever. Well, guess what? The world doesn’t look like that. There’s all sorts of folks who are in this middle range.”

Discretion, he argued, allows police to wade into that middle ground even when the law might not explicitly ban a person from owning a gun. One example: Perhaps a person’s wife recently told a police officer that someone has suicidal or homicidal thoughts. If that person then comes in and tries to get a license, the police chief could use that discretion to deny the application, even if expressing violent thoughts is not explicitly disqualifying under the law.

Philip Cook, co-author of The Gun Debate and a gun policy expert at Duke University, said that the discretion that’s possible under the law “allows police to exercise common sense.” That, he added, is an “important and redeeming virtue of the law.”

Crifasi cautioned that we still need more research on the discretion piece, but she agreed that it very likely plays a role because “state and local law enforcement often have a better sense of who’s risky.”

“Maybe a police officer has been dispatched to a house for some kind of domestic violence multiple times, but charges are never pressed,” she said. “When police think about the next time they respond to a call at that house, do they really want to have a firearm there?”

Chelsea Parsons, vice president of gun violence prevention policy at the left-leaning Center for American Progress, raised concerns that giving police departments too much discretion can lead to racial discrimination. She argued that discretion may not be necessary, so much as the process “of requiring a few extra steps on the part of a prospective buyer,” especially if one of those steps is having to go to a police department and filing official paperwork — a possible deterrent to would-be criminals, whether cops have a lot of discretion or not.

Hemenway, of Harvard, also acknowledged the risk of racial discrimination. But, he said, “We give discretion to the police in all sorts of things. This is just another thing.” Rather than giving up on police discretion altogether (which would make police work very difficult), he suggested it may be better to adopt some general guidelines and use the available appeals process to hold cops accountable.

For Webster, the bottom line is the final outcome: “At the end of the day, not many people in Massachusetts who have something in their background — of dangerousness, violence, [or] recklessness — have guns available to them.”

It’s not just one law. It’s a lot of policies working together.

The licensing system is not the only reason for Massachusetts’s low rates of gun deaths. Even focusing exclusively on gun laws, experts emphasized that the state has a flurry of systems, laws, and programs working together to help keep gun deaths low.

Parsons said Massachusetts shows that “it’s not a matter of passing one type of new law,” but “looking across the issue and across the problem of gun violence in a particular state and figuring out what are all the different approaches that can be taken to help get at this problem.”

Crifasi agreed: “In a state like Massachusetts, with a really robust set of policies related to firearms, it’s probably some interaction between these policies in addition to the individual policies.”

There’s research that supports this. A 2016 review of 130 studies in 10 countries, published in Epidemiologic Reviews, found that new legal restrictions on owning and purchasing guns tended to be followed by a drop in gun violence — a strong indicator that restricting access to firearms can save lives.

But the research emphasized that the key here was not likely one law, but the “potential synergistic effects, or the aggregated individual effects of multiple laws, when they are simultaneously implemented within a narrow time window.”

Take the example of Australia. In response to a grisly mass shooting in 1996, the country passed a legislative package that strengthened its gun laws across the board. In popular media, the part of this program that’s most emphasized was Australia’s mandatory buyback program, through which hundreds of thousands of newly banned guns were confiscated. But Australia also set up a national gun registry and required a permit for all new firearm purchases, among other changes.

The 2016 research review concluded that Australia’s new law did reduce gun deaths. But “it wasn’t the buyback program itself that had this strong effect,” Julian Santaella-Tenorio, lead author, told me. “It was this combination of the laws.”

Webster cautioned, though, that “it’s not just having a bunch of gun laws; it’s having the right ones.” He cited measures that seem to be particularly effective: licensing systems, background check systems that are truly thorough and comprehensive, restrictions on concealed carry in public, and stricter regulation and oversight of gun sellers.

To this end, a review of the research published by the nonprofit RAND Corporation earlier this year found more evidence for some types of gun policies than others. For example, the review found evidence that background checks and child access prevention laws reduce gun deaths, but it found no evidence — in either direction — that reporting requirements for firearm sales or lost or stolen guns increase or decrease gun deaths. (Meanwhile, the review found evidence that laws that loosen access to firearms or relax the use of guns, like concealed carry measures and “stand your ground” laws, lead to more gun violence.)

Hemenway agreed that some policies are better than others. But, he added, “I think hardly anything is a big deal. I’m convinced that large numbers of small things add up.”

Drawing on his history in the injury research world, Hemenway drew a comparison to car crashes. Deaths caused by car crashes have dropped considerably over the decades, he said, but it wasn’t because of one policy. It was a mix of new laws and rules for airbags, seatbelts, collapsible steering columns, changes to roads, drunk driving, and much more.

To this point, there are multiple issues within gun violence. An assault weapons ban likely won’t have an effect on suicides, gang shootings, or domestic violence, for example, but it may have a significant effect on mass shooting deaths. Other policies may have different effects in different categories.

Wherever researchers ultimately land on the effect of individual laws versus the whole picture, there’s little debate that Massachusetts has a fairly robust, effective set of gun laws. That includes not just the licensing system, but also a safe storage law, the registration portal, legal requirements for reporting lost or stolen guns, restrictions on private sellers, bans on assault weapons and large-capacity ammunition magazines, a list of prohibited gun buyers that extends far beyond federal law, oversight on gun dealers that goes above the federal standard, and much more.

There are also policies that go beyond gun control, including youth intervention programs and evidence-based policing strategies like focused deterrence. Massachusetts has done a good job in this area: A 2017 report from the Giffords Law Center found that the state led the US, along with Connecticut and New York, in investing in evidence-based gun violence prevention strategies.

All of these policies work together to make Massachusetts one of the safest states in the US when it comes to gun deaths.

A single state can only do so much

The reality, though, is Massachusetts has not vanquished gun deaths. It still has some gun violence, and its rates of gun deaths are still higher than that of other developed nations, like the United Kingdom and Japan.

Part of that is the national context that Massachusetts falls under. While Massachusetts certainly has strong gun laws, much of the US — including some of Massachusetts’s New England neighbors, like New Hampshire — does not. For a criminal or gun trafficker, this creates a loophole: If they want easy access to a gun, they can travel for a few hours to a state with laxer laws and purchase a gun without any of the obstacles presented by Massachusetts’s laws.

There’s good evidence this is happening in Massachusetts: In 2017, almost half of guns used in crimes in Boston that were confiscated by the police department were traced to out-of-state origins. Only 21 percent were proven to come from inside the state, while the rest had an unknown origin. Other reports have linked crime guns to outside the state, including New Hampshire, Maine, and Southern states along the I-95 corridor.

This isn’t just a Massachusetts problem. From Mexico to Chicago to New York, places with strong gun laws frequently see firearms come in from places with weak gun laws.

“The best thing that could be done is to strengthen the gun laws in the states around us,” Brooks, the Norwood police chief, said. “Some of our gun violence comes from firearms that have come in from out of state.”

That doesn’t mean state-level laws are totally ineffective. Webster argued that the small number of guns used in crimes coming from inside the state is “actually a good thing — it shows that there’s local scarcity. If you have to link into individuals coming across state lines and are exposing themselves not only to state trafficking laws but federal trafficking laws and all the costs of that, we tend to find that the prices in those illegal markets are notably higher.” Those hurdles, he added, likely keep guns out of reach for a significant number of people.

But the national patchwork of laws does mitigate Massachusetts’s otherwise strong laws. This is a problem that could only be fixed if all states passed stricter laws or if the federal government did.

“If all the states were like Massachusetts,” Hemenway suggested, “there’d probably be the same amount of crime, but there just wouldn’t be as much gun crime — so it wouldn’t be as dangerous, and fewer people would die, and fewer people would have traumatic spinal cord injuries and traumatic brain injuries.”

Even if the rest of the country were to follow in Massachusetts’s footsteps, though, the laws would take time to take effect. One reason for that: Some surveys show there are already more guns than people in the country.

The high number of guns helps explain why the US has far more gun deaths, although not more crime in general, than other developed nations. People of every country get into arguments and fights with friends, family, and peers. But in the US, it’s much more likely that someone will get angry during an argument and be able to pull out a gun and shoot someone. And since guns are deadlier than other weapons, that leads to far more deaths than America would otherwise have.

But it also makes it difficult to deal with future gun violence. Even if a state passes a new law restricting who can obtain a gun, the abundance of firearms creates a huge loophole that a would-be criminal could tap into, through theft or an illegal purchase.

This is, in fact, one reason Massachusetts is successful: It’s never had that many guns, because it’s long restricted their use and possession. Its current system has been decades in the making, steadily strengthened over the years as the issue of gun control has gotten more and more public attention. But even before that, the state has a history of regulating firearms; Boston, for example, banned the storage of a loaded firearm in any home or warehouse going back to colonial days, and set limits on the possession and transportation of gunpowder.

That’s why Hemenway said that a key to gun laws is not just having them in place, but making sure they have enough time to take root. Guns, after all, are durable; no one should expect guns that are or will be used in crime to simply disappear the day after imposing new restrictions on them. But over time, guns do wear out, and people will pursue new models of guns — and, slowly but surely, restrictions make it more difficult for new firearms to end up in the wrong hands.

Beyond gun laws, there are all sorts of factors that contribute to gun deaths. Urbanization, poverty, overall crime, alcohol and drug use, and cultural forces are just a few examples.

But based on the research, Massachusetts’s strict gun laws play a major role — offering a model for how to reduce gun deaths.

“That’s what this is all about,” Cook, of Duke University, said. “Saving lives.”