LONDON (AP) — Ireland has struck a deal with Apple to collect up to 13 billion euros ($15 billion) in back taxes and hold it in an escrow account pending an appeal before the Court of Justice of the European Union.

The government said in a statement Monday that an agreement had been reached “in relation to the framework of the principles that will govern the escrow arrangements.”

The European Commission had ordered Ireland to collect the money after concluding that two Irish tax rulings allowed Apple to pay less tax than other businesses — thus giving it an unfair advantage. The Commission ordered Ireland to collect back taxes for the years 2003-2014, which it estimated to be as much 13 billion euros plus interest.

Ireland disagreed with the Commission’s analysis and appealed the decision.

Apple said in a statement that it remains confident the court will overturn the commission’s decision once it has reviewed the evidence.

“The Commission’s case against Ireland has never been about how much Apple pays in taxes, it’s about which government gets the money,” Apple said in a statement. “The United States government and the Irish government both agree we’ve paid our taxes according to the law.”