The EU Court of Justice has made a ruling over a decade-long row over social security payments for Ryanair staff working at Italy's Bergamo airport.
The budget airline will now have to pay Italian social security for some of its 219 staff based there, rather than Irish social security.
The tussle began in 2012 when Italy began investigating Ryanair for allegedly dodging around €12 million of payments since 2010.
Prosecutors in the northern Italian city, where Ryanair-operated airport Orio al Serio is based, allege the Irish carrier avoided heavier taxation in Italy by paying lower pension fees in Ireland for staff flying in and out of Bergamo.
Ryanair denied the allegations, saying it had followed EU social security and tax rules.
EU social security rules say a person working in two or more countries is subject to the legislation of the country where they carry out a substantial part of their work. Those laws came into effect in 2010.
The latest ruling concerns social security payments due between 2006 and 2013.
The European Court of Justice said in a preliminary ruling that the Bergamo staff were hired under Irish contracts and were working in Italy for only 45 minutes a day in the Orio al Serio airport.
The bulk of their time was spent on Irish-registered aircraft and Ryanair’s crew room at the airport did not amount to a “branch” or "permanent representation” in Italy.
Therefore they should not be subject to Italian social insurance.
However, Ryanair failed to produce evidence that every crew member was covered by Irish-issued E101 certificates, so the court ruled that they are effectively Italian employees for social security purposes.
The ruling has to be sent back to the Italian courts for a final decision.