California’s governor signed into law Friday new gun control legislation modeled on a legal approach used in Texas to curb access to abortions.

Last year, well before the U.S. Supreme Court overturned the nationwide right to an abortion, the Republican-controlled state of Texas enacted a new law allowing individuals to sue anyone helping to terminate a pregnancy, if a fetal heartbeat could be detected.

The Texas law allowed the individuals who filed the civil complaints, if they won their case, to receive “damages” of at least $10,000.

Officials in the heavily Democrat-leaning state of California, where there is solid support for abortion rights as well as for strict gun control measures, decided to push for new legislation that uses the same legal mechanism.

The law Governor Gavin Newsom signed Friday will allow individuals to seek $10,000 from any person or company that manufactures, sells or transports firearms that are banned in the state, which includes assault rifles and homemade so-called ghost guns.

State Senator Anthony Portantino, speaking at a news conference, was explicit that he and his bill co-authors had the Texas law in mind when they wrote their legislation.

“Frankly, if Texas can use a private right of action to attack women, we can use a private right of action to make California safer,” he said.

Court challenges to the California law, which is set to go into effect Jan. 1, 2023, are expected to follow from conservative organizations and the nation’s powerful gun lobby.

Newsom argued that it was the U.S. Supreme Court, with its 6-3 conservative majority, that “opened the door” to such a move.

“The Supreme Court said this was OK. It was a terrible decision. But these are the rules that they have established,” he added.

The U.S. high court refused last year to halt the Texas abortion law from going into effect while challenges work their way through lower courts.

Similar Texas-style abortion restriction laws have since been enacted in several other Republican-led states.

Last month, a decision by the Supreme Court also expanded the right to carry concealed firearms around the country.

Newsom at the time called the decision “dangerous” and “shameful.”

Nearly 400 million guns were in circulation among the civilian population in the United States in 2017, or 120 guns for every 100 people, according to the Small Arms Survey.

More than 45,000 people were killed in 2020 by guns, about half of which were suicides, according to data compiled by the Gun Violence Archive.