By Isla Binnie

Sagging oil prices pulled Repsol first-quarter profit down 28% but that beat expectations, making shares in the Spanish energy company top gainers in Madrid on Tuesday.

Oil prices fell 65% in the quarter as the coronavirus pandemic curbed demand and producers Saudi Arabia and Russia failed to renegotiate fresh output cuts.

Repsol's adjusted net profit fell 28% to 447 million euros ($488 million), but that was well above the 330 million euros expected by analysts in data compiled by the company.

It maintained a dividend of one euro per share, but scrapped a plan to reduce its number of shares by 5%. A plan to cut carbon emissions to net-zero remained intact, the company said.

Repsol shares were up 7.6% at 0838 GMT to lead Madrid's main bourse which was up 1.2%.

The numbers were "overall positive for the stock as adjusted net profit came above consensus estimates", Madrid-based CM Capital Markets said in a note to clients.

Analysts at brokerage Renta4Banco also said the numbers were better than the expected. A bond sale in April and sufficient cash flow from operating activities to cover investments, interest payments and dividends all reinforced its positive view of the stock in the medium term, they said.

DIFFICULT TO PREDICT

Repsol warned it was difficult to forecast how the pandemic would affect the company in the coming months. It has already slashed 2020 spending plans.

"The effects of the COVID-19 pandemic are having a significant effect on demand, resulting in an excess of supply not seen in decades that is weighing on oil prices," Repsol said in a statement.

"It is difficult to predict to what extent and for how long the impact of the pandemic will affect Repsol's businesses in the future," it added, noting there may be a negative impact on prices and production and sales volumes as well as the cost of capital and the solvency of its clients and partners.

In the first quarter its upstream division, which explores and drills new wells, suffered due to the tumble in crude prices and a 35.5% fall in Henry Hub natural gas prices.

Its downstream activities, including refining and selling products, fared better, with higher refining margins in Peru, a boost from wholesale and gas trading and smaller losses on intra-group oil sales.

Larger French peer Total reported a 35% fall in net profit on Tuesday.

Repsol shares are down 41% this year versus the STOXX Europe 600 Oil & Gas Index which is down 35%.

(Reporting by Isla Binnie, editing by Louise Heavens and Jason Neely)