Smartphone thieves in California are about to meet a new adversary – the kill switch.

Gov. Jerry Brown on Monday signed into law a bill requiring anti-theft features be built into new phones and automatically turned on. People whose phones are stolen would be able to remotely lock them and erase their data, making the devices worthless targets.

The law, which goes into effect in July 2015, is a big victory for anti-crime advocates who had complained that smartphone makers like Apple didn’t do enough to help their customers fend off theft. San Francisco District Attorney George Gascon, for example, had publicly criticized the industry for failing to beef up security after phone theft became epidemic in his city.

California is the first state to require the technology to be turned on by default. Earlier this year, Minnesota passed a law requiring phone kill switches, but the language did not say that the technology must be automatically enabled. Supporters of California’s law say that the ubiquity of the anti-theft technology is the critical to the effort’s success. Only when thieves are convinced that stolen phones have no value will they stop swiping them from people walking down the street or on the bus.

The initial kill switch bill, introduced in April by Sen. Mark Leno, of San Francisco, failed to pass in its initial vote. Only after being reintroduced a short while later did it finally pass.

The law only covers smartphones, and not tablets or laptop computers. Retailers face a $500 to $2,500 fine for selling phones without the required technology.

Before the bill signing, major phone manufacturers like Apple, Google and Samsung along with major carriers had opposed legislation by saying it would hurt consumers and potentially open a new avenue for hackers. Instead, they committed to a voluntary program to include technology that would let customers wipe data from stolen phones and disable them. But the companies were under no legal requirement to carry out the program.

Apple, for example, introduced an initiative last year that let users protect their devices through the iOS 7 iCloud Activation Lock feature. During its first six months, thefts of iPhones fells by 38% in San Francisco. Meanwhile, theft of Samsung devices, which had no similar anti-theft technology, rose 12% during that period.