By Christopher Bjork 

MADRID-- Repsol SA said Thursday its adjusted profit tripled in the fourth quarter as the Spanish company was sheltered from the oil price plunge by higher refining margins and falling financing costs.

Repsol said adjusted profit, which excludes gains or losses in the value of inventories and one-off items, rose to EUR370 million ($420 million) between October and December compared with EUR123 million a year earlier.

Repsol, whose origins lie in refining, spent EUR4 billion in recent years modernizing two of its five refineries in Spain, allowing it to produce more refined products and operate at a profit when crude oil was selling above $100 per barrel. When oil prices went into free fall in recent months, Repsol's refining margins widened sharply, injecting a further boost.

For the full year, Repsol's adjusted profit rose 27% to EUR1.71 billion. Oil prices fell 48% over the course of last year, mostly during the second half of the year.

Including inventories and one-offs, Repsol reported a net loss of EUR34 million, compared with a net loss of EUR1.09 billion in the fourth quarter of 2013. Sliding oil prices in the quarter led Repsol to lower its valuation of its oil inventory by EUR489 million.

The large loss in the year earlier was mainly a result of charges related to the Argentine government's expropriation of Repsol's unit YPF SA. Repsol received $5 billion in compensation from Argentina for the nationalization last year.

Oil and gas production in the fourth quarter grew 16%, as Repsol started extracting hydrocarbons from new projects in Peru and Brazil. Even so, the upstream operations earned a meager EUR4 million for Repsol in the quarter, compared with EUR162 million in the fourth quarter of 2013. Repsol sold crude oil in the fourth quarter at an average price fo $61.3 a barrel, 28% lower than a year earlier.

This weakness was more than offset by soaring profits at Repsol's downstream operations, which include refining and sales at the company's network of gas stations around Spain. The Madrid company earned $5.5 per barrel refined, up from $4.1 a barrel a year earlier.

Repsol has the capacity to refine just under a million barrels of oil per day, after it upgraded its Cartagena and Bilbao refineries in recent years, turning them into some of the most efficient in Europe.

Repsol's refineries churn out mostly diesel, which is widely used in France and Spain, as well as a smattering of chemicals. The downstream operations recorded a fourth quarter income of EUR370 million, compared with EUR21 million a year earlier.

Just three of Europe's big oil companies have posted growing annual profits in 2014: Repsol, Galp Energia SA of Portugal and Royal Dutch Shell PLC. All of them got a windfall from refining.

Repsol lowered its net debt by 64% on the year, pushing down the company's financing costs. Net debt fell as a result of the sale of Repsol's liquefied natural gas assets to Shell, and compensation it received last year from Argentina.

Repsol had a debt of EUR1.94 billion at the end of the quarter, and it held a cash position of EUR9.84 billion.

The bulk of this cash will go into the $8.3 billion takeover of Talisman Energy Inc., announced by Repsol in December as oil prices were in free fall. The closing of the deal, expected during the second quarter, will allow Repsol to roughly double in daily oil production.

Write to Christopher Bjork at christopher.bjork@wsj.com

Subscribe to WSJ: http://online.wsj.com?mod=djnwires