On Wednesday, the General Court of the European Union will give its ruling in the appeal by Ireland and Apple against the European Commission's €13bn tax ruling.

It will be an extremely keenly watched decision with potentially far reaching consequences for all the parties involved.

What is this all about?

The case dates back seven years to a 2013 appearance by Apple's boss Tim Cook before a US Senate committee.

At the hearing, intense scrutiny was applied to Apple's tax arrangements.

The company was accused of sheltering billions of dollars in profits in "ghost companies" here that didn't pay tax elsewhere and Ireland was labelled a "tax haven" by senators.

This prompted the European Commission to begin an in-depth investigation into Apple’s tax affairs in Ireland a year later.

EU Commissioner for Competition Margrethe Vestager speaks at a news conference in Brussels in 2017

So what did it find?

In 2016, the Commission concluded that two tax rulings in 1991 and 2007 issued by Revenue to Apple had "substantially and artificially lowered the tax paid by Apple in Ireland since 1991".

The Commission’s claim was that these rulings rubber-stamped a method of determining the taxable profits for two companies based in Ireland - Apple Sales International and Apple Operations Europe - which were managed from outside Ireland and were responsible for all Apple's sales outside of the Americas.

The Commission found that the Revenue determinations did not correspond to economic reality, because almost all the profits recorded by the two companies were attributed internally by Apple to a "head office".

However, the Commission concluded that the head office only actually existed on paper, and as a result could not have generated such profits.

These profits were not, as a result, subject to tax in any country under specific provisions of the Irish tax law which are no longer in force, it found.

As a result, it said, Apple only paid an effective corporate tax rate that declined from 1% in 2003 to 0.005% in 2014 on the profits of Apple Sales International.  

The Commission argued that the intellectual property value of the products being sold through the Irish companies should have been attributed to those firms and as a result, so should the profits on them.

So what? Apple is a big employer, still pays lots of tax and makes useful products?

Under EU state aid rules it is illegal for any country to give preferential treatment to one company over another when they are both subject to the same tax rules in that state.

The Commission’s ruling in effect stated that Apple was getting such selective treatment.

The effects of that went wider than Ireland though.

Apple was, according to the Commission’s analysis, booking all its sales across the EU in Ireland, rather than in the countries where the iPhones, iPads, etc were being sold.

The tech giant was therefore able to avoid paying tax on nearly all of those profits generated on sales made elsewhere in the union.

That’s why the Commission said Ireland had to recover €13.1bn in unpaid taxes covering an 11-year period between 2003 and 2014.

Oh, and the €1.2bn interest as well.

There was no fine though. The money being sought was just the unpaid taxes on the profits at the full corporation tax rate here over the period in question.

Why did the period in focus end in 2014?

Because Apple changed its structures in 2015.

This meant that the controversial tax rulings from 1991 and 2007 that the Commission had the problem with were no longer in play.

What happened then?

For obvious reasons Apple wasn’t happy with the ruling.

It has stated repeatedly that it pays all the taxes it owes everywhere it has operations.

Apple CEO Tim Cook wrote in a letter to customers in August 2016, that over the years it had received guidance from the tax authorities here about how it could comply correctly with the Irish tax law.

"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," he claimed.

Apple boss Tim Cook

He also alleged that the EU's claim had no basis in fact or in law as Apple had never asked for, nor was it given, any special deals.

Mr Cook also claimed that the Commission was, in effect, proposing that Irish tax laws be replaced 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," he pointedly wrote.

The knock-on effect of this, he warned, would be a profoundly harmful effect on investment and job creation in Europe.

And why was the Irish Government also concerned by the ruling?

For the same reason as Tim Cook identified above.

One of Ireland’s big calling cards when it comes to Foreign Direct Investment (FDI) is the low corporation tax rate, which has remained unchanged and sacrosanct for many years now.

That rate and stability is seen as very attractive to companies thinking of investing here and those that are already here.

Taking away that certainty or calling into question the basis upon which many firms have built sizeable operations here is not good for business.

As well as that, Apple itself is Ireland's largest individual taxpayer and employs 6,000 people here.

So they appealed, right?

Yes, both Apple and Ireland appealed the ruling to the European courts, starting with the lower court - the General Court of the European Union.

The case was heard over two days in September of last year.

Apple argued that the European Commission's order "defies reality and common sense" and represented an attempt to "retrofit" tax laws.

It also accused the Commission of seeking headlines by "quoting tiny numbers" around the amount of tax paid by the company.

Apple's argument is that the two Irish registered companies, while important to its sales and distribution operations, were not the elements of the organisation that were generating the intellectual property, through design, development and engineering.

They were therefore not creating the bulk of the value. This was instead being generated mostly through the US, and therefore the profits should be taxed there.

Until recently, US tax rules meant that payment of such tax could be deferred, and Apple was taking advantage of that.

But those rules changed in 2017 and in 2018 Apple began paying $37bn in tax on foreign profits to the US as a result.

Some $21bn of this relates to the time period being covered by the Commission's decision.

For its part, the Irish Government told the court the decision was fundamentally flawed and interfered with its sovereignty by seeking to override national law.

It was represented in court by Paul Gallagher, now the Attorney General, who claimed the Commission hadn't shown one example of another company which has been treated less favourably than Apple.

He said what was at stake was Ireland's reputation and it had been severely criticised.

Will the decision on Wednesday be the end of the matter then?

Not by a long-shot.

It is pretty much universally accepted that when the five-judge court delivers its decision on Wednesday, it will be appealed by the losing side to the higher court.

Whoever that is will have two months and ten days to lodge the appeal.

Conventional wisdom says it will probably be another 18 months to two-and-a-half years before that appeal is dealt with and a decision issued, depending on how fast things move in the notoriously slow Court of Justice of the European Union.

The appeal can only be made on a point of law.

But couldn't we do with €13bn right now?

Absolutely we could.

The economic shock brought about by the Covid-19 pandemic has left a gaping hole in the public finances this year and upended the Exchequer's planned budgetary arithmetic for the year.

Some politicians here and others have long been advocating that far from challenging the European Commission's decision Ireland should instead be grabbing the money from Apple and putting it to good use.

That argument has perhaps gained increased currency in the last three months.

But others would argue that doing so would do untold long-term damage to Ireland's reputation and prove extremely costly.

And where is the money in the meantime?

Sitting in a so-called "escrow" account - in effect a holding account.

It was set up in 2018. Apple put €14.3bn into it - the €13.1bn in alleged unpaid taxes, plus interest of €1.2bn.

It is being managed by Amundi, BlackRock Investment Management and Goldman Sachs Asset Management.

They are making low-risk investment decisions and the Irish taxpayer is protected from any losses. 

But in 2018, it declined in value by €16 million and last year it reduced by a further €249m, with €209m of that going as a tax payment to a third country.

If the Commission's decision is eventually upheld by the appeal court, will Ireland get all €14bn?

If the Commission's ruling is found to be valid, then the money would be owed to Ireland.

However, the Commission previously stated that the amount Revenue would receive could be reduced if other EU countries were also to require Apple to pay more taxes on the profits recorded by its entities in their territories for the same period.

That seems to be what happened last year with the €209m payment, although exactly where that money went is unclear.

There is also a question around what the implications would be of the fact that Apple has now paid tax in the US on some of the profits concerned.

If the court appeal process goes against the company, then it is possible that it could claim a credit in the US for any money paid in Europe, in order to offset what it has already paid in the US.

But a lot of water has to pass under the bridge before we get to that point and the next important milestone in this fascinating high stakes saga is Wednesday.