In a ruling that is set to anger Washington, the European Commission said the world's most valuable company avoided tax bills on almost all its profits in the bloc under the arrangements with the Irish government.

Ireland has been seeking to attract US multinationals by offering extremely favourable tax conditions, known as sweetheart deals. "The Commission's investigation concluded that Ireland granted illegal tax benefits to Apple, which enabled it to pay substantially less tax than other businesses over many years," EU Competition Commissioner Margrethe Vestager said.

"In fact, this selective treatment allowed Apple to pay an effective corporate tax rate of one per cent on its European profits in 2003 down to 0.005 per cent in 2014," she said in a statement.

Ireland immediately said it would appeal against the decision and Apple is also expected to challenge it. "I disagree profoundly with the Commission's decision," Irish Finance Minister Michael Noonan said in a statement. "The decision leaves me with no choice but to seek cabinet approval to appeal the decision before the European Courts."

The tax repayment order, by far the largest in the EU's history, follows a three-year inquiry into whether Dublin's tax breaks for Silicon Valley titan Apple amount to illegal state aid. Apple has had a base at the southern city of Cork since 1980 and employs 5,000 people in Ireland, through which it routes its international sales, avoiding billions in corporation taxes.

Apple CEO Tim Cook, in a Washington Post interview published August 13, said he hoped to "get a fair hearing" on the matter. "If we don't, then we would obviously appeal it," he added. The US stepped up its fight last Wednesday against the commission's crackdown on tax avoidance by Apple and other multinational companies, accusing it of unilateralism and overstepping its mandate.

In a white paper, the US Treasury said the commission probe into alleged special tax treatment that certain EU countries gave Apple, Amazon, Starbucks and Fiat Chrysler "undermines the international tax system."

The EU has made taxes a core issue since the LuxLeaks scandal in which it was revealed that European Commission President Jean-Claude Juncker's native Luxembourg gave companies huge tax breaks while he was prime minister.

In October Brussels ordered US coffee giant Starbucks and Italian automaker Fiat to each repay up to 30 million euros (USD 34 million) in back taxes to the Netherlands and Luxembourg respectively.

The US has acknowledged the problems around the issue of multinational firms obtaining state aid, in the form of secret and extremely lucrative tax breaks, from Ireland, Belgium and Luxembourg for setting up business in those countries.

But it said those deals were made under international treaties and accepted tax practices.