The European Commission (EC) said Ireland must recover illegal tax benefits of up to €13 billion plus interest granted to Apple for the years 2003 to 2014.

Apple plans to appeal the decision and said it is confident it will be overturned.

The EC ruled that Ireland allowed Apple to pay substantially less tax than other businesses and that this is illegal under EU state aid rules.

According to competition commissioner Margrethe Vestager, who led the probe: “This selective treatment allowed Apple to pay an effective corporate tax rate of 1 per cent on its European profits in 2003 down to 0.005 per cent in 2014.”

In a statement, Apple hit back that the EC “launched an effort to rewrite Apple’s history in Europe, ignore Ireland’s tax laws and upend the international tax system in the process”.

The tech giant added that the case is not about how much it pays in taxes but which government collects the money.

Following an investigation launched in June 2014, the EC concluded that two tax rulings issued by Ireland artificially lowered the tax paid by Apple in Ireland since 1991.

These rulings related to establishing taxable profits for two Irish incorporated companies of the Apple group (Apple Sales International and Apple Operations Europe). This “did not correspond to economic reality” because almost all sales profits recorded by the two companies were attributed to a “head office” which existed only on paper.

The EC added that the tax treatment in Ireland “enabled Apple to avoid taxation on almost all profits generated by sales in the entire EU single market” due to Apple’s decision to record all sales in Ireland rather than in the countries where the products were sold.

This structure is, however, outside the remit of EU state aid control, it said. If other countries were to require Apple to pay more tax on profits of the two companies over the same period under their national taxation rules, this would reduce the amount to be recovered by Ireland, the EC said.

Just last week, the US Treasury Department criticised the probe, saying the investigation into corporate tax breaks threatens to have an “outsized impact” on US firms.