The European Union's order to Apple to pay 13 billion euros ($14 billion) in back taxes "defies reality and common sense", the US firm said as the two sides sparred in a case key to the EU's crackdown on sweetheart deals to multinationals.
The iPhone maker is appealing to Europe's second highest court to overturn the European Commission's 2016 ruling that it pay the record sum to Ireland.
Ireland, whose economy has benefited from investment by multinational companies attracted by low tax rates, is also challenging the Commission's decision.
Apple also accused the Commission of using its powers to combat state aid "to retrofit changes to national law", in effect trying to change the international tax system and in the process creating legal uncertainty for businesses.
The EU executive dismissed the arguments, saying it was not seeking to police international tax laws and accused Ireland of not having done its homework when assessing Apple's taxes.
Apple's arguments at the General Court, Europe's second-highest, came after the EU executive in 2016 said the tech giant benefited from illegal state aid due to two Irish tax rulings which artificially reduced its tax burden for over two decades.
The case could make or break European Competition Commissioner Margrethe Vestager's campaign which has also led to action against Starbucks, Fiat, Engie, Amazon and others.
Apple's Chief Financial Officer Luca Maestri led a six-strong delegation to the court where a panel of five judges will hear arguments over two days.
"The Commission contends that essentially all of Apple's profits from all of its sales outside the Americas must be attributed to two branches in Ireland," Apple's lawyer Daniel Beard told the court.
He said the fact the iPhone, the iPad, the App Store, other Apple products and services and key intellectual property rights were developed in the United States, and not in Ireland, showed the flaws in the Commission's case.
"The branches' activities did not involve creating, developing or managing those rights. Based on the facts of this case, the primary line defies reality and common sense," Beard said.
"The activities of these two branches in Ireland simply could not be responsible for generating almost all of Apple's profits outside the Americas."
Beard dismissed criticism of the 0.005% tax rate paid by Apple's main Irish unit in 2014, which was cited by the Commission in its decision, saying the regulator was just seeking "headlines by quoting tiny numbers".
PERFECTLY IRRELEVANT Paying an average global tax rate of 26%, Apple has said it is the largest taxpayer worldwide and is now paying around 20 billion euros in US taxes on the same profits that the Commission said should have been taxed in Ireland.
In its current financial quarter, Apple expects revenue of $61-64 billion and a gross margin of 37.5-38.5%.
Commission lawyer Richard Lyal said Apple's argument that all its intellectual property-related activities take place in the United States was inconsequential.
"To a large extent that is perfectly correct and perfectly irrelevant," he said, adding that Ireland was taxing Apple's Irish subsidiaries, not the group nor Apple Inc.
He said Ireland had failed to examine the functions performed by Apple's Irish units, the risks assumed and the assets used by the subsidiaries.
"They simply accepted an arbitrary method proposed by the Apple Ireland subsidiaries. That in itself gives rise to a presumption of a special deal, exceptionally advantageous treatment. It is clear that the tax authorities made no assessment in 1991."
He said the Commission has no hidden agenda.
"What is the case not about? Not about the Commission as policeman of international taxation, not about making sure tax is paid somewhere, though that would be a nice idea, not about resolving tax mismatches," Lyal said.
Ireland said it had been the subject of entirely unjustified criticism and that the Apple tax case was due to a mismatch between the Irish and US tax systems.
"The Commission's decision is fundamentally flawed," its lawyer Paul Gallagher told the court.
Luxembourg, told by the EU to recover millions of euros in back taxes from Amazon, Engie and Fiat, is backing Ireland. Poland and the EFTA (European Free Trade Aassociation) Surveillance Authority support the Commission.
The court is expected to rule in the coming months, with the losing party likely to appeal to the EU Court of Justice and a final judgment could take several years. The joint Apple cases are T-778/16 Ireland v Commission and T-892/16 Apple Sales International and Apple Operations Europe v Commission.