Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

California now requires police to get a court order before they can search messages, email, photos and other digital data stored on your cellphone or company servers.

Gov. Jerry Brown on Thursday signed into law the California Electronic Communications Privacy Act (calECPA). It's only the third of its kind in the U.S., and the most protective, privacy experts said. While some states do guarantee some comparable protections, only Maine and Utah previously had comprehensive laws on the books, said Hanni Fakhoury, senior staff attorney for the Electronic Frontier Foundation.

The digital rights group, along with the American Civil Liberties Union, tech companies and news organizations, pushed for the bill's passage, arguing that existing laws desperately needed an update. Advocates say the new law highlights the need for similar protections at the national level.

Byers Market Newsletter Get breaking news and insider analysis on the rapidly changing world of media and technology right to your inbox. This site is protected by recaptcha

Related: Bottom Line: Google Study Confirms 911 'Butt Dialing' Is a Serious Problem

Co-sponsor Sen. Mark Leno, D-San Francisco, hailed the California law as a "landmark victory for digital privacy."

"For too long, California’s digital privacy laws have been stuck in the Dark Ages, leaving our personal emails, text messages, photos and smartphones increasingly vulnerable to warrantless searches," Leno said in a statement Thursday.

Related: Apple Removes Some Apps from Online Store Over Security Concerns

Nicole Ozer, technology and civil liberties policy director at the ACLU of California, said he hopes the California law becomes "a model for the rest of the nation in protecting our digital privacy rights."

Adobe, one of the many tech companies backing the bill, agreed. "Hopefully, this action by California lawmakers will jump-start a much-needed debate in Washington on electronic privacy," Mary Catherine Wirth, associate general counsel, said in a blog post.