The bill is getting quite expensive as the European Commission has just released a statement saying that Apple has benefited from illegal tax benefits in Ireland for its European operations. The commission says that Ireland must recover the “illegal aid” — it is worth $14.5 billion (€13 billion).

The debate over European taxes has been an ongoing issue for the past few years. While it’s not illegal to choose Ireland as your main country for your European headquarters, Ireland has gone one step further and granted tax benefits for Apple specifically. This is unfair for other companies headquartered in Ireland and Commissioner Margrethe Vestager has decided that it’s illegal and Apple must repay these tax benefits.

“Member States cannot give tax benefits to selected companies – this is illegal under EU state aid rules,” Vestager wrote. “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. In fact, 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 particular, Apple has optimized its tax structure by creating a company that only exists on paper. Apple Sales International and Apple Operations Europe, two Irish-based subsidiaries of Apple Inc., attributed the vast majority of their profit to a “head office.” This head office isn’t based in any country on earth, under the sea, or anywhere. So this profit remained untaxed for year, greatly lowering the effective tax rate.

While the total amount of the fine isn’t clear just yet, the European Commission says that Apple has benefited from $14.5 billion in tax benefits. The Commission has the power to fine Apple for a ten-year period preceding the first request for information in 2013. So Apple is getting fined for the period from 2003 to 2014 and also owes interests. Apple and the Irish government could negotiate a deal and the company could end up paying less than that. Apple will also probably contest the decision. Apple changed its structure in Ireland in 2015, so the company now complies with the taxation law in Europe.

Update: Tim Cook has written a letter on today’s decision.

“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 opinion issued on August 30th alleges that Ireland gave Apple a special deal on our taxes,” Cook wrote. “This claim has no basis in fact or in law. We never asked for, nor did we receive, any special deals. We now find ourselves in the unusual position of being ordered to retroactively pay additional taxes to a government that says we don’t owe them any more than we’ve already paid.”

Cook even says that it sets a bad precedent for EU member states (Ireland is still getting billions of dollars though…). “The Commission’s move is unprecedented and it has serious, wide-reaching implications. It is effectively proposing to replace Irish tax laws with a view of what the Commission thinks the law should have been,” Cook wrote. “This would strike a devastating blow to the sovereignty of EU member states over their own tax matters, and to the principle of certainty of law in Europe. Ireland has said they plan to appeal the Commission’s ruling and Apple will do the same. We are confident that the Commission’s order will be reversed.”

Of course, Apple already has a ton of money outside of the U.S., sitting there and doing nothing. During its last earnings report, the company reported $231.5 billion in cash on hand. A significant portion of this big pile of cash is unrepatriated foreign earnings as the U.S. taxes foreign profit just like domestic profit. Paying back Ireland shouldn’t be an issue.

But today’s decision still raises an important question. Should the European Commission chase companies that build complicated schemes to lower their effective tax rates in Europe? Or should the European Union harmonize its corporate tax structure so that companies pay the same amount in all European countries?

Today’s fine is the result of an investigation that started in June 2014. Other American companies are currently being investigated for tax non-compliance — Google’s parent company Alphabet, Starbucks and McDonald’s could be next.

Update Here’s Tim Cook’s full letter:

Thirty-six years ago, long before introducing iPhone, iPod or even the Mac, Steve Jobs established Apple’s first operations in Europe. At the time, the company knew that in order to serve customers in Europe, it would need a base there. So, in October 1980, Apple opened a factory in Cork, Ireland with 60 employees. At the time, Cork was suffering from high unemployment and extremely low economic investment. But Apple’s leaders saw a community rich with talent, and one they believed could accommodate growth if the company was fortunate enough to succeed. We have operated continuously in Cork ever since, even through periods of uncertainty about our own business, and today we employ nearly 6,000 people across Ireland. The vast majority are still in Cork — including some of the very first employees — now performing a wide variety of functions as part of Apple’s global footprint. Countless multinational companies followed Apple by investing in Cork, and today the local economy is stronger than ever. The success which has propelled Apple’s growth in Cork comes from innovative products that delight our customers. It has helped create and sustain more than 1.5 million jobs across Europe — jobs at Apple, jobs for hundreds of thousands of creative app developers who thrive on the App Store, and jobs with manufacturers and other suppliers. Countless small and medium-size companies depend on Apple, and we are proud to support them. As responsible corporate citizens, we are also proud of our contributions to local economies across Europe, and to communities everywhere. As our business has grown over the years, we have become the largest taxpayer in Ireland, the largest taxpayer in the United States, and the largest taxpayer in the world. Over the years, we received guidance from Irish tax authorities on how to comply correctly with Irish tax law — the same kind of guidance available to any company doing business there. In Ireland and in every country where we operate, Apple follows the law and we pay all the taxes we owe. 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 opinion issued on August 30th alleges that Ireland gave Apple a special deal on our taxes. This claim has no basis in fact or in law. We never asked for, nor did we receive, any special deals. We now find ourselves in the unusual position of being ordered to retroactively pay additional taxes to a government that says we don’t owe them any more than we’ve already paid. The Commission’s move is unprecedented and it has serious, wide-reaching implications. It is effectively proposing to replace Irish tax laws with a view of what the Commission thinks the law should have been. This would strike a devastating blow to the sovereignty of EU member states over their own tax matters, and to the principle of certainty of law in Europe. Ireland has said they plan to appeal the Commission’s ruling and Apple will do the same. We are confident that the Commission’s order will be reversed. At its root, the Commission’s case is not about how much Apple pays in taxes. It is about which government collects the money. Taxes for multinational companies are complex, yet a fundamental principle is recognized around the world: A company’s profits should be taxed in the country where the value is created. Apple, Ireland and the United States all agree on this principle. In Apple’s case, nearly all of our research and development takes place in California, so the vast majority of our profits are taxed in the United States. European companies doing business in the U.S. are taxed according to the same principle. But the Commission is now calling to retroactively change those rules. Beyond the obvious targeting of Apple, the most profound and harmful effect of this ruling will be on investment and job creation in Europe. Using the Commission’s theory, every company in Ireland and across Europe is suddenly at risk of being subjected to taxes under laws that never existed. Apple has long supported international tax reform with the objectives of simplicity and clarity. We believe these changes should come about through the proper legislative process, in which proposals are discussed among the leaders and citizens of the affected countries. And as with any new laws, they should be applied going forward — not retroactively. We are committed to Ireland and we plan to continue investing there, growing and serving our customers with the same level of passion and commitment. We firmly believe that the facts and the established legal principles upon which the EU was founded will ultimately prevail. Tim Cook

Update: And here’s Apple’s official statement: