A bill passed by California lawmakers Wednesday could put guardrails on the gig economy and its reliance on “independent contractors.” The legislation, Assembly Bill 5, may reshape the way some of the state’s marquee companies—including Uber, Lyft, and DoorDash—as well as many janitorial services, truckers, and musicians do business.

The bill passed the State Senate 29–11 late Tuesday, and the Assembly 56–15 on Wednesday. It now moves to Governor Gavin Newsom’s desk. Newsom came out in favor of the controversial bill on Labor Day, but said Tuesday that he’s still hoping to reach a deal that might satisfy both the companies and labor advocates.

Want the latest news on ride hailing in your inbox? Sign up here!

Labor experts expect the bill to prompt similar efforts in other states and cities where public sentiment has shifted against tech companies like Uber and towards labor efforts like unionization drives. “All eyes are on California,” says Rebecca Smith, who directs the Work Structures program at the National Employment Law Project.

AB 5 codifies a 2018 California Supreme Court decision that established a three-part test to determine whether a worker is an independent contractor or an employee, eligible for a minimum wage, unemployment and workers’ compensation, health care benefits, and other traditional protections. According to the test, a worker is only considered an independent contractor if she is not under the control or direction of a company while working and if she performs work that is “outside the usual course” of the company’s business. The bill does not address workers’ rights to collectively bargain.

Workers for app-based companies often set their own schedules, a flexibility some have asked to preserve despite this new legislation. But the companies also tend to control their workers by setting fares and commissions, monitoring performance through customer rating, and pushing them to work in specific areas based on in-app incentives. Also, the workers’ tasks—driving, delivering meals—are core to the companies’ business models. That means drivers for Uber and Lyft would most likely be classified as employees under the new law. Industry experts estimate that the new bill would cost Uber and Lyft, both of which are losing money, $3,625 per California driver, about $800 million a year combined.

Shifting gig economy contractors to gig economy employees would also likely force companies to rethink how they do business. Today, Uber and Lyft try to keep as many drivers logged onto their apps as they can, to decrease the wait time for passengers. But the new bill would likely cause them to actively manage the number of drivers logged on and therefore, on the clock, especially at less-busy times when fewer drivers are needed.

An amendment added late in the legislative process will also allow large cities like San Francisco to sue companies that don’t comply with the new law. The bill would go into effect on January 1, 2020.

On Tuesday evening, the Senate passed an amendment exempting for one year California newspaper carriers. Publishers like the LA Times and San Francisco Chronicle have said that paying those workers as employees would devastate their businesses. Some workers in other sectors, including real estate and commercial fishing, are also exempt from the bill.

California’s labor classification debate seems far from over. In an interview with the Wall Street Journal Tuesday, Newsom said he’s still working to strike a compromise between tech companies and labor groups, both of which have supported the governor. “As it relates to Uber, Lyft, DoorDash, others, some of the gig platforms, these remain ongoing negotiations, and regardless of what happens with AB 5, I am committed, at least, to continuing those negotiations,” he said.