The European Union says Apple Inc.’s (AAPL) tax deal with Ireland allowed the global tech giant to pay near zero on its European profits between 2003 and 2014.

On Monday, the Irish government said that an agreement had been reached “in relation to the framework of the principles that will govern the escrow arrangements,” so that the country can begin collecting about $15 billion in unpaid taxes from Apple as early as next year. (See also: Buy Apple, It’s a Luxury Brand like Vuitton: HSBC.)

Dublin Referred to EU’s Highest Court 

The European Commission had ordered Dublin to collect the money in 2016 after concluding that two Irish tax rulings allowed Apple to pay less tax than other businesses. The unfair advantage resulted in Apple avoiding as much as 13 billion euros in payments over the course of more than a decade. After a year passed without Ireland moving to recover the money, the EU referred the country to the bloc’s highest court, the European Court of Justice. Dublin indicated the the collection was stalled due to negotiations over the escrow account, set to hold the dues while the decision is appealed in court.

Ireland disagreed with the EC’s analysis and appealed the decision. The Cupertino, Calif.-based tech company said in a statement that it remains confident the court will overturn the ruling once evidence has been reviewed.

In its 2016 decision, the EC said a sweetheart tax deal offered to Apple in 1991 by Ireland allowed the company to designate only a small portion of its profit as taxable in the country. As a result, Apple was paying annual tax rates between 0.005% and 1% on its European profits until 2014. The EC had given Ireland until Jan. 3, 2017 to collect the billions of dollars it thought ws owed. (See also: Apple: Aniston, Witherspoon to Star in New Series.)

Want to learn how to invest?

Get a free 10 week email series that will teach you how to start investing.

Delivered twice a week, straight to your inbox.