BP has notched up its highest quarterly underlying profits for more than a decade thanks to rocketing oil and gas prices as calls grow for a windfall tax on the sector.

The energy giant explained the profits were in part a result of "exceptional oil and gas trading".

The announcement comes as the UK records its highest rate of inflation for 30 years and faces a cost of living crisis partly driven by ballooning energy prices.

BP saw underlying replacement cost profits – its preferred measure – more than double to $6.2 billion (£5bn) for the first three months of the year from $2.6bn US dollars (£2.1bn) a year ago.

The result was far better than the $4.5bn (£3.6bn) expected by analysts and is likely to further fuel demands for a windfall tax on oil and gas firms to help ease the cost-of-living crisis.

READ MORE: 'Boris Johnson like a sleeper agent for Scottish independence,' says comedian Nish Kumar

Responding to the news, the Scottish Greens have renewed calls for a windfall tax on energy companies.

The Scottish Greens’ energy spokesperson, Mark Ruskell MSP, said: "Far too many families are struggling and facing costs they simply cannot afford. Nobody should have to choose between heating and eating, but for some they can now afford neither.”

“For the fossil fuel giants times have rarely been better. Introducing a windfall tax on the obscene profits made by the big energy companies would be a vital step in raising the money that is needed to help households pay for their fuel bills.

“It would allow us to supercharge energy efficiency programmes, invest in renewables at a faster rate, and help homeowners to decarbonise their homes to make them warmer and more energy efficient.”

“We need immediate action from the Treasury before costs go up again. There is no time to waste if we are to take the climate action that is needed to reduce household bills and accelerate our pathway towards a just transition away from fossil fuels.”

The National: National Extra Scottish politics newsletter banner

Chancellor Rishi Sunak has so far distanced himself from slapping a tax on firms like BP, instead looking to companies making big profits to invest the cash back into the UK.

In response, BP unveiled plans alongside its quarterly figures to invest up to £18bn into the UK energy system by 2030.

It pledged to invest in North Sea oil and gas, while driving down operational emissions, and said it is also working on a range of lower-carbon energy projects in the UK, which are set to create jobs and develop new skills.

In a further sign that it is seeking to head off criticism, BP also stressed it expects to pay up to £1bn in taxes for its 2022 North Sea profits, on top of around £250 million paid annually in other UK taxes.

BP chief executive, Bernard Looney, said: “It’s been our home for over 110 years, and we’ve been investing in North Sea oil and gas for more than 50 years.

“We’re fully committed to the UK’s energy transition – providing reliable home-grown energy and, at the same time, focusing on the drive to net zero.”

READ MORE: Boris Johnson brags about bus passes in GMB grilling on cost-of-living crisis

It wasn’t all good news for BP, however, as it announced that, on a statutory basis, it swung to a $23bn (£18.4bn) loss after taking a mammoth $25.5bn (£20.4bn) hit from its move to ditch its near-20% stake in Russian oil producer Rosneft. BP co-owned Rosneft with the Kremlin but dropped its shares in response to the Ukraine war.

BP said it hopes this will not affect its shareholder rewards as it announced another $2.5bn (£2bn) in share buybacks on the back of its underlying profit haul.

Looney said: “Our decision in February to exit our shareholding in Rosneft resulted in the material non-cash charges and headline loss we reported today.

“But it has not changed our strategy, our financial frame or our expectations for shareholder distributions.”

Susannah Streeter, senior investment and markets analyst at Hargreaves Lansdown, said that, with oil prices up 40% since the start of the war and a “growing expectation that the European Union will slap a ban on Russian crude exports at the end of the year, the price is set to stay elevated, which will help BP recoup the cost of its expensive [Rosneft] exit”.