Etihad Airways is buying a 29.2% stake in Air Berlin, the two airlines confirmed today.

Etihad is buying a 27.03% stake in the airline through new shares at €2.31 ($3.00) each and a 2.99% stake of the existing share base. The airline will get two seats on the Air Berlin board. Additionally, it will provide Air Berlin $255 million in financing on a five-year term. The airlines will introduce extensive code-sharing and mutually accept their respective frequent flyer programs. Air Berlin will transfer its Dubai flight to Abu Dhabi and serve the airport four times weekly initially. The two airlines will have 29 weekly flights from four German destinations to Abu Dhabi and that is to be raised to 42 by mid-2012.

Aviation Week reported on negotiations between the two airlines last month.

Air Berlin has been struggling financially for years. Since its initial public offering in 2006, the airline has made a small profit only twice, but results deteriorated rapidly over the past few years. In 2011, the airline is expected to make a loss of around €200 million. Industry sources said they were concerned the airline could not survive on its own any longer and rumours about the airline’s liquidity surfaced in increasing frequency.

Etihad had already once looked at buying a stake in Air Berlin in 2008, but backed off at the last minute. Last year, the airline was close to signing up for Star Alliance, but the deal also failed. Air Berlin’s new CEO Hartmut Mehdorn, who succeeded Joachim Hunold in the summer, resumed negotations with Etihad soon realizing that the airline would need strong financial backing.

Investing in a European airline has been a long-held plan by Etihad CEO James Hogan. However, it was uncertain that he would be able to convince the Abu Dhabi government to invest in a foreign carrier given Etihad’s own huge start-up losses. But the airline expects significant network effects and benefits – it just started flying to Dusseldorf, a major Air Berlin base. It is unclear though what additional benefits Etihad gets from buying into Air Berlin rather than just agreeing on a bilateral alliance.

Etihad is the second of the three major Gulf carriers to buy a significant stake in a European airline, following Qatar Airways’ move to invest in Cargolux earlier this year.