LOS ANGELES — California will be the first state in the country to allow private citizens to ask a court to seize guns from family members who they believe pose a threat to themselves or the public, under a measure signed into law by Gov. Jerry Brown on Tuesday.

The law will allow law enforcement officials, family members and some others to seek a gun restraining order from a judge. That order would authorize officials to temporarily seize any firearm owned by someone deemed potentially violent, who would also be placed on a list of people prohibited from purchasing weapons.

“This puts California in the leadership on efforts to stop gun violence, and it gives a very effective tool to law enforcement and families to intervene before a shooting tragedy occurs,” said Nancy Skinner, the California assemblywoman who sponsored the bill.

Several states have passed laws allowing law enforcement officials to petition to take firearms from people considered dangerous, but California is the first to allow family members to do so as well — a provision that gun control advocates said would be crucial in preventing suicides as well as mass shootings.