James Martin/CNET

Apple faces costs of billions of euros, reports say, as investigators accuse the Irish government of granting illegal state aid to the iPhone manufacturer for more than 20 years.

The European Commission began looking into Apple's tax affairs in Ireland, where the US company sites its international headquarters, in June. The Wall Street Journal reports that the EC has written to the Irish government with its preliminary findings on the subject of what it sees as preferential treatment to Apple.

The UK's Financial Times reports that the EC investigation could see Apple paying out billions of euros if the company's taxation arrangement with the Irish government is ruled to have been dodgy and the government is required to recover the amount given in aid.

Apple's international operations have been based in Cork, Ireland since 1980. The company employs 4,000 people in Ireland. Other major companies headquartered in Ireland include Amazon, Facebook, PayPal and Twitter -- it's a popular base because of the friendly corporate tax rate of 12.5 percent.

But despite that already relatively low rate, Apple pays less than 2 percent in tax there. As uncovered by a US Senate investigation in 2013, the company has secured that lower rate by channeling overseas sales through subsidiaries. That investigation found the company's Ireland-based subsidiary could be holding a whopping 60 percent of Apple's profits to avoid bringing that money back to the US, where it would be hit with much higher taxes. Yet despite all that money sloshing around, the subsidiary is allowed to claim itself as a non-taxing resident of Ireland.

That wheeze was apparently given the thumbs-up by the Irish government between 1991 and 2007. The EC argues that's effectively preferential treatment or "state aid" denied to other companies. The EC will claim the deal is anti-competitive and illegal. If that's proved to be the case, the EU could attempt to recover from Apple billions of euros in unpaid taxes stretching back 10 years.

Speaking to the FT, Apple's chief financial officer Luca Maestri denied the claims of a "special deal." In a Senate hearing last year, which you can see in the video below, Apple CEO Tim Cook denied using "tax gimmicks".

Now playing: Watch this: Cook hits back at tax critics, says Apple pays its fair...

The US Securities and Exchange Commission backed Apple's tax strategies last year. But earlier this year a report by the UK's Bureau of Investigative Journalism suggested Apple, Microsoft, Google, and Cisco Systems collectively earns interest without paying tax on $124 billion in US Treasury debt held overseas.

Apple isn't the only company nor Ireland the only country to be targeted on tax: multinational body the Organisation for Economic Cooperation and Development (OECD) is cracking down on tax havens across Europe. The OECD is also looking at taxation agreements with Starbucks in the Netherlands and Fiat in Luxembourg. The Luxembourg government has also received a letter from the EC, regarding Fiat.

Update, Tuesday at 10:30am: Added details of EC letter and clarified possibility of Apple costs.