Ride-hailing companies Uber and Lyft should classify their drivers as employees instead of as freelancers, a California judge has ruled.
The companies have 10 days to appeal against a preliminary injunction.
The job status is controversial. Gig-economy companies say it means drivers can work on their own terms, while critics say they have no protection.
A new rule in California called Assembly B5 directs workers on gig economics on vacation and sick pay.
It came into force on 1 January and sets out three criteria for determining whether a worker is independent as an employee.
These are listed on the state of California website and include whether the “hiring entity” has control and direction over workers in terms of their performance, and whether the jobs offered are different from the company’s main line. .
Uber and Lyft had argued that they should not be considered “hiring entities”.
Judge Ethan Schulman disagreed, saying this contradicted claims the companies had made elsewhere.
“Defenders should not evade legislative mandates simply because their companies are so large that they affect the lives of many thousands of people,” he wrote.
An Uber spokeswoman said: “The vast majority of drivers want to work independently, and we have already made significant changes to our app to ensure that the case remains under California law.”
Lyft said drivers “do not want to be employees”.
The status of app-based drivers is set to be put to the vote in a California referendum in November.
Mike Feuer, Los Angeles City Attorney, described the ruling as “a resounding victory” for drivers.