BP announced higher-than-expected third-quarter profits on Tuesday, boosted by high commodity prices and vigorous gas marketing and trading.

For the three months ending Sept. 30, the British oil giant reported an underlying replacement cost profit of $8.2 billion, which is used as a proxy for net profit. This compares to $8.5 billion in the previous quarter and is a huge increase from $3.3 billion a year ago.

The world's leading oil and gas companies have recorded enormous profits in recent months, thanks to rising commodity prices as a result of Russia's invasion of Ukraine.

On Monday, U.S. President Joe Biden warned oil companies to avoid "war profiteering" and threatened to raise taxes if they did not cooperate with efforts to lower petrol costs.

BP reported net debt was down to $22 billion from $22.8 billion in the second quarter and announced an additional $2.5 billion in share repurchases.

It recorded a $2.2 billion financial loss for the period, down from a $9.3 billion profit the prior quarter. According to BP, this third-quarter result includes a charge for adjusting items net of tax of $8.1 billion as well as inventory holding losses net of tax of $2.2 billion.

Exxon, Shell, TotalEnergies, and Chevron have reported third-quarter profits totalling approximately $50 billion when combined with BP.

This has reignited calls for increased taxes on record oil company profits, especially at a time when increasing gas and gasoline costs have fueled global inflation.

Oil and gas industry groups have previously criticized suggestions for a windfall tax, claiming that it would fail to address a significant increase in energy prices and would ultimately discourage investment.

Environmental campaigners called BP's third-quarter earnings "a slap in the face" for the millions of Britons suffering a worsening cost-of-living problem.

On a panel moderated by CNBC, BP CEO Bernard Looney said that he understood the public's interest in the oil majors' record profits, but he sought to defend the company's track record when it comes to investing and paying taxes. Looney was speaking at the ADIPEC conference in the United Arab Emirates on Monday.

"We are facing a very difficult winter ahead in the U.K., in Europe and right across the world," Looney said. "Our job is to pay our taxes; our job is to invest. We just announced a $4 billion acquisition in the United States just last week in renewable natural gas so that's what our job is to do. We will continue to do that and do the very best that we can."