By Ilona Wissenbach and Edward Taylor

Lufthansa shareholders on Thursday backed a 9 billion euro (8.14 billion pounds) government bailout, securing the future of Germany's flagship airline after it was brought to the brink of collapse by the COVID-19 pandemic.

The plan, backed by 98% of the shareholder capital that cast a vote at the online meeting, will see Berlin take a 20% stake in Lufthansa and two board seats.

Shares in the company, which employs around 138,000 people, closed 7.1% higher, having risen strongly earlier after top shareholder Heinz Hermann Thiele dropped objections to the deal.

Also on Thursday, European Union regulators approved Lufthansa's 6 billion euro recapitalisation, part of the bailout deal, subject to a ban on dividends, share buybacks and some acquisitions until state support is repaid.

The approvals will come as a relief to Chancellor Angela Merkel, who could ill afford another high-profile business collapse following the failure of payments firm Wirecard.

Finance Minister Olaf Scholz welcomed the approval.

"This is very, very good news. Good for the company, for the workers at Lufthansa and for Germany," he said.

The state's involvement was for a limited time and when the carrier was fit again, it would sell the stake, hopefully at a profit, he said.

Economy Minister Peter Altmaier said it was clear that with the state holding a minority stake, Lufthansa would remain an independent company but the deal made it possible to prevent a hostile takeover.

But tough decisions lie ahead, with Lufthansa working on a restructuring plan in which up to 22,000 jobs could be at risk - although CEO Carsten Spohr told Bild newspaper that hours and wages could be reduced by a fifth instead of axing a fifth of jobs.

Lufthansa has been brought to its knees by COVID-19 and what promises to be a protracted travel slump, and like many rivals, sought state help to stay afloat. Even after Thursday's gains, its shares are down almost 40% this year.

Concerned a government stake would make it harder for Lufthansa to make tough restructuring decisions, Thiele had instead proposed an indirect government holding in the airline via Germany's KfW development bank.

That sparked fears the bailout would fail and Lufthansa would have to seek protection from creditors within days.

Thiele, who recently increased his stake in Lufthansa to 15.5%, told the Frankfurter Allgemeine daily that "differences remain with government representatives."

But he said he could not have voted for insolvency, adding he would continue to seek to influence the company's development, though he declined to say how.

The 79-year-old brakes billionaire said it was in the interests of Lufthansa employees that management quickly negotiate restructuring with unions.

Lufthansa struck a deal overnight with the UFO union representing German cabin crew that is set to reap more than 500 million euros in savings, including steps to stop pay rises, cut working hours, and a cap on pension contributions.

More talks are scheduled on Friday with services union Verdi.

Spohr said the government did not plan to get involved in the operations of the airline.

(Writing by Ludwig Burger and Mark Potter and Madeline Chambers; Editing by Edmund Blair and Elaine Hardcastle)