On Tuesday the latest twist in the long-running Apple-Ireland state aid debacle will take place.

That's when the Court of Justice of the European Union (CJEU) will hear the European Commission's appeal in the case.

It follows the 2020 ruling of the EU's General Court overturning the commission’s 2016 finding that Apple had underpaid €13.1 billion in tax due to Ireland between 2003 and 2014.

Remind me of the background to this case?

The origins can be traced back 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 by senators of sheltering billions of dollars in profits in "ghost companies" in Ireland that did not pay tax elsewhere.

Ireland was even labelled a "tax haven" – a serious accusation which has been repeated by some critics of our tax regime since then.

The European Commission were watching and subsequently began an in-depth investigation into Apple’s tax affairs in Ireland a year later.

And the outcome of that was the eye-wateringly large tax ruling?

Yes, following a lengthy probe, in 2016 the commission found 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".

It was the commission's view that these determinations in effect 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.

In its ruling, the commission claimed 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".

But the commission concluded the head office only actually existed on paper and as a result could not have generated such profits.

This was a problem because it is illegal under long-established EU state aid rules 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 effects of that went wider than Ireland though.

According to the commission, Apple was booking all its sales across the EU in Ireland, rather than in the countries where its iPhones, iPads, etc were being sold.

In the process, it did not have to pay tax on almost all of the profits, it was alleged.

The result, the commission declared, was that Apple owed €13.1 billion in unpaid taxes to Ireland for the period between 2003 and 2014 (when Apple changed its structures), as well as €1.2 billion in interest.

Did Apple appeal?

Yes Apple, and Ireland, were not happy with the findings and decided to appeal the ruling.

Apple strenuously denied at the time that it had any kind of a special deal and has maintained then and since in the strongest possible terms that it pays the tax it owes everywhere it operates.

"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," wrote CEO Tim Cook in a public letter in August 2016.

And he warned that the impact could be a profoundly harmful effect on investment and job creation in Europe.

Concerned about the external perception of the country, the Government also took the decision to appeal the ruling.

Ireland has long been criticised by some outsiders over its 12.5% corporation tax rate, which has proven to be the bedrock for foreign direct investment (FDI) for decades.

The view, therefore, in Government circles was that anything that questioned the basis of the country's tax policy may not be good for future investment.

It also had to be seen to back Apple, which pays more tax here each year than any other organisation or individual.

What was the outcome of that appeal?

The case was heard over two days in September of 2019 by the General Court of the EU.

And the following July the court delivered its decision, annulling the commission's findings.

The court found the commission was wrong to declare that Apple Sales International and Apple Operations Europe had been granted a selective economic advantage and, by extension, State aid.

It said the commission failed to show "to the requisite legal standard" that Apple enjoyed preferential treatment which amounted to illegal state aid.

But the commission did not accept the decision and in September 2020 said it would lodge an appeal.

Commissioner Margrethe Vestager claimed the court had made a number of "errors of law".

"The General Court judgment raises important legal issues that are of relevance to the commission in its application of state aid rules to tax planning cases," she stated at the time.

Commissioner Margrethe Vestager

"The commission also respectfully considers that in its judgment the General Court has made a number of errors of law."

"Making sure that all companies, big and small, pay their fair share of tax remains a top priority for the commission. The General Court has repeatedly confirmed the principle that, while member states have competence in determining their taxation laws, they must do so in respect of EU law, including state aid rules," she added.

Fast forward almost three years and the Court of Justice is now about to hear that appeal.

Do we know what either side is likely to argue?

The European Commission has said little publicly about the grounds upon which it plans to appeal to the CJEU.

However, only appeals on points of law can be brought before the court.

On the other hand, Apple expects the commission's focus will have to be on the facts of the case, as the tech firm does not believe there is a legal basis for the appeal to succeed.

Apple continues to hold the view that the case is not about how much it owes, but where it owes it.

Ireland is also a party to the appeal, although it will have a separate legal team to Apple.

Ahead of the oral hearing, the Department of Finance said the Government still believes the decision of the General Court is the correct one.

"Ireland has always been clear that the correct amount of tax was paid and that Ireland provided no State aid to Apple," it said in a statement.

It is expected that the hearing will take a couple of days.

The Advocate General's non-binding opinion is then likely to be delivered between three to six months later, with the final binding ruling from the court not likely until up to 12 months after the appeal is heard.

What about the €13.1 billion? Where is that now?

Well including the interest, the figure is actually more like €14.3 billion.

Following the original commission ruling the money was paid over by Apple in 2018 into an escrow or temporary third-party holding account.

The objective of the investment policy is to preserve the capital value of the escrow fund to the greatest extent possible in light of the prevailing market conditions.

The agreed risk appetite for the escrow fund is "low", with investments permitted only in securities that have a low degree of risk, such as highly rated fixed income securities of short to medium-term duration.

The most recent available data for the value of the fund dates back to December 31 2021, when it was worth €13.635 billion, down from €13.986 billion at the end of 2020.

The reduction was the result of negative interest rates in place at the time, which cost €105m, and a "third country adjustment" of €246m caused by Apple being found liable to pay some tax on the same profits for the same period to another country.

If the commission wins its case, the money in the escrow goes to the exchequer here - which would represent an extraordinary further windfall at a time when the State’s coffers are predicted to be awash with cash.

If the commission loses, the money goes back to Apple.

In the meantime though, the big winners from this situation are the escrow fund managers, who in 2021 were paid €6m.

And, of course, the lawyers.