Ireland should recover up to €13bn (£11bn) from Apple in back taxes, the European Commission has ruled.
After a three-year investigation, it has concluded that the US firm's Irish tax benefits are illegal.
The Commission said Ireland enabled the company to pay substantially less than other businesses, in effect paying a corporate tax rate of no more than 1%.
Ireland and Apple both said they disagreed with the record penalty and would appeal against it.
Rory Cellan-Jones: EU takes on Apple, Ireland and the US
"Member states cannot give tax benefits to selected companies — this is illegal under EU state aid rules," said Commissioner Margrethe Vestager.
"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," she added.
The standard rate of Irish corporate tax is 12.5%. The Commissions's investigation concluded that Apple had effectively paid 1% tax on its European profits in 2003 and about 0.005% in 2014.
Ms Vestager said that the tax agreement reached between Ireland and Apple meant that the company's taxable profits "did not correspond to economic reality".
'Profound and harmful effect'
Apple said the decision would be harmful for jobs.
"The European Commission has 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 company said in a statement.
"The Commission's case is not about how much Apple pays in taxes, it's about which government collects the money. It will have a profound and harmful effect on investment and job creation in Europe.
"Apple follows the law and pays all of the taxes we owe wherever we operate. We will appeal and we are confident the decision will be overturned."