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.

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 toward 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.

But Uber's top lawyer, Tony West, said Wednesday the company won't reclassify its drivers as employees on January 1, because the company believes it can pass the law's three-part test. “Just because the test is hard doesn't mean we will not be able to pass it,” West said on a call with reporters.

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 Los Angeles 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.

Late last month, Uber and Lyft proposed a compromise that would set a minimum wage for drivers and give them paid time off, sick leave, and a form of workers’ compensation. But many labor advocates said the proposal was not adequate. Postmates and Instacart have put forward their own compromise plans.

Even if negotiations stall, Uber and Lyft have a plan C. The companies announced, along with DoorDash, that they would commit $90 million to a state ballot measure to create an alternative worker classification, somewhere between employee and independent contractor. “We are fully prepared to take this issue to the voters of California to preserve the freedom and access drivers and riders want and need,” Lyft spokesperson Adrian Durbin said in a statement. The companies could also deal with worker misclassification claims through arbitration and lawsuits.

Labor advocates expect this fight to move well beyond California—and well beyond the US. A similar worker reclassification bill is in the works in New York state, and Uber also faces worker classification questions in London, one of its biggest markets. (New York City rules already guarantee local drivers a minimum wage.) Last week, a Brazilian court ruled that Uber drivers working there are contractors, not employees.

Updated, 9-11-19, 4:20pm ET: This article has been updated with comments by Uber's lawyer.

Aarian Marshall writes about autonomous vehicles, transportation policy, urban planning, and everyone’s favorite topic: How to destroy traffic. (You can’t, really.) She’s an aspiring bike commuter and New Yorker going soft on San Francisco, where she’s based. Before WIRED, Marshall wrote for The Atlantic’s CityLab, GOOD, and Agri-Pulse, an agriculture... Read more

WIRED is where tomorrow is realized. It is the essential source of information and ideas that make sense of a world in constant transformation. The WIRED conversation illuminates how technology is changing every aspect of our lives—from culture to business, science to design. The breakthroughs and innovations that we uncover lead to new ways of thinking, new connections, and new industries.