Lufthansa and British Airways parent International Airlines Group (IAG) reached an agreement in principle on the sale of BMI British Midland, the two companies said on Friday.

The deal is subject to several conditions, including further due diligence and regulatory approvals. Lufthansa officials said in a conference call with analysts and reporters that it expects the transaction to be completed in the first quarter of 2012. No financial details were published.

IAG is buying BMI as a whole including BMI Regional and BMI Baby. However, BMI itself has stated that it is in the process of selling its regional business to UK investors.

Lufthansa took over BMI two years ago as a result of a 1999 agreement with the airline’s former majority owner Sir Michael Bishop. The unit accumulated operating losses in excess of €350 million since then and has been put up for sale earlier this year.

Virgin Atlantic was also interested in the airline to be able to build a hub-and-spoke network in Heathrow that takes advantage of BMI’s short- and medium-haul feed. But Lufthansa stated the IAG offer made most sense.

The take-over of BMI has been a long-standing goal of IAG Chief Executive Willie Walsh. It significantly strengthens the group’s slot holding at Heathrow airport, where BMI controls an estimated 7-8% of the slot capacity.