In the wake of massacres like Wednesday's school shooting in Parkland, Fla., a small number of states have passed "red flag laws" that allow the seizure of guns before people can commit acts of violence.
California, Washington, Oregon, Indiana and Connecticut have statutes that can be used to temporarily take guns away from people whom a judge deems a threat to themselves or others. Lawmakers in 18 other states — including Florida — plus the District of Columbia have proposed similar measures.
Mental illness, escalating threats, substance abuse and domestic violence are among the circumstances under which a judge can order weapon restrictions.
"This morning I heard the sheriff [in Parkland] lament the fact that he did not have the tools to remove the firearms from the shooter," Joshua Horwitz, executive director of the Coalition to Stop Gun Violence, said Thursday. "Had he lived in one of those states where this law is in place, he would have had the tools, and this shooting may have been averted."
The nation's patchwork of federal and state gun laws mainly involves background checks and actions to prevent people who pose a threat from buying firearms. The approach of red flag laws is to seize guns from people who have them and to restrict their access until they are no longer dangerous.
"We think of this as a new frontier," said Jonas Oransky, deputy legal director of Everytown for Gun Safety, an advocacy group founded in 2014. "We don't have a perfect system in this country, and we can't stop every act of gun violence. This is a way for states to take some care and be somewhat nimble when there is a dangerous case."
The laws allow family members or law enforcement officers to ask a judge for a "gun violence restraining order" or an "extreme risk protection order" against someone who behaves the way 19-year-old Nikolas Cruz, the alleged Florida gunman, did in recent years.
According to news reports, Cruz killed squirrels with a pellet gun, trained his dogs to attack a neighbor's piglets, posted on Instagram about guns and killing animals and eventually threatened at least one teen. He showed signs of depression and had been treated at a mental health clinic.
Authorities say Cruz is the gunman who used an AR-15 assault-style rifle to kill 17 people and wound at least 15 others at Marjory Stoneman Douglas High School on Wednesday. Cruz has been charged with 17 counts of premeditated murder.
In an Everytown study of mass shootings from 2009 to 2016, 42 percent of the attackers had shown warning signs of violent behavior. In most situations, however, the danger is suicide, not homicide.
When Duke University researchers looked at the application of Connecticut's red flag law between 1999 and 2013, they found that police served 762 so-called risk warrants during that period and estimated that a gun suicide was prevented for every 10 to 20 seizures.
The police found guns in 99 percent of the cases in which they served the warrants, seizing an average of seven firearms from each person. Twenty-one people went on to commit suicide anyway, six by firearm.
Overall in the United States, suicides account for about 60 percent of gun deaths.
The National Alliance on Mental Illness has no formal position on red flag laws, according to Ron Honberg, a senior policy adviser for the organization, but hopes to see more states adopt them.
"It creates some mechanism to intervene at a particular point in time when a person may be in bad shape," Honberg said. "Is it going to be 100 percent effective? No."
In the three Western states with such laws, all adopted since 2014, a family member or law enforcement officer must petition a court about someone who appears to be a threat. Relatives often go to the police and ask them to do so, experts said.
A judge can quickly order the weapons surrendered if convinced of the threat. Within a few weeks, a full hearing is held on longer-term restrictions, which can last a year. Judges must allow people who want their weapons back to revisit the ruling.
In Connecticut, only law enforcement agents can ask for a risk warrant. And in Indiana, law enforcement can confiscate weapons without a judge's order. The gun owner must ask the court to get the weapons returned.
States have long prohibited some convicted felons and people committed involuntarily from having firearms. At least seven states last year passed laws restricting access to guns for people convicted of misdemeanor domestic violence crimes, and three require that offenders turn their guns in.
Horwitz and Oransky said the National Rifle Association and other members of the gun lobby have not put up much opposition to the statutes. "We would be happy if they came to the table and were supportive of those laws," Oransky said.