Uber should be regulated as a transportation company and not a tech service, an adviser to Europe's top court said on Thursday.

The non-binding opinion issued by the Advocate General of the European Court of Justice (ECJ) is a major setback for Uber, which has argued that it is best classified as a digital service.

"The Uber electronic platform, whilst innovative, falls within the field of transport: Uber can thus be required to obtain the necessary licenses and authorizations under national law," Advocate General Maciej Szpunar wrote in an opinion published by the court.

A final decision in the case is expected before the end of the year. While guidance from the Advocate General is not binding, the court typically rules in similar fashion.

Uber has long sought to avoid tougher regulation by arguing that it is a tech platform that connects passengers and drivers.

Critics, however, say that it more closely resembles a taxi company and should be regulated as such. Another frequent point of contention: Uber says full- and part-time drivers who ferry passengers around are not employees, but contractors.

An Uber spokesperson said Thursday that the company would wait for the court's final ruling.

"Being considered a transportation company would not change the way we are regulated in most EU countries as that is already the situation today," the spokesperson added. "It will, however, undermine the much needed reform of outdated laws."

Related: Uber is ditching this country next month

The case against Uber was brought by an organization representing professional taxi drivers in Spain. They argued that Uber has an unfair advantage because its drivers don't have the taxi licenses required by the city of Barcelona. A Spanish court referred the case to the European Court of Justice.

Spain is not the only European country where Uber faces a backlash. The company was fined in France last year for running an illegal transportation service.

In the U.K., Uber faces a backlash from taxi drivers and labor unions over its treatment of drivers.

Uber announced last month that it would pull out of Denmark because of the country's new taxi laws.