The European Commission has ordered Amazon to pay €250m (£222m) after finding that it benefited from an illegal tax arrangement with Luxembourg.

The decision follows a three-year investigation into the retailer’s tax payments launched by the commission in 2014 – specifically Luxembourg’s tax treatment of two Amazon companies: Amazon EU and Amazon Europe Holding Technologies.

The European Commission said the tax deal had enabled Amazon to shift the “vast majority” of its profits from Amazon EU to Amazon Europe Holding Technologies, which was not subject to tax, “significantly” reducing Amazon’s taxable profits.

It concluded that Amazon avoided taxation on “three-quarters of the profits it made from all Amazon sales in the EU” as a result.

Amazon denied it owed any back taxes.

A spokesman for the etailer told the BBC: “We believe that Amazon did not receive any special treatment from Luxembourg and that we paid tax in full accordance with both Luxembourg and international tax law.

“We will study the commission’s ruling and consider our legal options, including an appeal. Our 50,000 employees across Europe remain heads-down focused on serving our customers and the hundreds of thousands of small businesses who work with us.”

However, commissioner Margrethe Vestager, who oversees competition policy, said: “Amazon was allowed to pay four times less tax than other local companies subject to the same national tax rules.

“This is illegal under EU state-aid rules. Member states cannot give selective tax benefits to multinational groups that are not available to others.”

The commission also plans to take Ireland to court over its failure to collect €13bn of back taxes from Apple.