California residents can now petition a judge to temporarily remove a close relative’s firearms if they fear their family member will commit gun violence, thanks to a new safety measure signed into law Tuesday by Gov. Jerry Brown.

Under the “Gun Violence Restraining Order” law, a successful petition would allow a judge to remove the close relative’s guns for at least 21 days, with the option to extend that period to a year, pending an additional hearing, according to Reuters. The law is the first of its kind in the U.S., and will be an extension of existing legislation that temporarily prohibits people with domestic violence restraining orders from owning firearms.

“If it can save one life, one family from that agony, it will be worth it,” said Democratic California Senator Hannah-Beth Jackson, during the bill’s debate. Many Republic state senators argued that the law would infringe upon the Second Amendment, and that there were already sufficient regulations in place.

The new law was introduced after Santa Barbara police in May were legally unable to confiscate the weapons of a man who later went on a shooting spree that killed six people, despite his family’s having expressed concerns to authorities that he would become violent.

Contact us at letters@time.com.