The European Commission has ruled that Apple is on the hook for €13 billion ($14.5 billion) in back taxes as its “sweetheart deal” to pay a lower tax rate in Ireland has been characterized as “illegal state aid”.

Apple is going to appeal the ruling and now CEO Tim Cook has penned an open letter, entitled “A Message to the Apple Community in Europe,” in which he explains Apple’s position in this case, writing he is “confident” that the huge tax bill will be reversed.

Cook opens the letter with an explainer on how late Steve Jobs established a factory in Cork, Ireland, in 1980 with 60 employees. Apple now employs nearly 6,000 people in Ireland, most of them in Cork. The Cupertino company is Ireland’s largest taxpayer and the largest taxpayer in the world for that matter.

“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,” reads Cook’s open letter.

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.

The “unprecedented” move on EU’s part, Cook cautioned, could have “serious, wide-reaching implications.”

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.

He then went on to lambast the Commission’s ruling:

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.

Cook’s message can be read in full over at Apple’s website.

According to analysts who spoke with CNBC, the iPhone maker probably won’t end up paying all of its massive Irish tax bill.

In a recent interview with The Washington Post, the Apple CEO reiterated that his company did not receive preferential treatment from Ireland.

“It’s important for everyone to understand that the allegation made in the .U. is that Ireland gave us a special deal. Ireland denies that,” he said. “The structure we have was applicable to everybody—it wasn’t something that was done unique to Apple.”

“It was their law,” Cook told the paper, adding:

And the basic controversy at the root of this is, people really aren’t arguing that Apple should pay more taxes They’re arguing about who they should be paid to. And so there’s a tug of war going on between the countries of how you allocate profits. The way tax law works is the place you create value is the place where you are taxed. And so because we develop products largely in the United States, the tax accrues to the United States.

What’s you position on this topic?

Apple has certainly paid every penny it owed in taxes, but is the European Union right in calling Apple’s sweetheart deal with Ireland “illegal stated aid”?

And if so, should Apple be slapped with a multibillion ruling and what kind of message might that decision send to other U.S. companies, like Google and Microsoft (which also funnel international revenues through a complex network of European tax havens)?