As state officials across the U.S. grapple with how to prevent mass killings like the ones at Sandy Hook Elementary School in Newtown, Connecticut, and near the University of California, Santa Barbara, some are turning to a gun seizure law pioneered in Connecticut 15 years ago.

Connecticut's law allows judges to order guns temporarily seized after police present evidence that a person is a danger to themselves or others. A court hearing must be held within 14 days to determine whether to return the guns or authorize the state to hold them for up to a year.

The 1999 law, the first of its kind in the U.S., was in response to the 1998 killings of four managers at the Connecticut Lottery headquarters by a disgruntled employee with a history of psychiatric problems.

Indiana is the only other state that has such a law, passed in 2005 after an Indianapolis police officer was shot to death by a mentally ill man. California and New Jersey lawmakers are now considering similar statutes, both proposed in the wake of the killings of six people — three stabbed to death and three fatally shot— and wounding of 13 others near the University of California, Santa Barbara, by a mentally ill man who had posted threatening videos on YouTube.

Michael Lawlor, Connecticut's undersecretary for criminal justice planning and policy, believes the state's gun seizure law could have prevented the killings of 20 first-graders and six educators at Sandy Hook Elementary School in December 2012, if police had been made aware that gunman Adam Lanza had mental health problems and access to his mother's legally owned guns.

"That's the kind of situation where you see the red flags and the warning signs are there, you do something about it," Lawlor said. "In many shootings around the country, after the fact it's clear that the warning signs were there."

Gun rights advocates oppose gun seizure laws, saying they allow police to take people's firearms based only on allegations and before the gun owners can present their side of the story to a judge. They say they're concerned the laws violate constitutional rights.

"The government taking things away from people is never a good thing," said Rich Burgess, president of the gun rights group Connecticut Carry. "They come take your stuff and give you 14 days for a hearing. Would anybody else be OK if they just came and took your car and gave you 14 days for a hearing?"

Rachel Baird, a Connecticut lawyer who has represented many gun owners, said one of the biggest problems with the state's law is that police are abusing it. She said she has had eight clients whose guns were seized by police who obtained the required warrants after taking possession of the guns.

"It's stretched and abused, and since it's firearms, the courts go along with it," Baird said of the law.

But backers of such laws say they can prevent shootings by getting guns out of the hands of mentally disturbed people.

"You want to make sure that when people are in crisis ... there is a way to prevent them to get access to firearms," said Josh Horwitz, executive director of the nonprofit Education Fund to Stop Gun Violence in Washington, D.C.

President Barack Obama tried to tighten gun regulations after the Newtown massacre, but proposals to expand background checks for gun purchasers failed to get enough votes to pass in the Senate in the face of strong opposition from the influential National Rifle Association and other gun rights groups. Some states such as Connecticut have tightened gun restrictions since Newtown, but others have expanded the right to openly carry firearms in public places.

Connecticut authorities report a large increase in the use of gun seizure warrants involving people deemed dangerous by police over the past several years. Officials aren't exactly sure what caused the increase but believe it's related to numerous highly publicized mass shootings in recent years.

Police statewide filed an estimated 183 executed gun seizure warrants with court clerks last year, more than twice the number filed in 2010, according to Connecticut Judicial Branch data. Last year's total also was nearly nine times higher than the annual average in the first five years of the gun seizure law.

Connecticut police have seized more than 2,000 guns using the warrants, according to the most recent estimate by state officials, in 2009.

Police in South Windsor, about 12 miles northeast of Hartford, say the law was invaluable last year when they seized several guns from the home of a man accused of spray-painting graffiti referencing mass shootings in Newtown and Colorado on the outside of the town's high school.

"With all that we see in the news day after day, particular after Newtown, I think departments are more aware of what authority they have ... and they're using the tool (gun seizure warrants) more frequently than in the past," said South Windsor Police Chief Matthew Reed. "We always look at it from the other side. What if we don't seize the guns?"