Most of us know that when you're in a hole, the best thing you can do is stop digging.  But not, it seems, the Irish government.  

Since the EU finding last week that Apple owes Ireland an astonishing €13 billion in unpaid tax, our politicians have been digging themselves deeper and deeper into the dirt.   

Rather than facing up to fact that we have been caught red handed running a tax regime for multi-nationals that would make a Caribbean tax haven jealous, our leaders have been lining up to attack the messenger.  They can't attack the message, you see, because behind all the faux outrage they know it's the truth.  

That message was delivered last week with devastating clarity by the EU Competition Commissioner Margrethe Vestager (you can find the video of her press conference on the internet) when she presented the report of a three year investigation by the EU Commission. In forthright, simple language she explained what had been going on in Ireland.

And in spite of all the complicated blustering since then by Irish politicians, they don't have an answer to the fundamental case she has made.

What the EU report said is that for two decades Ireland had enabled Apple to make vast profits on much of their global sales outside the US while paying little or no tax.  Sales of Apple products across Europe, the Middle East, Africa and India were booked in two Apple companies based in Ireland, Apple Sales International (ASI) and Apple Operations Europe (AOE).  

These two companies were incorporated in Ireland, but they were not tax resident here.  So, although Apple did pay some tax here relating to sales and operations in Ireland, no tax was paid on the billions in profits from sales in all the other countries around the world that were routed through here.  

In fact, from a tax point of view, these two Apple companies based in Ireland were stateless, so they paid little or no tax anywhere on their billions in profits. This set up was approved by the Irish Revenue Commissioners in two tax rulings in 1991 and 2007 following submissions by Apple. 

What was in play here was a version of the infamous "Double Irish" tax loophole which was closed two years ago because of mounting pressure from the EU and the U.S.  In the EU's judgment, what Ireland did for Apple amounted to state aid for a particular company which is illegal under the EU laws on fair competition.   

There have been similar cases involving other companies in the EU already and more are under investigation involving not just Ireland but countries like Holland and Luxembourg.  So the claim that Ireland has been singled out is wrong.  

What is different in the Apple case, however, is the phenomenal global success of Apple products and the vast scale of the resulting profits routed through Ireland on which almost no tax was paid.  That is where the stunning figure of €13 billion in back tax (plus another €6 billion in interest that has to be paid) came from.  

The essence of what was going on here really is that simple, in spite of the attempts by Apple, the Irish government, the IDA (the body that attracts foreign companies into Ireland) and others here with vested interests to go off on tangents, blind us with figures and try to make it too complicated for ordinary people to understand.   

The authorities here expected that the EU investigation was going to be negative for Ireland, but the supposition was that Apple would be forced to pay at most a few hundred million in back taxes and probably a lot less than that.  So when it was announced last week that the figure was actually €13 BILLION (and close to €20 billion when interest is added) the shock in official circles here was palpable.

The reputational damage done to Ireland is enormous, since it has exposed something we have always denied: Ireland was — and to a significant degree still is —  a tax haven.  

The reaction here was one of shock, dismay, and then contrived outrage. The government, after an initial wobble, decided to appeal the decision in the European courts and Apple is to do the same.  

The main opposition party here, Fianna Fail, is supporting the decision to appeal, which is no surprise since much of this mess was made on its watch.  (Bertie Ahern was finance minister in 1991 and taoiseach in 2007, the years when the key tax rulings for Apple were made here.)  

The present Minister for Finance Michael Noonan was the first to react to the report last week, saying that this was an attack by the EU on Ireland and set a dangerous precedent for other small countries in Europe.  

This was a bit strange coming from Noonan, who has habitually referred to the EU as "our friends in Europe."  Now suddenly they are our enemy and are launching an attack on us!  

Without a hint of irony (given that the EU report says Apple paid just 0.05 percent tax in 2011 and 0.005 percent (!) in 2014 on the global profits it routed through Ireland), Noonan claimed that the investigation was really an attack on our 12.5 percent corporate tax rate.  He said the EU was trying to take away our sovereign right to set our own tax rates, even though that is outside their powers.   He also defended the Irish Revenue Commissioners, saying that neither they nor anyone else here had done anything illegal.  

All of which, of course, is a textbook example of trying to defend the indefensible by ignoring the basic accusation that has been made.

