This May 2013 photo shows a view down the barrel of a .45-caliber semi-automatic handgun. (Karen Bleier/Agence France-Presse via Getty Images)

ONE WEEK after five U.S. military service members were killed in a mass shooting in Chattanooga, Tenn., a gunman opened fire Thursday in a movie theater in Lafayette, La., killing two people. Some five weeks earlier, a shooting at a historic black church in Charleston, S.C. , left nine people dead. The question that inevitably arises from each event is how can we best keep guns out of the hands of people who shouldn’t have them.

There is no shortage of opinion, from those who say the federal system of instant background checks simply needs to be operated with greater competence to those who see the need for it to be made more robust and those who argue that dangerous people who want a gun will invariably get one. Debate about this issue, which encouragingly is getting some attention on the presidential campaign trail, ought to be driven by evidence of what has proved to be effective.

In particular, attention should be paid to studies showing the efficacy of state permits for gun purchases. Research by the Center for Gun Policy and Research at the Johns Hopkins Bloomberg School of Public Health shows that state permitting systems reduce gun availability to dangerous people and prevent homicides, suicides and shootings of law enforcement officers.

One study released in June examined effects of a law implemented in Connecticut in 1995 requiring a license, contingent on passing a background check, to purchase a handgun. Using sophisticated statistical modeling, researchers compared Connecticut’s homicide rates during the 10 years after the law’s implementation with the rates that would have been expected had the law not taken effect. The conclusion: a 40 percent reduction in the state’s firearm-related homicide rate. The study is the mirror-opposite of earlier research by the center that found that Missouri’s 2007 repeal of its handgun permit-to-purchase law was associated with a 25 percent increase in its firearm homicide rates.

Ten states and the District of Columbia have laws requiring permits for gun purchases and, according to center director and report author Daniel W. Webster, the strongest require the applicant to apply in person to local enforcement, which has access to more information and has discretion in granting the gun purchase permits. “Local police chiefs typically know more about the people in their community than does a national computer,” said David Hemenway, who headed a team from the Harvard School of Public Health that surveyed Massachusetts police chiefs. It found applicants who would have passed the federal background check and were denied permits due to worrisome behavior, including arrests for violent offenses or making threats.

There is no way of knowing what would have prevented the three recent attacks. It’s hard, though, not to wonder if the prospect of being fingerprinted and photographed would have deterred Dylann Roof, the accused Charleston shooter; or whether local authorities would have signed off on a permit for Chattanooga killer Mohammad Youssef Abdulazeez, knowing of his recent arrest.

To encourage states, Rep. Chris Van Hollen (D-Md.) joined Connecticut’s lawmakers in sponsoring legislation that would provide funding to states to expand background checks. “States,” said Mr. Van Hollen, “require licenses to drive a car or even to fish in local rivers, so requiring a license to buy a deadly handgun is a commonsense step that could save countless lives.” That common sense has been borne out by solid research.