(Bloomberg) -- California Governor Jerry Brown signed a sweeping data-privacy law on Thursday that has worried groups representing big technology companies such as Alphabet Inc.’s Google as well as the telecommunications, retail and pharmaceutical industries.

The move by the most populous U.S. state follows the roll out in May of the European Union’s General Data Protection Regulation, which prompted many companies to adjust practices worldwide, and could signal pushes in other states. Republican and Democratic members of Congress have said that new laws might be necessary to protect consumers following high-profile data scandals.

“Today is a great day for California consumers,” said state Assemblyman Ed Chau, who helped lead the effort to pass the bill. “The legislature, the governor, just took a historic step in enacting legislation to protect children and consumers by giving them control over their own personal data.”

The bill, known as AB 375, passed the state’s Senate and Assembly earlier Thursday in a sprint meant to prompt the withdrawal of a privacy ballot initiative that was widely considered tougher. The organizers of the initiative then pulled the measure as they pledged to do upon the bill’s signing.

“I feel like we have made a great stride forward here for the country,” said Alastair Mactaggart, a Bay Area real estate developer who funded the ballot measure. “If it happened here, it’ll happen in the rest of the country.”

The law will give Californians rights to opt out of the sale of their personal information, the ability to have their data deleted and a right to know what has been collected on them. It also gives the state’s attorney general enforcement authority. Chau said lawmakers will work with the interested parties to determine whether anything in the law needs to be changed before taking effect in 2020.

The Internet Association, which counts Google and Facebook Inc. as members, said before passage that it opposed “many problematic provisions” of the final bill, but “will not obstruct or block AB 375 from moving forward, because it prevents the even worse ballot initiative from becoming law in California.”

The tech sector wasn’t alone in its concerns. David French, a top executive at the National Retail Federation, blasted the law as “objectionable on many levels,” saying it put retail services such as restocking and loyalty programs at risk.

“It will expose businesses to unwarranted lawsuits while potentially taking away many of the innovations and special services consumers have come to expect,” French, senior vice president for government relations at the Washington-based lobbying group, said in a statement.

Google and Facebook each gave $200,000 to a committee opposed to the ballot initiative, according to California financial disclosures, as did AT&T Inc., Verizon Communications Inc. and Comcast Corp., which often find themselves on opposite side of policy fights from the internet companies.

Facebook, which said in April it would stop funding opposition to a user privacy initiative and participating in its activities, said it supports the bill while viewing it as imperfect.

The revelation that a British data firm with ties to President Donald Trump’s campaign obtained data on millions of Facebook users without their consent prompted calls for stricter privacy laws.

--With assistance from Romy Varghese

Bloomberg News