Deutsche Lufthansa AG won European Union approval to receive a 6 billion-euro ($6.75 billion) recapitalization from the German government, hours before shareholders vote on the rescue package that will dilute their stakes.

The European Commission said in a statement on Thursday that Germany’s plan to take a 20% stake in Europe’s largest airline is in line with strict state-aid rules. The EU approval covers Germany’s 300 million-euro equity participation, a 4.7 billion-euro silent participation with features of a non-convertible equity instrument and a 1 billion-euro silent participation with the features of a non-convertible debt instrument.

Germany’s bailout for Lufthansa overcame one major roadblock when the airline’s biggest stockholder said he’d vote in favor of the rescue package at a special shareholder meeting later Thursday. He had earlier criticized a steep discount being granted to the German government on a 20% stake, and held the votes to single-handedly stop the share sale.

The EU approval comes with tight conditions to ensure the aid is repaid swiftly and Lufthansa doesn’t use taxpayer funding to expand its business. Ryanair Holdings Plc has already threatened legal action against the aid it says unfairly helps Lufthansa over other rivals in Germany.

The aid approval doesn’t cover a 3 billion state loan guarantee that the EU says it will handle separately.