The woman said her husband had been behaving erratically, that he was texting her threatening things, saying he was going to “get revenge,” and kill someone they knew.

She called the police and showed them screenshots of the text messages. They knew the man legally owned firearms, so they got a warrant to search his home.

“They found a cache of firearms which included numerous shotguns, a pistol, even a crossbow, and ammunition,” says Peter McShane, the state's attorney for Middlesex County in Connecticut.

Connecticut is one of five states where the authorities can seize legally owned weapons from someone if they are considered at risk of hurting themselves or someone else.

Lawmakers on Beacon Hill are debating whether to enact similar legislation in Massachusetts, but it’s difficult to assess the effectiveness of the law in Connecticut, which has been on the books since 1999.

In that state, the court is required to hold a hearing within two weeks of seizing firearms to determine whether they should be returned to their owner. McShane says the deadline affords due process, and allows the courts to weigh the person's right to own firearms against the risk they pose to themselves and others.

McShane adds that, in his experience, the gun owners usually waive the hearing, and that’s what happened in the case with the man who sent threatening texts to his wife.

“I think a lot of these cases originate from people who have mental health issues, or their loved ones have concerns for them, and they concede that during that time period, they should not have firearms in their possession,” McShane says.

The law went into effect after Matthew Beck, an employee of the Connecticut State Lottery, killed four of his colleagues and then himself.

In the months leading up to that day, Beck had been angry about a salary dispute and being passed over for a promotion. He had been treated for mental health issues, and was described by both coworkers and family members as “troubled.”

Michael Norko, a professor of psychiatry at Yale, says it was partly in response to that tragedy and to the mass shooting at Columbine High School that Connecticut’s state legislature passed the “Extreme Risk” law.

Norko was one of the researchers on the most comprehensive study of the law, looking particularly at whether it's effective at preventing suicides. He says they were able to determine that one suicide was prevented for every 10-20 seizures.

“One of the things that we know is that other means of suicide are less fatal than gunshots,” Norko says. “More than 90 percent of suicide attempts by gunshot are successful.”

Taking a gun away from someone who is suicidal won't necessarily make them better, but it removes the most immediate means for self harm, and it often starts the process of getting them help.

“I think being able to identify people, take away their most lethal method of hurting themselves or others, and then getting many of them the care they need is an effective public health tool,” Norko says.

Since 2012, the law has been used about 180 times per year. How many of those cases might have averted a mass shooting is much more difficult to answer. There's no way to say with any certainty why an event didn't happen, and some critics of the law say the cost to civil liberties has been too high.

Scott Wilson is president of the Connecticut Citizens Defense League, a group devoted to protecting second amendment rights.

He says he worries laws like this might violate peoples' right to due process – and, he's not convinced they work.

“I don’t think any law is going to stop someone who wants to commit mass murder,” Wilson says. “Today, mass murder can be accomplished with a gun, or a heavy motor vehicle,” he says, referencing recent attacks in Europe and New York City.

Wilson agrees that some people clearly shouldn't have guns, such as 19-year-old Nikolas Cruz, the alleged shooter in Parkland, Fla.

“That individual was visited numerous times by law enforcement, but he seemed to not be considered a threat, and well should have,” he says.

Advocates of “red flag” laws might point out that Florida doesn't have a law like the one in Connecticut, meaning that even if there are signs that someone like Cruz is dangerous, it’s much harder to seize any weapons they legally possess.

McShane says the law in Connecticut isn't perfect. But in his county, he says they go out of their way to protect people's right to due process, holding hearings within five days after seizing weapons, even though they have up to two weeks to do so. He says the court seldom finds that authorities were wrong in seizing a person's weapons.

“I can't remember the last time that a judge returned the guns,” he says. Moreover, he says in most cases, the owners don't seek to get them back.