Amazon scored a major legal victory on Wednesday when an EU court annulled an order from the bloc's powerful antitrust authority that Luxembourg recoup 250 million euros ($295 million) in back taxes.

The decision handed a fresh defeat to EU competition supremo Margrethe Vestager who in 2017 accused Luxembourg of handing tax privileges to the internet retail giant that amounted to illegal state aid.

But the EU General Court found "no selective advantage" had been given to the firm by the small EU Duchy, a statement said.

The setback for the EU lands less than a year after iPhone maker Apple won its appeal in the same court against the European Commission's blockbuster order in 2016 that the US company repay Ireland 13 billion euros.

French energy giant Engie meanwhile lost its appeal on Wednesday in the same court against a similar EU order to repay Luxembourg 120 million euros in taxes.

In that case, the EU's General Court said the commission did demonstrate a tax advantage by Luxembourg to the company.

The cases came in the wake of the 2014 LuxLeaks revelations that unearthed secret deals between Luxembourg and hundreds of companies guaranteeing super-low tax bills.

In the Amazon case, Vestager accused Luxembourg of an illegal deal with the internet giant to pay less tax than other businesses.

In a statement, Amazon said "we welcome the Court's decision, which is in line with our long-standing position that we followed all applicable laws and that Amazon received no special treatment".

Luxembourg also welcomed the court decision on Amazon and said it would "reserve all rights" to a possible appeal in the Engie case.

Historically used as a hub for multinationals seeking lower tax bills, Luxembourg pointed to "numerous reforms in recent years to combat tax evasion and fraud".

EU competition supremo Margrethe Vestager had accused Luxembourg of handing Amazon tax privileges but the court ruled in the web retail giant's favour
EU competition supremo Margrethe Vestager had accused Luxembourg of handing Amazon tax privileges but the court ruled in the web retail giant's favour AFP / DENIS CHARLET

"The judgments do not call into question Luxembourg's commitment to transparency in tax matters and the fight against tax avoidance practices," a statement added.

Vestager said neither decision questioned the principle that member states must tax companies "in respect of EU law, including state aid rules," a statement said.

The EU "will carefully study the judgment and reflect on possible next steps", while continuing to use "all tools at its disposal to fight unfair tax practices," she said.

At the heart of the case was a violation of the so-called "arm's length principle", which for tax purposes is meant to ensure that transactions between subsidiaries are based on prices other companies would pay.

The court said that the EU's methods for calculating the advantage was "based on an analysis which is incorrect in several respects," the statement said.

Win or lose, the commission is convinced its cases have had a positive effect, with international reforms currently under way to close tax loopholes.

In recent weeks, the United States has embraced the idea of a global minimum corporate tax that would make special deals offered to multinationals a thing of the past.

Talks are ongoing at the OECD to decide on the minimum tax that if confirmed would likely see higher taxes for US tech giants and other multinationals.

The EU has had trouble defending its tax decisions, losing in court against Apple, but also in a case against Starbucks and the Netherlands.

These setbacks are "a stark reminder of how difficult it is to use state aid rules to collect taxes," said Tove Maria Ryding, a tax justice expert at Brussels-based NGO Eurodad.

"We urgently need to start treating the underlying disease, which is a deeply outdated and ineffective corporate tax system," she said.

The commission appealed the EU General Court's decision in the Apple case, which will now go to the EU's highest body, the European Court of Justice.