A court in Spain has ruled that Ryanair’s policy of charging customers for items of carry-on baggage is “abusive” and contravenes both Spanish and European law.

In a case brought by a passenger who had been hit by a €20 (£17) charge when boarding a plane in the Spanish capital earlier this year, a judge in Madrid’s mercantile court sided with the customer in a ruling that was made public on Wednesday.

Ordering the budget airline to return the €20 to the passenger, the judge said that airlines cannot charge for a hand baggage “suitcase whose dimensions and weight could perfectly be transported in the cabin”.

One year ago Ryanair introduced charges for carry-on baggage - exceeding handbag or small rucksack dimensions of 40cm x 20cm x 25cm – for all passengers who do not pay the €14 (£12) “Priority” customer supplement, of which there are a limited amount available on each flight.

However, Ryanair insisted on Wednesday that the Spanish court’s ruling would have no impact on its fares as it would continue to charge for carry-on baggage items above its lower size limit.

“This ruling will not affect Ryanair’s baggage policy, as it misquoted the European Court of Justice (ECJ) and misinterpreted the airlines’ commercial freedom to determine the size of their cabin baggage,” Ryanair said in a statement to the Telegraph.