Aer Lingus owner International Airlines Group (IAG) has agreed to pay €400 million to Spain's Globalia for the remaining 80% of airline Air Europa it did not already own.

IAG, which also owns British Airways, said the deal will allow it to improve its position in the Latin American market and expand into Asia, while allowing its Madrid hub to compete with other major airports in Europe.

Air Europa, which will maintain its brand but will be managed by Iberia, owns 50 planes and has a further 15 on order, the company said.

Its fleet consists of Boeing 787 Dreamliners and Boeing 737s, Globalia said in a separate statement.

IAG said the acquisition will allow it to achieve significant cost cuts that it expects to bear fruit between 2026 and 2028 if the deal is finalised in the next 18 months.

It said the first €200 million will be paid once the deal gets the go-ahead from antitrust authorities. Another €100 million will be paid in IAG shares while the final €100 million will be paid in cash.

Many of Europe´s legacy airlines, hampered by weak balance sheets, are struggling to compete with budget airlines.

That will inevitably lead to a period of consolidation, Ryanair Chief Executive Office Michael O'Leary told Reuters earlier this month.

The protracted takeover began in 2019 when IAG announced it had agreed to buy its smaller rival for €1 billion with the goal of building a big hub in Madrid, but the COVID pandemic and antitrust concerns derailed the merger.

As the pandemic tipped the airline industry into crisis, hitting Air Europa particularly hard, shareholders in both companies agreed to cut the deal's price tag to €500 million.

Spain's government approved a €475-million rescue package for Air Europa in November 2020, a part of which could be converted into equity, meaning the Spanish government has also been involved in the talks since then.

Negotiations had all but ground to a halt until March 2022 when IAG agreed to grant Air Europa a 100 million-euro loan convertible into a 20% stake.