Amazon has won a court battle over €250m (£215m) in taxes it had been ordered to pay Luxembourg.
The European Commission had ordered the tech giant to repay the funds as back taxes, alleging that Amazon had been given unfair special treatment.
But the EU’s General Court overturned that order, finding it had been given “no selective advantage”.
Amazon said the decision was “in line with our long-standing position that we followed all applicable laws”.
“We’re pleased that the court has made this clear, and we can continue to focus on delivering for our customers across Europe,” the company said in a statement.
The contentious order dates back to 2017, when the European Competition Commissioner, Margrethe Vestager, had turned her attention to tech giants and their tax arrangements in some EU countries.
The European Commission had alleged that the tax deal amounted to state aid for the company – something which breaks the rules of the EU’s internal market.
Both Amazon and the country of Luxembourg went to court to have the decision overturned.
“None of the findings set out by the Commission in the contested decision are sufficient to demonstrate the existence of an advantage,” the court said in a statement.
“The contested decision must be annulled in its entirety.”
A much larger tax bill for a similar case with Apple in Ireland – involving €13bn (£11.6bn) – was also overturned last year. The Commission lodged an appeal in September.
Europe to fight Apple 13bn euro tax bill decision
Amazon charged with abusing EU competition rules
It is not yet clear if the EU will appeal against the latest Amazon ruling.
In a statement, Margrethe Vestager said: “All companies should pay their fair share of tax.”
She said the Amazon-Luxembourg deal meant “three-quarters of the profits made from all Amazon sales in the EU went untaxed until 2014”.
“We will carefully study the judgment and reflect on possible next steps.”
The court also ruled separately on French energy firm Engie, which had been ordered to pay €120m (£103m) back to Luxembourg. The court upheld that decision.
Despite the setbacks, the Commission’s pressure on tech giants to pay more tax has indirectly led to changes in tax systems used by some EU members.
An international effort involving the Organisation for Economic Cooperation and Development (OECD) is also aiming to establish a set of common international rules on how multinational corporations should be taxed.
That could apply to the major tech giants, and has led to friction between some European countries and the United States, where many of the companies are based.
In January, both France and the UK decided to delay the introduction of a planned “tech tax” while the OECD negotiations continue.