An oil price recovery helped BP swing back into profit for the first quarter - but it has warned that the market still faces uncertainty.
The FTSE 100-listed group - a mainstay of many UK pension funds - reported a replacement cost profit of $1.4bn (£1.1bn) for the January-March period, up from a loss of $485m (£377m) a year earlier.
It was helped by an uptick in the price of Brent crude as well as the impact of cost-cutting. Shares (Berlin: DI6.BE - news) initially rose nearly 3% and though some of the fizz later came out of the rally they were 1.6% up by the close of trading.
Oil firms have come under pressure after the cost of a barrel of Brent tumbled from more than $100 in 2014 to less than $30 last year, though there has since been a recovery to more than $50.
That has been helped by an agreement by oil-producing countries to curb production in the face of oversupply and weak demand.
BP finance director Brian Gilvary said: "The oil price is always going to be a factor, but we are performing well."
He said improved earnings reflected a recovering oil price as well as a focus on cutting costs, which are down by $7bn a year compared with 2014. BP has been cutting thousands of jobs in the face of the tough market.
But Mr Gilvary added: "The environment is still uncertain."
He pointed to factors such as whether oil production cuts are extended and the level of US shale gas flowing into the market.
BP is set to start seven production projects this year, the largest number in a single year in its history. It hopes to add 800,000 barrels per day of new production by the end of the decade.
The company also disclosed it had paid out $2.3bn in the first quarter related to the deadly Deepwater Horizon blow-out in the Gulf of Mexico that continues to weigh on the company, and is expected to make a total $4.5-$5.5bn in payments during 2017.
It has set aside a total of $62.7bn so far to cover costs since the disaster, adding a $161m charge during the first quarter.
In February, BP reported an annual loss of $999m for 2016.