Italy's antitrust authorities fined Ryanair and Wizzair over their cabin baggage policies, but a court later cancelled the fines

A Spanish court has ordered Ryanair to refund a customer who was charged for taking a carry-on bag without a special ticket, and told the airline to remove the clause from its terms and conditions.

In a ruling issued last month but only published Wednesday, the Commercial Court said the budget carrier must repay the 20-euro ($22) fee plus interest it had imposed on a female passenger flying from Madrid to Brussels for taking a small suitcase of up to 10 kilos (22 lbs).

Ryanair only allows small bags into the cabin if they can be stowed under the seat in front, but larger bags of up to 10 kilos require a luggage fee, or a fee-paying priority boarding pass.

In its ruling, which cannot be appealed, the court described the airline's cabin baggage policy as "abusive" in respect to the customer's legal rights under Spanish law.

It declared Ryanair's cabin baggage policy to be null and void and ordered the airline "to remove it" from its terms and conditions.

But the Dublin-based airline said in a statement that the ruling "will not affect Ryanair's baggage policy."

Ryanair added that the Spanish court had "misinterpreted the airlines' commercial freedom to determine the size of their cabin baggage."

In February, Italy's antitrust authority fined Ryanair three million euros and Hungary's Wizzair one million euros over their cabin baggage policy on grounds it was tantamount to raising ticket prices in a "non-transparent" manner.

But last month, an Italian court cancelled the fines following an appeal, with Ryanair saying it had found the airline's baggage policy to be "transparent and fully complicant with EU law".