European airline Deutsche Lufthansa AG just secured a $9.8 billion bailout from the German government. The deal came after weeks of intense negotiations with both sides finally agreeing to the terms of the rescue package.

Under the newly inked deal, the German government will be acquiring a 20 percent stake in the airline. Germany will also be taking two seats on Lufthansa's supervisory board as part of the terms of the bailout. The funds that will be sued to support the airline's continued operations will be taken from Germany's Federal Economic Stabilization Fund, a program initiated by the government to support companies hit by the economic downturn caused by the coronavirus pandemic.

Part of the $9.8 billion "stabilization package" will be used to purchase the 20 percent stake, which was priced at $2.79 per share. The entire transaction is valued at around $327 million. Germany had also been given the option to increase its stake in the company by up to 25 percent. As of Monday, Lufthansa's stock prices closed at $9.41 per share. The company's shares have lost nearly half of its value since the start of the year.

Germany will also be injecting a total of $6.2 billion into the airline, with an annual return of 4 percent starting this year. Lufthansa has also been given access to a three-year credit facility that will let the company take out up to $3.3 billion. The majority of the funds from the credit facility will be supplied by state-owned development bank, KFW.

Under the agreement, Lufthansa has agreed to buy back all of the shares by the end of 2023, while also paying in full the $6.2 billion investment made by the government. Germany mentioned a statement released this week that it had agreed to help out Lufthansa as it is facing an unprecedented existential emergency. However, during the negotiations, officials did take into account both the needs of taxpayers and the company and made sure that it had made the best deal possible.

For its first quarter this year, Lufthansa reported a $1.3 billion loss due to the global travel demand slump caused by travel restrictions and shelter-in-place orders imposed by governments to mitigate the spread of the disease. The airline warned that it does not expect the global aviation industry to recover immediately and that it may be a while until it returns to pre-pandemic levels.

As part of its efforts to shore up its finances and reduce costs, Lufthansa had been forced to shut down its budget carrier, Germanwings. The company also announced plans to cut up to 10,000 jobs to further drive down costs.