MADRID (Reuters) - Spain's Repsol (>> Repsol SA) has agreed to buy Talisman Energy (>> Talisman Energy Inc.), Canada's fifth-largest independent oil producer, for $13 billion (8.28 billion pounds) as the drop in oil prices pushes energy companies to take the plunge on big M&A deals.

A near halving in the oil price since June has lowered price tags on producers such as Talisman, spurring renewed interest from Repsol, which had long been searching for oil and gas assets in North America and elsewhere.

But analysts said the Spanish company had paid a hefty price for the embattled Canadian company and in the long term it could have to consider a sale of its 30 percent stake in Gas Natural (>> Gas Natural SDG SA), a move Repsol said was not in the works.

"We don't need to sell our stake in GasNat (Gas Natural) to do this deal. For us GasNat brings stability, dividends, optionality," Repsol Chairman Antonio Brufau told analysts.

The proposed acquisition will boost Repsol's exploration and production arm and fill a gap left by the seizure of its Argentine business, YPF, in 2012. It will also help to cut the company's reliance on high-risk oil-producing areas such as Libya and Venezuela.

Chief Executive Josu Jon Imaz said: "It's the right moment because now our valuation of Talisman assets is higher than the price we are paying." He said Talisman had what Repsol was looking for: growth in upstream business, geographical diversification and shale assets.

Repsol shares fell 0.4 percent to 5.64 euros. Shares in Talisman were up 48 percent at C$8.81 at midday on Tuesday on the Toronto Stock Exchange.

Weighed down by problem-plagued and unprofitable North Sea operations, Talisman shares had dropped nearly two-thirds in the year before the Repsol offer as its struggled to cope with falling prices.

"Our progress has been limited by our capital obligations in the North Sea and elsewhere, which ... affected our ability to fund growth opportunities," Hal Kvisle, Talisman's chief executive, said on a conference call.

Along with the North Sea assets, most of which are in a joint venture with China's Sinopec (>> Sinopec Shanghai Petrochemical Co Ltd), Talisman brings its profitable North American shale assets and its oil properties in South America, Southeast Asia and elsewhere.

Barclays analysts said in a note: "For this price Repsol gets a business that is free cash flow negative with a problematic North Sea business of questionable value, but also what it considers attractive assets in Canada, Latin America and Southeast Asia."

Under the proposed deal, Repsol will pay $8.3 billion in cash for Talisman shares, a 56 percent premium to the Calgary-based company's market value of $5.33 billion on Monday. Repsol will also take on $4.7 billion of debt.

The Spanish company said the acquisition would boost its oil production by 76 percent to 680,000 barrels per day, while its reserves would increase 55 percent.

Talisman's board has approved the deal unanimously.

Repsol plans to issue about 5 billion euros in hybrid debt to secure its investment grade credit rating after the deal, due to close by mid-2015.

Repsol was advised by JP Morgan (>> JPMorgan Chase & Co.), while Talisman was advised by Nomura and Goldman Sachs (>> Goldman Sachs Group Inc).

(Additional reporting by Scott Haggett in Calgary; Editing by Jane Merriman and Peter Galloway)

By Julien Toyer and Jose Elías Rodríguez