California Gov. Gavin Newsom (D) signed legislation on Wednesday that will reclassify many gig economy workers from independent contractors to employees, a change that could upend the business models of tech companies like Uber and Lyft.

In a letter to California lawmakers on the bill signing, Newsom called Assembly Bill 5 “landmark legislation for workers and our economy.”

“It will help reduce worker misclassification ― workers being wrongly classified as ‘independent contractors,’ rather than employees, which erodes basic worker protections like the minimum wage,” Newsom wrote, adding that the bill is an “important step” toward fighting against the “hollowing out of our middle class.”

Thenew law, which is set to go into effect in January, clarifies the conditions under which a worker should be considered an employee entitled to such benefits as a minimum wage, unemployment and disability insurance, and a right to form a union.

“The misclassification of workers as independent contractors has been a significant factor in the erosion of the middle class and the rise in income inequality,” the new law says.

Uber and Lyft, whose hundreds of thousands of drivers are currently considered independent contractors, had lobbied against the measure. The companies’ bottom lines will be dramatically affected if thousands of drivers are reclassified as employees.

After lawmakers passed the bill on Sept. 11, Uber said it wouldn’t reclassify its drivers under the new law, claiming that “drivers’ work is outside the usual course of Uber’s business.”

The law applies an “ABC” test under which workers can be considered independent contractors only if (A) the workers are “free from the control and direction” of the company that hired them, (B) their work falls outside the usual business of the company and (C) they are engaged in work in an independent business of the same type as the company’s.

Uber has claimed that its drivers “pass” that test and can still be considered independent contractors.

Exactly how the law will affect ride-hailing companies and their drivers when applied in practice isstill unclear. In early September, as AB5 was expected to soon become law, Uber said that it was pursuing “several legal and political options,” including a statewideballot initiative in 2020, to keep from having to classify its drivers as employees.

The law has exemptions for certain groups of workers, including real estate agents, freelance writers, hairstylists and barbers who set their own rates and hours.

Hundreds of Uber and Lyft drivers with the organizing group Gig Workers Rising protested throughout California in August, pushing for the bill’s passage.

The legislation overwhelmingly passed the California Senate in early September and in the Assembly in May.

Several Democratic presidential candidates came out in support of the bill and workers’ demands in recent months, including Sens.Kamala Harris (D-Calif.),Bernie Sanders (I-Vt.) and Elizabeth Warren (D-Mass.), and South Bend, Indiana, MayorPete Buttigieg.

“American history is full of shameful examples where powerful industries exploited workers in pursuit of greater profits,”Warren wrote in an op-ed in the Sacramento Bee in August. “In many industries today, it takes the form of worker misclassification.”