LUXEMBOURG (Reuters) - The European Union is within its rights to apply carbon taxes to flights between Switzerland and member states although flights to and from other countries outside the bloc are exempt, the EU’s top court said on Wednesday.

A jet, it's vapour trail streaming out behind, flies past the waxing moon over the city of Aarau April 24, 2010. REUTERS/Arnd Wiegmann

The case was brought before the European Court of Justice (ECJ) by Lufthansa-owned Swiss International Air Lines [SWIN.UL]. It argued that its treatment under the EU’s Emission Trading System infringed on the principle of equal treatment under EU law by treating Switzerland differently from other third countries.

The ECJ, however, ruled that the bloc was not obliged to treat all countries outside the bloc in the same way.

The EU ETS - a “cap and trade” system which requires industries to buy permits to pollute - covers flights within the European Economic Area, which comprises EU countries plus Norway, Iceland and Liechtenstein.

Flights from foreign carriers outside the EEA are exempt.

The ECJ, however, ruled that EU law did not obliged the bloc in its external relations to extend equal treatment to all countries outside the bloc

Switzerland, a close trading partner of the EU with a special trading status within the bloc including on climate legislation, is the only nation outside the EEA whose flights are subject to the ETS.

As such, Swiss International Airlines has had to surrender its emissions allowances for flights to and from EEA states and Switzerland. It had sought damages for these carbon permits, worth millions of euros.

In 2012, the EU ordered foreign carriers to buy credits under its ETS but backtracked when countries said it violated their sovereignty and China threatened to cancel plane orders to Airbus Group SE.

In response the EU suspended its plans and a U.N. body, the International Civil Aviation Organization (ICAO), took on the task of devising a carbon tax system for global aviation.

ICAO reached a deal this year that allows carriers to increase emissions without limit as long as they offset them by purchasing carbon credits from designated environmental projects.