Elizabeth Weise, and Jon Swartz

USA TODAY

SAN FRANCISCO — Apple must pay up to $14.5 billion in back taxes to Ireland, the European Union ruled Tuesday after the bloc's anti-trust arm concluded that the technology firm was given illegal tax benefits over two decades.

“Member states cannot give tax benefits to selected companies — this is illegal under EU state aid rules,” said EU Competition Commissioner Margrethe Vestager.

Vestager said a three-year investigation found Ireland granted such lavish tax breaks to Apple over many years. She said the multinational’s effective corporate tax rate on its European profits dropped from 1% in 2003 to a mere 0.0005% in 2014.

Apple shares (AAPL) fell nearly 1% in morning trading.

Apple to hold event on Sept. 7; new iPhone, Watch expected

In a letter addressed to customers and published Tuesday, Apple says the EU's decision will have "serious, wide-reaching implications."

"In Ireland and in every country where we operate, Apple follows the law and we pay all the taxes we owe," read an excerpt of Apple's letter.

Irish authorities have vowed to fight the finding, and the U.S. government has disputed the EU's position.

“Ireland’s position remains that the full amount of tax was paid in this case and no state aid was provided,” the Irish government said in a statement. “Ireland does not do deals with taxpayers.”

Apple and other major U.S. firms including Google and Microsoft hold stockpiles of what's known as indefinitely reinvested foreign earnings, or revenue not subject to U.S. corporate income tax, outside the U.S. The 10 firms with the largest holdings collectively have $724 billion in this revenue outside the U.S., a USA TODAY report found.

The EU has been investigating possible tax avoidance by multinational firms since June 2014. Under current EU rules, member countries cannot give aid that grants companies or sectors an unfair advantage.

A ruling by the European Commission in October that a tax arrangement between Starbucks and the Netherlands was illegal is currently on appeal to the EU General Court, as is a similar ruling against Fiat in Luxembourg. An EU investigation into tax agreements between Amazon and Luxembourg is still awaiting a final decision.

Apple issues security update to prevent iPhone spyware

In a statement, a spokesperson for the U.S. Treasury Department says the agency is "disappointed" with the EU's ruling. "The Commission’s actions could threaten to undermine foreign investment, the business climate in Europe, and the important spirit of economic partnership between the U.S. and the EU," reads the Treasury statement.

The European island offers the lure of minimal regulation and significantly lower corporate tax rates (12.5% vs. 35% in the U.S.), a major reason why top U.S. tech companies — including Apple, Google, Amazon, Facebook, Yahoo, Microsoft, Twitter and eBay — have corporate facilities in Ireland, where they employ thousands.

Apple employs about 5,500 workers in Cork, Ireland, where it is the largest private sector employer.

Apple could win in Uber-Didi deal