The European Court of Justice has scrapped an earlier decision made by the European Commission (EC) in 2017 that stated Amazon (AMZN) has to pay Luxembourg €250m (£214m, $303m) in unpaid taxes.
"The contested decision should be annulled in its entirety," the court said on Wednesday.
"The commission did not prove to the requisite legal standard that there was an undue reduction of the tax burden of a European subsidiary of the Amazon group," it added.
The EC had earlier said it found that over the period May 2006 to June 2014, the Grand Duchy allowed the retail giant to move a big chunk of its profits from a subsidiary to a holding company without paying tax.
WATCH: Amazon wins court fight over $300m EU tax order
“Luxembourg gave illegal tax benefits to Amazon. As a result, almost three quarters of Amazon’s profits were not taxed,” the EU’s competition commissioner Margrethe Vestager said in an October 2017 statement.
Amazon then appealed the EC ruling, saying its case contained legal and factual errors.
Among Amazon’s arguments was that the deal was agreed with Luxembourg in 2003, which meant the 10-year limitation period had expired.
At the time, Amazon said it did "not receive any special treatment from Luxembourg and that we paid tax in full accordance with both Luxembourg and international tax law."
Separately, the court upheld the EU's verdict that French energy giant Engie must repay Luxembourg €120m in taxes.
Both cases comes in the wake of revelations in 2014 that revealed Luxembourg made deals with hundreds of companies, guaranteeing them super low tax bills.
Earlier this week, a decision of the EC requiring Fiat Chrysler to repay about €30m to Luxembourg was appealed by the Irish government, a third party in this case.
Last year, Apple (AAPL) won an appeal in the same court against the European Commission's order in 2016 that Apple repay Ireland €13bn.