(CNN) -- Ryanair, the Irish airline famous for its low fares and an extensive menu of fees, is vowing to fight a court ruling that calls one of its extra charges "abusive."

A judge in Barcelona, Spain, ruled that the carrier's 40 euro (about $54) boarding card reissue fee is illegal. Passengers must pay it if they arrive for their flight without a pre-printed boarding pass.

"I declare abusive and, therefore, null, the clause in the contract by which Ryanair obliges the passenger to take a boarding pass to the airport," Judge Barbara Cordoba said, according to The Guardian.

"The customary practice over the years has been that the obligation to provide the boarding pass has always fallen on the airline."

The ruling came after a complaint filed by a Spanish lawyer who was charged the fee last year when he showed up for a Ryanair flight without a boarding pass, The Irish Times reported.

The judge's decision would have to be upheld by European courts before it could be enforced outside of Spain.

Ryanair said its Spanish lawyers will appeal the ruling, which it called "bizarre and unlawful." The airline noted that more than 99% of its customers arrive at the airport with their boarding passes in hand.

"Ryanair's low fare, low cost services appeal to millions of passengers because they are simple, efficient and agreed by each passenger at the time of booking," said spokesman Stephen McNamara in a statement.

"Without these procedures, Ryanair would have to re-employ numerous handling agents at all airports to issue manual boarding cards for passengers who simply 'forgot' to bring their pre-printed boarding passes."

The boarding pass fee will continue to be in effect at all Ryanair airports while the ruling is being appealed, the airline said.

If the decision is not reversed, Ryanair vowed to get rid of the charge altogether, warning that passengers who arrived at the airport without their pre-printed boarding passes would simply not be able to go through security or board their plane.

Ryanair is well-known for its variety of fees, which are prominently listed on its website. It's also notorious for some of the charges it has suggested implementing, such as coin-operated lavatories.