California Gov. Gavin Newsom signed a law Tuesday banning local, state and federal law enforcement officers from using gloves that can deliver painful electric shocks to people.

The ban on shock gloves will take effect next year and remain in place until 2030. It comes weeks after U.S. Immigration and Customs Enforcement moved to equip its officers with the gloves, which are designed to gain compliance from combative individuals. Last month, the agency awarded a nearly $17 million contract to buy 6,000 pairs.

“Trump has put his political interests above the health, safety and livelihood of American families,” Newsom said in a statement. “California is taking action to strengthen transparency, accountability, and oversight around immigration enforcement in our state.”

The law is the latest example of how Democratic-led states have been pushing back against President Donald Trump’s immigration enforcement efforts since he took office last year. In California, lawmakers passed at least two dozen bills this year seeking to fortify immigrants’ rights, restrict cooperation with federal immigration agents and tighten regulations on immigrant detention facilities, among other things.

Nationwide, 17 states with Democratic-led legislatures have passed a total of more than 100 pro-immigrant bills this year, according to an Associated Press analysis using the bill tracking software Plural. The most common purpose is to limit cooperation with federal immigration enforcement agents.

Democratic California Assemblymember LaShae Sharp-Collins said she introduced the shock-gloves legislation to “put a pause” on law enforcement’s use of the devices while the state examines their potential risks. The law requires the state’s Justice Department to study their safety and report to lawmakers by 2029.

“There’s a lot of unrest and a lot of uncertainty,” she said in an interview. “A lot of people are scared.”