(Reuters) - BP reported higher than expected profit on Tuesday thanks to a jump in earnings from refining while the oil company's cash flow slumped after crude oil prices halved.

The British oil giant responded to the sharp drop in oil prices in recent months with a 13 percent cut in 2015 capital spending and a large restructuring program.

Chief Executive Bob Dudley vowed to maintain BP's dividend at 10 cents per share by "successfully resetting" its cost base, following the first quarter to feel the full impact of the halving of oil prices since June.

BP shares traded 1.7 percent higher at 485 pence at 0743 GMT, higher than the European oil and gas sector's 0.9 percent rise.

BP reported first-quarter underlying replacement cost profit, the company's definition of net income, of $2.58 billion. That was down nearly 20 percent from the same period last year but up 15 percent from the fourth quarter of 2014 and well above analyst expectations of $1.28 billion (1 billion pounds).

Pretax profit at BP's refining division jumped to $2.2 billion from $1 billion a year earlier, though profits from upstream oil production crashed to $604 million from $4.4 billion.

Production profits were hit in part by the cancellation of two deep water oil projects in the Gulf of Mexico which led to a $545 million loss for BP's U.S. upstream business.

"Earnings look very strong thanks to the downstream but underlying earnings in upstream and the overall cash flow were extremely weak," said Anish Kapadia, analyst at Tudor, Pickering Holt and Co.

BP's first-quarter cash flow plunged to $1.86 billion from $8.23 billion a year earlier due to lower oil prices and as a result of a large build-up in the company's oil stocks.

The company's first-quarter profits were also boosted by a one-off benefit from the British government, which announced a series of tax cuts for Britain's battered North Sea oil and gas producers.

BP said its effective tax rate on first-quarter profit was minus 42 percent, while it would have been plus 21 percent without the North Sea tax benefit.

Benchmark Brent prices LCOc1 averaged $55 a barrel in the first quarter of 2015, almost half the level of a year ago.

Estimated underlying net income from Russia's Rosneft, in which BP owns a 20 percent stake, was $183 million, down from $270 million a year earlier.

BP's first-quarter results included a $215 million non-operating charge as part of a $1 billion restructuring program that will include thousands of job cuts.