BA chief executive Willie Walsh said the merger would be good for customers.
"The merged company will provide customers with a larger combined network," he said.
Iberia's chairman and chief executive Antonio Vazquez said the merger was a key move.
"This is an important step in the process towards creating one of the world's leading global airlines that will be better equipped to compete with other major airlines and participate in future industry consolidation," he said.
The merger is seen as a chance for the two airlines to cut costs following two very tough years for the airline industry.
Both BA and Iberia are expected to report heavy losses this year, with BA predicted to announce its biggest annual loss since privatisation.
The airlines are also regarded as a good match, having few overlapping routes.
The merger will also allow the company to compete more effectively with other European giants including Air France-KLM and Germany's Lufthansa.
The signing of the merger deal follows reports on Wednesday that two US airlines - US Airways and United Airlines - were also in talks over a possible merger.
Analysts welcomed the move in light of the current economic environment in which global airlines are struggling for survival.
"The merger makes huge sense for passengers and airlines alike. It will allow participating airlines to spread their cost base, something they desperately need to do," said Ashley Steel, global chair for transport and infrastructure at KPMG.
Aviation analyst Laurie Price gives his reaction to the deal
Along with other observers, Mr Steel said that the merger was a stepping stone towards a transatlantic alliance with American Airlines.
The new partners may even cast their net wider, said Stephen Furlong at Davy Stockbrokers: "The tie-up with American is the next thing on BA and Iberia's agenda now and this agreement brings that closer, but they are probably looking at European and Asian carriers too."
The Unite union, which represents thousands of BA workers, said it supported the deal, but "not at any cost".
"Mergers mean synergies, and synergies usually mean job losses and the levelling down of terms and conditions," said Steve Turner, Unite national officer for civil aviation.
He said workers must be consulted on any "key decisions" about their future.
BA is currently in negotiations with Unite to prevent further strikes by cabin crew, who went on strike for seven days last month over pay and working conditions.
BA and Iberia are expected to complete the merger by December, subject to approval from regulators and shareholders.
One stumbling block could be BA's pension problems. Its two final-salary pension schemes have a combined deficit of £3.7bn, which it needs to cut.
Last month, the airline agreed plans with unions to increase pension contributions to close the deficit.
But those plans still need to be agreed with pension trustees and the pensions regulator. They could yet insist that BA pays in more money to fill the deficit.
If Iberia is not happy with those demands, a specific clause in the contract allows it to call off the merger deal.
Plans for a tie-up between BA and Iberia date back long before the current troubles in the airline industry.
The two airlines first began working together in 1999 following the privatisation of the Spanish flag-carrier. BA currently has a 13% stake in Iberia.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.