Uber is a transport firm and not a digital company, according to the European Court of Justice (ECJ).
To date, the US company had argued that it was an information society service, providing a platform for people to connect, and not a cab company.
The case was sparked in Barcelona after a local authority told Uber it had to conform to its local taxi regulations.
The ECJ’s decision taken in Luxembourg will now apply across the EU, including the UK.
In its ruling, the ECJ said that a service whose purpose was “to connect, by a means of a smartphone application and for remuneration, non-professional drivers using their own vehicle with persons who wish to make urban journeys” must be classfied as “a service in the field of transport” according to EU law.
The ruling added: “As EU law currently stands, it is for the member states to regulate the conditions under which such services are to be provided in conformity with the general rules of the treaty on the functioning of the EU.”
Prior to the landmark ruling, Uber had said it was confident that an unfavourable ruling would have little impact on its operations across Europe.
A spokesperson told the BBC: “Any ruling will not change things in most EU countries, where we already operate under transportation law.
“However, millions of Europeans are still prevented from using apps like ours. As our new CEO has said, it is appropriate to regulate services such as Uber.
“We want to partner with cities to ensure everyone can get a reliable ride at the tap of a button.”
The ECJ’s ruling comes after Transport for London refused to renew the firm’s operating license in September.
The appeal to renew its London license could take years, said Mayor Sadiq Khan.