Could this new California law prevent another shooting rampage?

People hug at a public memorial on the Day of Mourning and Reflection for the victims of a killing spree at University of California, Santa Barbara on May 27, 2014 in Isla Vista, California. (Photo: Getty Images)

People hug at a public memorial on the Day of Mourning and Reflection for the victims of a killing spree near the University of California, Santa Barbara on May 27, 2014 in Isla Vista, California. (Photo: Getty Images)

Only a month before Elliot Rodger went on a killing spree, Santa Barbara County sheriff’s deputies visited his home to check up on him. Prompted by a call from his mother to his therapist, health services got involved and authorities were contacted, but the deputies that paid the 22-year-old a visit didn’t determine he posed a threat.

The officers also didn’t have any legal reason to take Rodger into custody.

Rodger stabbed three people to death in his apartment, then went on a shooting rampage where he killed three college students and injured 13 others before ending his own life.

A law taking effect in California this week goes farther than any other of its kind to prevent potentially dangerous people, like Rodger, from possessing firearms in the state, backers contend.

Assembly Bill 1014 came several days after the deadly mass shooting in the college town of Isla Vista last year.

The law will allow the family of a gun owner or law enforcement to petition a court for a gun violence restraining order, which can be granted if a judge deems that individual a danger to themselves or others. The restraining order would prevent a person from purchasing or possessing any guns or ammunition and give police the authority to confiscate them for up to 21 days or longer if extended.

Advocates of the law say it’s an extension of the state’s existing prohibitions on gun ownership among domestic abusers and the mentally ill. They also contend it doesn’t violate the Second Amendment because it contains the due process mandate of obtaining a restraining order.

The Law Center to Prevent Gun Violence sees the law as a way to prevent further shootings like the one that occurred more than a year ago.

“We had a chance here,” said Robyn Thomas, executive director of the Law Center to Prevent Gun Violence, shortly after the May 2014 killings. “This was a case where there was an opportunity and, the way the laws are written, we as a society weren’t able to take advantage of the opportunities.”

But opponents of the law have called it a violation of due process and the Second Amendment, because the accused doesn’t have to be present during the restraining order proceedings and can have their guns taken away before being given the opportunity to prove their innocence.

“Every­one has good in­ten­tions, but you have to think of un­in­ten­ded con­sequences too,” NRA spokes­wo­man Jennifer Baker told The National Journal. “You are for­cing a per­son to give up own­er­ship of a valu­able prop­erty.”

Correction: The article incorrectly stated the incident occurred on the UC-Santa Barbara campus and that Elliot Rodger was a student there.