Technology giant Apple has vowed to overturn a record 13bn euro (£11.1bn) bill after a European Commission ruling that it has an illegal “sweetheart” tax deal in Ireland.

In a landmark ruling following a three-year investigation, Competition Commissioner Margrethe Vestager said iPad and iPhone maker paid just 1% tax on its European profits in 2003 and 0.005% in 2014.

The commission found that the arrangements, dating back to the early 1990s, were illegal under state aid rules and gave Apple favourable treatment over other businesses.

Ms Vestager said Apple was paying 50 euros in tax on every 1m euros euro of profit it made in 2014 - but Ireland’s Finance Minister, Michael Noonan, and Apple chief executive Tim Cook vowed to fight the verdict.

In a hard-hitting defence of its tax planning and corporate structure, Apple warned of the ramifications for future investment in Europe, where it employs 22,000 people.

“The European Commission has launched an effort to rewrite Apple’s history in Europe, ignore Ireland’s tax laws and up-end the international tax system in the process,” Apple said. “The commission’s case is not about how much Apple pays in taxes, it’s about which government collects the money.

“It will have a profound and harmful effect on investment and job creation in Europe. Apple follows the law and pays all of the taxes we owe wherever we operate. We will appeal and we are confident the decision will be overturned.”

The tax bill covers a 10-year period, the longest the commissioner could enforce, for the years 2003 to 2014 of up to 13bn euro, plus interest.

The inquiry found that Ireland’s treatment of Apple allowed the global brand to avoid taxation on almost all profits generated by sales of Apple products in the entire European single market.

It said this was because Apple recorded all its sales in Ireland rather than in the countries where the products were sold.

“Member states cannot give tax benefits to selected companies - this is illegal under EU state aid rules,” the commissioner said.

The commission’s investigation concluded that Ireland granted illegal tax benefits to Apple, which enabled it to pay substantially less tax than other businesses over many years.

Mr Noonan said he profoundly disagreed with the verdict and denied doing “deals” with taxpayers. “Our tax system is founded on the strict application of the law ... without exception,” he said.

He added that it was necessary to fight the verdict in the courts “to defend the integrity of our tax system, to provide tax certainty to business, and to challenge the encroachment of EU state aid rules into the sovereign member state competence of taxation”.

“It is important that we send a strong message that Ireland remains an attractive and stable location of choice for long-term substantive investment,” he said.

The case is one of the most high-profile in the fight to redraw boundaries on aggressive tax avoidance, an issue which has put the EU at odds with the US government.

Ms Vestager found two tax rulings issued by Ireland to Apple which she said substantially and artificially lowered the tax paid by the multinational.

She said the arrangements to establish the taxable profits for two Irish incorporated companies of the Apple group - Apple Sales International and Apple Operations Europe - did not reflect economic reality.

The commissioner said almost all sales profits recorded by the two companies were internally attributed to a “head office” which only existed on paper and could not have generated such profits.

Her inquiry found the profits were not subject to tax anywhere.

Apple has had a base in Ireland since 1980, long before it became the global brand it is today thanks to its iPhones, iPads and App Store.

It employs around 5,500 people in the country, with its biggest operations in Cork.

The findings are expected to throw further pressure on the Irish Government’s pursuit of foreign investment through its attractive but much-maligned corporation tax rate of 12.5% for business profits.

Niall Cody, chairman of Ireland’s Revenue Commissioners, insisted that it collected the full amount of tax due from Apple under Irish law.

“Under Irish tax law, non-resident companies are chargeable to Irish corporation tax only on the profits attributable to their Irish branches by reference to the facts and circumstances,” he said.

“The profits of non-resident companies that are not generated by their Irish branches - such as profits from technology, design and marketing that are generated outside Ireland - cannot be charged with Irish tax under Irish tax law.”

Ms Vestager’s ruling also comes just a week before Apple’s biggest product launch of the year, with the iPhone 7 and a new version of the Apple Watch to be unveiled in San Francisco.

Her office’s investigations have also targeted aggressive tax planning by Starbucks and Fiat, both of which are appealing against rulings ordering them to pay back taxes to the Netherlands and Luxembourg.