BP notched up second quarter pre-tax profits of £700million, rebounding from a £2.5billion loss a year ago.
Sales increased by a fifth to £42.8billion, though net debt at June 30 was £30.1billion, up from £23.4billion a year ago.
The oil major generated £380million through divestments during the three months. BP said its divestments total for the full-year could reach £4.2billion.
The company’s upstream production was 10% higher than in the same period in 2016.
Highlights for the quarter included first oil from the redeveloped Schiehallion area west of Shetland as part of the Quad 204 project, which BP operates.
Exclusive Video: BP hails Quad 204 start-up as oil major returns to North Sea growth
BP also sanctioned two new projects in the quarter and announced large gas discoveries in Senegal and Trinidad, though it did suffer a £570million exploration write-off, predominantly in Angola.
The firm said it was on track to deliver 800,000 barrels of oil equivalent (boe) per day of new production by 2020.
Three projects, including Quad 204, have already come online this year.
Developments in Australia and in Trinidad have reached the final commissioning stage, and Khazzan Phase 1 in Oman and Zohr in Egypt are expected to start up before year end.
In downstream, first-half fuels marketing brought in 20% more than in the first half of 2016.
Second quarter organic capital expenditure was £3.26billion, compared with £3.18billion for the same period in 2016.
BP made a £1.5billion payment linked to the 2010 Gulf of Mexico oil spill during the second quarter. The full-year figure is expected to reach between £3.4billion and £4.2billion.
BP chief executive Bob Dudley said: “We continue to position BP for the new oil price environment, with a continued tight focus on costs, efficiency and discipline in capital spending.
“We delivered strong operational performance in the first half of 2017 and have considerable strategic momentum coming into the rest of the year and 2018, with rising production from our new upstream projects and marketing growth in the downstream.”
Biraj Borkhataria, analyst at RBC Europe, said: “BP has underperformed its peers recently and we would expect some of that underperformance to reverse in the near term.”
The dividend was unchanged at 8p per share.
BP shares were up 3.34% to £4.60 on the London Stock Exchange in early trading.
It follows on from a healthy second-quarter performance for rival Royal Dutch Shell, which reported a large rise in profits boosted by higher oil and gas prices.
Shell said adjusted earnings rose from £800million) to £2.7 billion, an increase of 245%, as chief executive Ben van Beurden said he is making progress on “reshaping the company”.
Nicholas Hyett, equity analyst at Hargreaves Lansdown, said the legacy of the Deepwater Horizon disaster was still stalking BP.
He said: “Were it not for the Deepwater Horizon oil spill more than seven years ago, BP would be in pretty good shape right now.
“Despite the tough oil price environment, cash flows would be comfortably ahead of capex and dividend expenses, and the group is still managing to spend a reasonable amount on developing new fields.
“As it is, the Gulf of Mexico payments, which had a negative cash impact of around $2billion this quarter, continue to weigh on the group and are forcing it to take on an ever larger debt burden.
“Fortunately the group’s upstream division has delivered a strong set of numbers this time out, and while the downstream refining business hasn’t delivered the growth we’ve seen from the likes of Shell, it remains robustly profitable.
“Gulf of Mexico costs are expected to fall from here, but BP remains a bit of a waiting game.”