Repsol has reached an agreement to buy Talisman Energy in a deal worth an estimated $8.3 billion.
The move comes after a week of speculation the two companies were in talks once again.
Earlier this year Repsol had confirmed it was looking at a potential transaction with the Canadian energy firm.
A spokesman said the deal received the unanimous approval of both boards.
It is expected to be finalised in the second quarter of 2015.
Chuck Williamson, chairman of Talisman’s board of directors, said: “This deal creates significant and immediate value for Talisman stakeholders.
“Importantly, the deal underscores Repsol’s strong belief in the high quality portfolio that Talisman has worked hard to develop.
“Repsol is a world-class operator with a solid track record and the financial capability to continue the development of these assets within their international portfolio.
“I am proud of the company that our employees, past and present, have built and I believe this transaction represents new opportunities for them in Canada and around the world.”
The definitive arrangement agreement with Repsol will include the purchase of all of the outstanding shares of Talisman for $8 per share in cash.
A spokesman said the purchase price for the common shares represents a 75% premium to the 7-day volume weighted average share price and a 60% premium to the 30-day volume weighted average price.
Antonio Brufau, chairman of Repsol, said: “Our combination with Talisman allows us to align our highly complementary portfolios of upstream assets to create a truly global company well-positioned to grow production and reserves.
“Talisman has strong operational capability, a highly skilled work force and we look forward to leveraging their expertise as we partner to create a stronger, more profitable and competitive organization.”
Calgary is now expected to become home to one of Repsol’s largest management offices, while Talisman’s Canadian assets will continue to be managed locally.
Repsol had previously identified the US, Norway and Canada as targets for potential deals as it looked for ways to spend a £3billion war chest it received following the nationalisation of its assets in Argentina.
The agreement follows a number of mergers this year.
In November Halliburton made a $34.6billion offer for Baker Hughes.
Amec purchased Foster Wheeler made a $3.2billion offer in January.