California Governor Gavin Newsom signed a law that will make the state the first to allow employers, coworkers and teachers to seek gun violence restraining orders against other people. The bill was signed Friday by Newsom but had been vetoed twice by former governor Jerry Brown; both are Democrats.

It goes beyond a measure Brown signed allowing only law enforcement officers and immediate family members to ask judges to temporarily take away peoples' guns when they are deemed a danger to themselves or others.

Seventeen states and the District of Columbia have laws similar to California's current law but the new law taking effect on January 1 will be broader.

California Governor Gavin Newsom on October 11, 2019. Rich Pedroncelli / AP

The California law will require co-workers requesting the orders to have "substantial and regular interactions" with gun owners to seek the orders and co-workers and school employees must get approval from their employers or school administrators before seeking them. People seeking the orders will have to file sworn statements specifying their reasons for doing so.

Get Breaking News Delivered to Your Inbox

Newsom also signed a companion bill allowing the gun violence restraining orders to last one and five years, although the gun owners could petition to end those restrictions earlier.

The measure was opposed by gun owners' rights groups and the American Civil Liberties Union. The ACLU said the bill "poses a significant threat to civil liberties" because orders can be sought before gun owners have an opportunity to contest the requests.

Those allowed to request orders under the new law may "lack the relationship or skills required to make an appropriate assessment," the ACLU said.

A slew of gun restrictions went into effect in California this year, including a law raising the minimum age to buy rifles and shotguns from 18 to 21 (with exceptions for members of law enforcement, the military, or those who have a hunting license).