Uber drivers have won the right to be classed as workers rather than self-employed.
The ruling by a London employment tribunal means drivers for the ride-hailing app will be entitled to holiday pay, paid rest breaks and the national minimum wage.
The GMB union described the decision as a "monumental victory" for some 40,000 drivers in England and Wales.
Uber said it would appeal against the ruling that it had acted unlawfully.
The San Francisco-based company had argued that its drivers were not employees but self-employed contractors.
The ruling accused Uber of "resorting in its documentation to fictions, twisted language and even brand new terminology", adding: "The notion that Uber in London is a mosaic of 30,000 small businesses linked by a common 'platform' is to our mind faintly ridiculous."
"This is a monumental victory that will have a hugely positive impact on drivers," said Maria Ludkin, legal director at the GMB, which brought the case.
The TUC said the case had exposed the "dark side" of the UK's labour market.
General secretary Frances O'Grady said: "For many workers the gig economy is a rigged economy, where bosses can get out of paying the minimum wage and providing basics like paid holidays and rest breaks.
"What is happening at Uber is just the tip of the iceberg. Lots of people are now trapped in insecure jobs, with low pay and no voice at work. We need the government to get tough on sham self-employment."
Jo Bertram, Uber's UK manager, said: "Tens of thousands of people in London drive with Uber precisely because they want to be self-employed and their own boss.
"The overwhelming majority of drivers who use the Uber app want to keep the freedom and flexibility of being able to drive when and where they want. While the decision of this preliminary hearing only affects two people, we will be appealing it."
Two drivers, James Farrar and Yaseen Aslam, argued that their actions were controlled by Uber, which meant they were employed by the firm - but that they did not have basic workers' rights.
Mr Farrar said his net earnings in August 2015 after expenses were £5.03 an hour. Mr Aslam no longer drives for Uber.
Nigel Mackay from law firm Leigh Day, which represented the two drivers, said: "This judgment acknowledges the central contribution that Uber's drivers have made to Uber's success by confirming that its drivers are not self-employed, but that they work for Uber as part of the company's business.
"This is a ground-breaking decision. It will impact not just on the thousands of Uber drivers working in this country, but on all workers in the so-called gig economy whose employers wrongly classify them as self-employed and deny them the rights to which they are entitled."
Martin Warren, partner and head of labour relations at Eversheds, said the ruling may not mean other cases brought by workers in the "on-demand economy" will have similar success.
"Each case will depend on the specific terms and arrangements between the individual and the company they work for. Nevertheless other firms who rely heavily on the 'on-demand' freelance workforce will be watching cases like this keenly," he said.
Alex Bearman, partner at Russell-Cooke solicitors, said Uber could look to meet any additional costs by increasing the percentage of each fare that it kept as commission: "It seems likely that this decision will be appealed and we may not see a final determination for some time to come."
Uber drivers: for and against
Sahrab Shinwari from Hayes, west London, has driven for Uber for the past 18 months and welcomed the decision: "We used to do less hours and make more money. Business has gone down. We can't work on minimum wage - we can't maintain a car on that. Uber don't provide us with a car. Holiday and sick pay is perfect, but the minimum wage isn't."
Steven Rowe, however, is disappointed: "I don't see myself as being employed. I don't see myself as a worker for Uber. I see myself as being my own boss, making my own decisions ... It might be a success for two Uber drivers, but I think the vast majority of us will be really, really worried about whether Uber can run the really successful way they've operated in this country."
A Department for Business spokesperson said: "We are keen to ensure our employment rules keep up to date to reflect new ways of working and that's why the government has asked Matthew Taylor to conduct an independent review into modern working practices."
Shadow business minister Jack Dromey told the BBC: "Uber are going to have to fundamentally rethink how they operate in this country."