Ireland is to fight the European Commission over the 13 billion euro tax (£11.1 billion) bill it slapped on tech giant Apple.
The final decision was taken after two days of negotiations in the country's minority Government after concerns were raised by Independent members of the cabinet.
The Dail parliament will be recalled next Wednesday to seek support for the appeal.
The ruling by a Brussels competition watchdog - described by Finance Minister Michael Noonan as bizarre and outrageous - found Ireland gave Apple a sweetheart deal which ultimately allowed the iPhone maker to pay 0.005% tax in 2014 - 50 euro for every one million of profit.
Mr Noonan said Europe had overstepped the mark in attempting to dictate tax laws and enforce today's laws for something that happened 10 or 20 years ago.
"I believe that there are some very important principles at stake in this case and that a robust legal challenge before the courts is essential to defend Ireland's interests," he said.
The minister added: "How could any investor come to Europe if their business was subject to retrospective taxes two decades later?"
The tech giant's chief executive Tim Cook branded the numbers set out in Commissioner Margrethe Vestager's ruling as untrue, "political crap", and maddening.
As part of the independents' support for the appeal Ireland's corporation tax system is to be reviewed, but it will not include any possibility of a change to the generous and much-maligned rate of 12.5%.
On the face of it, when the Dail sits, Ireland's politicians will be asked to back plans to turn down a multibillion-euro windfall, albeit one that would have to be held in a bank account for several years while the legal challenges run their course.
At the same time there is massive concern that Ireland would suffer reputational damage to an economy heavily reliant on multinationals if it does not fight Apple's corner.
In the wake of the ruling, Apple also confirmed it has made provisions on its balance sheets for 30 billion US dollars of tax bills in the US.
Mr Cook defended his company's attitude to tax and said it paid 400 million US dollars corporation tax in Ireland in 2014 and another 400 million US dollars of similarly classed tax in the US that year. He put its corporation tax bill at 26.1%.
Left-leaning political groups in Ireland insist the multibillion-euro tax windfall should go towards public services.
Sinn Fein deputy leader Mary Lou McDonald said the appeal was wrong and the Government was siding with big business and showing contempt for ordinary citizens.
"So this is not about the EU trying to encroach on our tax sovereignty. It is about a level playing pitch and ensuring everyone pays their fair share," she said.
The Anti-Austerity Alliance said: "The Government will waste public money taking a case to prevent a potential windfall of billions which could be used to dramatically change the lives of hundreds of thousands of people."
Despite the mammoth tax bill, Apple insists it will not abandon Ireland, where it has about 6,000 employees and is planning to build a huge data centre.