California Senate passed a new version of the "kill switch" bill that would require all smartphones sold in the state to be preloaded with antitheft software on Thursday.

The bill, SB962, was introduced by state Sen. Mark Leno and was sponsored by San Francisco District Attorney George Gascon, according to CNET. The legislation asks phone makers such as Samsung and Apple to have their phones include a "kill switch" that would allow users to lock the device if it is stolen, making it inoperable.

SB962 was initially shot down two weeks ago. It now has to pass through California Assembly, and must also be approved by California Gov. Jerry Brown.

Leno said two-thirds of robberies in San Francisco now involve a smartphone being stolen, as do one out of four robberies in Oakland, The Associated Press reported.

"We have a crime wave sweeping our state," he said.

"These crimes are up at double-digit rates. We're trying to keep our constituents safe on the streets."

The mobile security firm Lookout released a study on Wednesday that said one in 10 smartphones users in the U.S. have been robbed of their phone, CNET reported. Consumer Reports said that 3.1 million Americans were victims of smartphone theft in 2013, which was almost twice as much as in 2012.

The current tally includes 26 "yes" votes and 8 "no" votes. 21 votes are needed for a bill to pass the 40 member Senate.

SB962 does not apply to other devices, such as tablets, The Associated Press reported.

The bill only applies to smartphones made and sold after July 2015.

While Apple and Microsoft initially opposed the bill, the two companies changed their stance this week, CNET reported.

"I applaud Apple and Microsoft for breaking rank and dropping their opposition to SB 962, ignoring the false claim that this technology is unworkable," Leno said.

"We're one step closer to ending the violence and victimization that far too many people have been subjected to," Gascon said. "California truly has an opportunity to lead the way and end this public safety crisis, the potential to end this global epidemic is very real."