Uber lost an appeal against a landmark 2016 ruling that the ride-hailing firm should treat its U.K. drivers as workers entitled to benefits like a minimum wage and holiday pay.

A majority of judges at the U.K.'s Court of Appeal, the second-highest court in the land, ruled in favor of Uber drivers James Farrar and Yaseen Aslam, who in 2016 argued at an employment tribunal that they were employees working for the company, rather than self-employed.

Uber argues that its drivers should be treated as self-employed — much in the same way that most traditional taxi drivers are — rather than workers directly employed by the company.

It says it should be treated more like an agency that connects drivers with passengers. According to the company, this arrangement provides more flexibility for its drivers, allowing them to work on their own terms.

The firm faced off in court with the Independent Workers Union of Great Britain (IWGB), a labor union representing drivers Farrar and Aslam.

Following the ruling, Uber said it had been granted permission to lodge an appeal with the Supreme Court, and planned on doing so.

"This decision was not unanimous and does not reflect the reasons why the vast majority of drivers choose to use the Uber app," a spokesperson for the company said in a statement on Wednesday.

The spokesperson added: "Almost all taxi and private hire drivers have been self-employed for decades, long before our app existed."

The firm said Uber drivers already earn more than the living wage in London, a non-compulsory hourly rate of £10.20 ($12.90) that takes everyday living costs into consideration.

"If drivers were classified as workers they would inevitably lose some of the freedom and flexibility that comes with being their own boss," Uber said.

The firm has more than 45,000 licensed drivers operating in London and over 3.5 million riders in the U.K. capital using its app. It announced a tie-up with insurance provider AXA earlier this year to offer European drivers insurance coverage for injury, sickness and family leave payments.

"We're very pleased and relieved but this just confirms what we already knew when we started this case," claimant Farrar told CNBC in an interview following the ruling. "We are workers and have been denied our rights."

Challenge to the gig economy
The embattled ride-hailing firm has navigated through a number of legal challenges and regulatory disputes in various countries. Last year, for instance, the European Court of Justice, the European Union's highest court, ruled that the firm should be considered a transportation company — instead of a digital services firm — meaning that it should be subject to the bloc's transport regulations.

Wednesday's ruling will be seen as a significant challenge for the so-called gig economy, where people work for companies on a freelance basis without fixed contracts.

Uber is one of the key companies that fall under that term, with others including Airbnb and Deliveroo. The firm is planning an initial public offering that could take place early next year and, according to reports, value the firm at $120 billion.

Farrar told CNBC that Uber would need to "think very carefully" about what the ruling means for its business model as it gears up for its 2019 IPO.

The Court of Appeal decision follows a case that was concluded in June, when U.K. firm Pimlico Plumbers lost an appeal at the U.K. Supreme Court — the highest in the legal system — against a ruling that one of its self-employed plumbers should be considered a worker, and therefore entitled to employment rights like holiday and sick pay.

Being self-employed in Britain entitles people to fewer benefits than those who are hired directly by companies. Freelancers and independent contractors are granted basic health and safety protections, but not a minimum wage, holiday pay or breaks.