BRUSSELS, Belgium -- The European Union's highest court says airlines are allowed to charge passengers an extra fee for checking in luggage.

The Court of Justice ruled Thursday that "checked-in baggage cannot be considered to be compulsory or necessary" for carrying passengers, thus granting carriers the right to charge a supplement.

The Luxembourg-based judges found a Spanish law prohibiting such luggage surcharges violates European law because it prohibits airlines from charging for what represents a "complementary service."

Luggage surcharges coming on top of cheap airfares are common with Europe's burgeoning budget airlines such as Ryanair and Easyjet.

The 28-nation bloc's top court said a Spanish consumer protection authority was wrong to fine Vueling Airlines for demanding a luggage surcharge of 40 euros ($52) for a round-trip between Spain and the Netherlands.