Ride-hailing service Uber suffered a new blow Wednesday as the European Union's top court ruled that it should be regulated like a taxi company and not a technology service, a decision that could change the way it functions across the continent.

The ruling Wednesday by the Luxembourg-based European Court of Justice could affect other technology companies and how they are regulated around the EU, and reflects a larger dilemma about how governments should treat companies that operate online and don't fit in with traditional laws.

The decision stems from a complaint by a Barcelona taxi drivers association, which wanted to prevent Uber from setting up in the Spanish city. The taxi drivers said Uber drivers should have authorizations and licenses, and accused the company of engaging in unfair competition.

San Francisco-based Uber argued that it should be regulated as an information services provider and not a transport company, because it is based on an app that connects drivers to riders.

The court said in a statement that services provided by companies like Uber are "inherently linked to a transport service" and therefore must be classified as "a service in the field of transport" within EU law. It says the EU directive on electronic commerce does not apply to companies like Uber.

The decision could affect such ride-hailing services around the 28-nation EU, where national governments can now regulate services like Uber as transport companies.

Uber has already been forced to adhere to national regulations in some EU countries. In France, for example, Uber's low-cost service involving independent, unregulated drivers is banned, but Uber operates a popular ride service involving licensed drivers that competes with traditional taxis.