San Francisco Superior Court Judge Ethan Shulman passed the preliminary injunction on Monday, which goes into effect in 10 days.
The ruling comes as a result of a lawsuit by California Attorney General Xavier Becerra and the city attorneys of Los Angeles, San Diego, and San Francisco, who alleged Uber and Lyft violated AB5, a law that passed earlier this year that requires gig workers to get benefits from companies.
In June, Becerra requested an injunction from the courts.
Both Uber and Lyft are likely to appeal the ruling. The two companies spent millions of dollars fighting AB5 and pushed for a ballot initiative that would have exempt them from the law. By listing drivers as independent contractors instead of employees, the two companies were able to not pay workers benefits like healthcare.
Becerra tweeted in reaction to the ruling on Monday, saying: “our state and workers shouldn’t have to foot the bill when big businesses try to skip out on their responsibilities.”
In the ruling, Schulman said that the likelihood the state would be able to prove that the companies were misclassifying their drivers was “overwhelming.”
The judge also flagged that there were “glaring inconsistencies” in the companies’ arguments, highlighting that Uber argued that AB5 did not apply to them, but also filed a lawsuit claiming that the law was unconstitutionally targeting them.