BP swung to a profit in the first three months of its financial year, on the back of higher oil and gas production and of a strong performance in both its core businesses.

The oil giant recorded a $1.45bn profit in the first quarter, compared with a $583m loss in the corresponding period last year and with a $497m profit in the final quarter of 2016.

Meanwhile, underlying replacement cost profits – a key metric for the oil industry – rose from $532m to $1.51bn, while revenue climbed to $55.6bn, beating forecast for a$50bn reading. The better-than-expected figures were helped by a sharp increase in oil prices, which have been about 35% higher in the first three months of the year compared with a year ago.

The FTSE 100-listed company, which kept its dividend unchanged at 10¢per share, added reported oil and gas production in the first quarter was 5% higher year-on-year, largely thanks to the ramp-up of major projects.

Earlier this year, the oil giant revealed it had finally drawn a line under the Deepwater Horizon disaster, which killed 11 people and kickstarted the worst oil disaster in US history.

In July, BP announced the amount spent on expenses and compensation for the disaster will amount to a total of $61.2bn, which is over half of the company's market capitalisation. The figure includes a $5.2bn charge BP booked in the second quarter of the year after reaching individual settlements with the US authorities, the tens of thousands of people affected by the spill and a number of investors.

However, the disaster's impact continued to linger on the group's financial results, as BP booked a pre-tax charge, predominantly related to finance costs for the unwinding of discounting effects, of $161m.

Excluding post-tax amounts related to the Gulf of Mexico oil spill, operating cash flow for the first quarter was $4.4bn, compared with $3.0bn for the same period in 2016. Including amounts relating to the Gulf of Mexico oil spill, operating cash flow rose to $2.1bn, compared with $1.9bn in the first quarter of last year.

The company added payments related to the Gulf of Mexico oil spill are expected to total between $4.5-5.5bn in 2017, with $2.3bn already paid in the first three months of this year , before falling to around $2bn in 2018.

"Our year has started well. BP is focused on the disciplined delivery of our plans," said group chief executive Bob Dudley.

"First quarter earnings and cash flow were robust.

"We have shown continued operational momentum – it was another strong quarter for the downstream and the first of our seven new upstream major projects has started up, with a further three near completion. We expect these to drive a material improvement in operating cash flow from the second half."

The London-listed company added an increase in production from new upstream projects is expected to improve its operating cash flow from the second half of this year, indicating it aims to keep capital expenditure between $15bn and $17bn for the year.

New projects remain on track

BP's major upstream project is on track to provide 800,000 barrels of oil equivalent per day of new production by 2020, while other projects under construction are on average ahead of schedule and 15% below budget.

The Trinidad onshore compression project, the first of seven major projects scheduled to start up in 2017, began operation last month, while the Taurus and Libra development of the West Nile Delta project in Egypt is ramping up and Quad 204 in the UK and Juniper in Trinidad & Tobago are also nearing completion.

A third gas discovery in the North Damietta Offshore Concession in the East Nile Delta in Egypt was announced in the quarter and, following completion of BP's entry into Mauritania and Senegal, exploration drilling in Senegal has begun.

Meanwhile, BP added it forecast divestments for the year to total between $4.5bn and $5.5bn, with proceeds weighted towards the second half of the year, after it received $300m from sales in the first quarter.

In the year to date, the company has reached two agreements to sell assets in the North Sea and recently announced the intention to divest its interest in the SECCO petrochemical joint venture in China.