(Reuters) - Spain's Repsol has agreed to buy Talisman Energy, Canada's fifth-largest independent oil producer, for $13 billion, showing how the drop in oil prices is pushing 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 like Talisman, spurring renewed interest from Repsol which has long been searching for oil and gas assets in North America and elsewhere.

But analysts said the Spanish companyhttp://images.intellitxt.com/ast/adTypes/icon1.png had paid a hefty price for Talisman and in the long term it could have to consider a sale of its 30 percent stake in Gas Natural.

Repsol chairman Antonio Brufau told analysts the group was not considering such a sale and would also not be rushed into divesting some of the Talisman assets that overlap with Repsol.

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

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 ... so the sooner, the better." He said Talisman had what Repsol was looking for: growth in upstream business, geographical diversification and shale assets.

Repsol shares were 1.9 percent lower at 15.395 euros by 1035 GMT. Shares in Talisman rose 46 percent to $7.45 in trading before the morning bell in New York after closing on Friday at $5.12 a share.

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 South East Asia."

They said they were disappointed Repsol had decided not to wait longer through what could be a prolonged downturn to make acquisitions.

Under the proposed deal, Repsol will pay $8.3 billion for 100 percent of Talisman shares which represents 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.

It will bring annual benefits worth $220 million and become accretive for earnings in 2017. Repsol is paying mostly in cash. It got $6.3 billion from Argentina in compensation for YPF and the sale of outstanding shares in the Argentine company.

Talisman said its board had unanimously approved the deal.

The two companieshttp://images.intellitxt.com/ast/adTypes/icon1.png held merger talks earlier this year but they broke down last summer because of Talisman's underperforming North Sea operations, much of which are in a joint venture with China's Sinopec.

Much of Talisman's western hemisphere operations were profitable while oil prices were high, but its North Sea businesseshttp://images.intellitxt.com/ast/adTypes/icon1.png have weighed on the company because maintenance work on aging platforms has made production targets unreliable and decommissioning obligations have increased.

The company, whose shares have fallen sharply this year, has said it could take a charge against its operations in the region, which would be recorded in the fourth quarter if needed.

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 while Talisman was advised by Nomura and Goldman Sachs.