The outcome is embarrassing for IAG, given it decided to revive the deal despite EU regulators saying it should not proceed previously.
The group also had to pay a €50m break fee last time the deal collapsed in 2021.
Air Europa and IAG’s Iberia are the two major airlines in Spain, and provide key routes between the country and the rest of Europe and Latin America.
The group has spent the last six months trying to convince the EU to support the plan.
However, European Commission competition tsar Margrethe Vestager warned IAG in January that the tie-up could harm passengers by increasing costs.
Madrid’s main international airport would have been dominated by one group if the deal was allowed to proceed, the EU said.
In response, IAG had offered a package of concessions to Brussels to try to ease concerns, including offering up take-off and landing slots to rivals.
IAG said it offered to surrender half of the Air Europa slots but that didn’t satisfy the Commission. Mr Gallego said: “This was not enough to have the approval. To go beyond that did not make sense for the group and our shareholders.”
EU regulators have become increasingly sceptical about so-called “slot remedies” in recent years, with top Brussels anti-trust director Olivier Guersent saying they did not solve competition problems.
News of IAG’s decision to abandon the Air Europa deal came as the company published its half-year results a day early.
IAG’s operating profits for the six months ending June nudged up slightly to €1.3bn, from €1.26bn for the same period last year. Revenue rose slightly to €14.7bn, from €13.6bn.