The budget airline had argued it was unlawful for Austria to give millions of euros in support to the Lufthansa subsidiary during the Covid-19 pandemic.
Ryanair has lost its final battle against a state-made loan to Austria Airlines worth €150m and awarded during the Covid pandemic when lockdown meant airlines lost huge amounts of money.
The Court of Justice of the European Union (CJEU) took the side of the EU competition authorities that approved the loan to the airline which is a subsidiary of Lufthansa.
The loan was lent in 2020 to Lufthansa's Austrian unit as airlines worked to keep solvent during the pandemic.
The Dublin-based European airline had filed more than 20 lawsuits against the EU Commission for approving large amounts of euros in state aid to airlines throughout the pandemic. Ryanair argued the support given to carriers had created unfair advantages.
Ryanair appealed to the CJEU after an earlier tribunal also found in favour of the loan from Austria to Austrian Airlines.
Judges from the Court of Justices said: "A member state may, for objective reasons, reserve to a single undertaking aid that is intended to make good the damage caused by an exceptional occurrence."
The final ruling declared that Ryanair had won its case against state aid granted to Lufthansa, Condor, KLM, and TAP but lost the battle against SAS, Finnair, and Air France.