Until the EU intervenes in “tax evasion,” large companies will continue to use it.

What happens when a European member state such as Ireland or the Netherlands decides it wants to act like a corporate tax haven? Because taxation is a national sovereignty issue, the European commission can’t directly challenge the corporate tax laws of EU member states. So the commission has instead been trying to use state aid laws to prevent tax avoidance in smaller countries. This bundle of rules is designed to promote market competition and prevent countries giving unfair advantages to companies. In the eyes of the commission, allowing a company to avoid taxes is much like giving it a cash subsidy.

In 2016, the European commission found that Apple had transferred around €110bn of sales from their European operations to a head office of two subsidiaries in Ireland. These subsidiaries were registered in Ireland, but were non-resident for tax purposes – so Apple’s profits in Irish accounts weren’t taxed. In a controversial ruling, the commission decided that Ireland had given special treatment to these Apple subsidiaries. In other words, Ireland had actively facilitated the Apple group’s corporate tax avoidance strategies. According to the commission, these tax incentives amounted to illegal state aid, and Apple were ordered to pay the Irish government almost €14bn in unpaid taxes.

But the reality is more complicated. Although Apple has a huge presence in Ireland, where it employs some 6,000 people, this was not Irish money – it was profit generated from sales in other countries. The profits that accumulated, tax free, in Apple subsidiary accounts in Ireland ought to have been declared and paid in the US. Apple was simply exploiting a loophole in US and Irish law that allowed it to store its profits without paying tax legitimately, if it signalled it eventually intended to send this money back to the US.

This week, the general court of the European Union overturned the European commission ruling. It found that, despite the fact that Ireland may have facilitated tax avoidance, what it did was not illegal state aid. While the commission might have been right that the money was sitting tax free in these Irish accounts, it was wrong to conclude that the Irish state should tax these profits as though they were generated in Ireland. Apple has since 2016 repatriated a lot of its cash in Ireland back to the US following the Trump administration’s tax reforms.

What Apple was doing wasn’t that different to what many big tech firms do. Corporate tax law is complicated, but when you strip away the complex legal and accounting jargon, the strategies that multinationals use to reduce their tax are straightforward. They set up companies within companies of their global holding corporate group. They then shift their assets, profit and income within this group to those companies in lower tax jurisdictions to avoid paying higher taxes.

And let’s be under no illusion. Big-tech US multinational enterprises such as Apple create globally linked subsidiaries and holding groups in small European states for tax purposes. More than half of global trade and investment takes place within multinational groups. Because each subsidiary of the group is resident in a sovereign state, each subsidiary is taxed differently in each state, making it easy for multinationals to move money around the globe.

The difference between a country that is a tax haven and one that simply offers a low tax regime to financial and corporate capital is a matter of degree. Like the tax havens of old, small European states are creating legislation that helps corporations to reduce tax obligations in other jurisdictions. These companies have specialised in harvesting the profits from intangible capital such as intellectual property, patents, copyright and trademarks. And as intangible capital grows in importance in the digital economy, the ability to tax it declines.

Although the notorious “double Irish” tax loopholes that allowed Apple to register non-tax resident subsidiaries have since been closed, legal structures aimed at attracting companies to onshore their intellectual property in Ireland have replaced them. Under these structures, an Irish subsidiary of a company like Apple could spend $50bn on buying intellectual property from a different subsidiary of the same multinational group in another country. To pay for this, the Irish subsidiary is given a loan from the same subsidiary that sells them the intellectual property. The Irish subsidiary now owns the intellectual property and the licence to use and make a profit from it. This scheme allows the Irish subsidiary to write off the cost of the $50bn purchase, and the loan used to pay for it, against future Irish tax.

Sounds complicated? That’s because it’s designed to be. But the bottom line is straightforward. These rules are designed to locate the intellectual property of the company in a lower tax jurisdiction. Unlike factories and machines, intellectual property such as patents, copyrights and brands can be easily moved across borders. And in the past few years, companies have been moving their intellectual property to low-tax jurisdictions, such as Ireland, that offer very favourable tax treatment.

Apple used this new capital allowance scheme in 2016 to shift its intellectual property out of Jersey into Ireland. This onshoring of €300bn of capital created the infamous 26% growth in Irish GDP. But this is little more than leprechaun economics – using Ireland as a treasure island for storing the intangible capital assets of big-tech multinational enterprises. And until the EU creates common laws that make tax avoidance in member states illegal, small sovereign states will continue to play an important role in helping global corporations minimise the tax they pay.