The merger, which follows a provisional agreement reached at the end of last year, will give the two loss-making airlines the scale they need to ride out the industry downturn and compete with both larger rivals and budget carriers.
In February Iberia posted a record operating loss of $629m and BA posted a pre-tax loss of $102.4m for the nine months ending December 31, 2009.
The carriers say the deal will save the airlines $530m a year.
BA and Iberia shareholders will be asked to approve the deal in November and the merged company will be headquartered in London. Under the deal BA shareholders will receive 55 per cent of the new company and Iberia 45 per cent.
The merged group will have 408 aircraft flying to 205 destinations, carrying more than 61.5 million passengers each year and could cut less profitable short-haul flights which will allow it to compete better on the routes it retains.
The new firm will have annual revenues of around $20bn and consolidate BA's position in Europe-to-North America with Iberia's Latin American business.
The agreement comes after recent strikes by BA cabin crew in a dispute over pay and jobs, which cast doubt on BA's future.
A $6bn pension deficit announced by BA in December was expected to be one of the main stumbling blocks in the merger talks.
The pair began merger talks in July 2008 in response to slowing passenger demand but International Air Transport Association (IATA) last week said airlines were slowly climbing out of recession.
The airline industry has lost $50bn in the past 10 years, including $11bn in 2009, according to IATA. The industry has been struggling with high fuel prices and a pullback in consumer spending amid a weak economy.
In the US, media is reporting that United Airlines is in merger talks with US Airways in a deal that could create the second-largest carrier in the country.
The discussions are aimed at cutting costs and increasing the competitiveness of both airlines that reported significant loses last year.