Vestager made it clear that we had collected only a tiny fraction of the 12.5 percent corporate tax we claim to apply.  She pointed out that the two "head office" Apple companies in Ireland, ASI and AOE, had "no employees, no premises and no real activities."  And since they were not tax resident here, the vast profits from the intellectual property assigned to them by Apple meant that virtually no tax was paid by them in Ireland.  

Instead of dealing directly with this, Noonan was fulminating about our 12.5 percent tax rate being the real target and said that this was an attack on the sovereign rights of a small nation.  We had to defend the principle of setting our own tax rates, he said, and therefore we had no choice but to appeal the ruling.  

The Revenue Commissioners, which allowed the Apple tax structure here, said they can't comment on individual cases, as if they were talking about Paddy the plumber rather than one of the biggest companies on earth! 

Apple boss Tim Cook joined in as well, disputing the EU figures and claiming that it did not account for taxes paid elsewhere.  Apple did not do anything illegal, he said.  The company was all about doing the right thing and pays all taxes that are due, not just in Ireland, but everywhere else.  

But Cook's laid back reassurance is actually very carefully phrased and is selectively constructed to bolster Apple's position.

He said, for example, that Apple had "made provision" for several billions in taxes on activities that had been routed through Ireland in 2014.  That sounds good, but "making provision" does not mean you end up paying all, or any, of it.   

All of this is playing very badly with ordinary taxpayers here who can't believe what they are hearing.  Small businesses here are crucified with tax and red tape, and individual taxpayers have been squeezed to breaking point since the financial collapse, with single people entering the top tax rate (close to 50 percent) on anything they earn over €34,000 a year.    

Following the collapse, while Apple was still on a tax holiday here, the Irish government was raiding individual private pension pots to raise money, as well as piling various new taxes on ordinary workers.  Yet we are now being told that we have to turn down €13 billion in unpaid tax that Apple owes us, money that could be used to reduce the national bailout debt and thereby ease the individual tax burden. And we have to do this on a point of principle! 

We know that other countries where Apple was generating its vast profits will have a claim to a share in this tax bonanza, but even if we end up with a few billion, it would make a big difference to people in Ireland.  

None of this will be decided until the appeals are concluded and, given the complexity and secrecy of Apple's affairs, that is likely to take four or five years.  No doubt the matter will be discussed frequently in this column in the months and years ahead. 

What will also emerge in the months ahead, hopefully, is how many other multi-national companies here have similar sweetheart tax deals in Ireland.

Why do so many of these global giants have their European HQs in Ireland?   Is it really our young workforce or is it all about the money?   Do we really have to prostrate ourselves like this to get the multi-national jobs we want to attract to Ireland?

Right now, what is hard for the average tax paying citizen in Ireland to take is the attitude of the authorities here to the Apple case. Our politicians may insist that we did nothing illegal, but there is no doubt that we facilitated one of the biggest tax scams in corporate history.  

It doesn't matter whether Cook can show that the figures are out by a few hundred million here or there.  There are billions in unpaid taxes in question and there is no doubt about that, whether the money ends up in Ireland, in Europe or the U.S.   

Rather than face up to it, we are now going to appeal the EU ruling, presumably on the basis that it's none of the EU's business what we do on tax. We are doing so because we are terrified of falling out of favor with the multi-nationals.  

But it will be very hard to sustain the argument that the miniscule level of taxation applied to Apple does not amount to state aid to an individual company, which is illegal under EU competition law.  

The decision to appeal also completely undermines our public stance of being in favor of a new international agreement on how multi-national companies can be taxed effectively in the future.  

It's not like we did not see this one coming, on both sides of the Atlantic. People in the U.S. will remember the U.S. Senate hearings on the issue a few years ago and the moment when a senior Apple executive was forced to admit on the record that Apple had negotiated an understanding with the Irish authorities that it would pay two percent or less in tax in Ireland, even though our official corporate tax rate is 12.5 percent.

In spite of this, Taoiseach Enda Kenny and Noonan, have been insisting over and over again in the years since then in places like Davos that we have a completely transparent tax regime in Ireland which is completely above board and that our corporate tax rate of 12.5 percent is a cornerstone of our system which is not negotiable.  

It's a pity they did not live up to what they were saying.