British energy giant BP said Tuesday that its decision to pull out of Russia as a result of the war in Ukraine pushed it deep into the red in the first three months of this year.

BP said in a statement that it booked its biggest-ever quarterly net loss of $20.4 billion (19.4 billion euros) in the period from January to March, compared with profit of $4.7 billion a year earlier.

Revenue jumped 40 percent to $51 billion in the three-month period as the war fuels a rise in oil and gas prices.

There have been repeated calls in Britain for a windfall tax on energy majors as consumers endure a cost-of-living crisis caused by the highest rate of inflation in decades, also as economies reopen from pandemic lockdowns.

Nevertheless, Prime Minister Boris Johnson, this week facing a mid-term test in local elections, ruled out such taxes on companies like BP and Shell, arguing it would derail efforts to meet climate goals.

"If you put a windfall tax on the energy companies, what that means is that you discourage them from making the investments that we want to see" in cleaner energy, Johnson told the television show, Good Morning Britain.

BP booked a pre-tax charge of $25.5 billion after pulling its 19.75-percent stake in energy group Rosneft, ending more than three decades of investment in Russia.

"Our decision in February to exit our shareholding in Rosneft resulted in the material non-cash charges and headline loss," chief executive Bernard Looney said.

That wiped out the positive effect of surging energy prices, driven by concerns of tight supplies following the invasion by major oil and gas producer Russia.

However, at an underlying level, rocketing energy prices enabled BP to record its best three-month performance since 2008 with profit of $6.2 billion.

Looney said that "in a quarter dominated by the tragic events in Ukraine and volatility in energy markets, BP's focus has been on supplying the reliable energy our customers need".

The European Commission was Tuesday set to propose to member states a new package of sanctions against Russia over President Vladimir Putin's decision to invade Ukraine, including an embargo on Russian oil.

And the EU has warned member states to prepare for a possible complete breakdown in gas supplies from Russia, insisting it would not cede to Moscow's demand that imports be paid for in rubles.

BP's decision to pull out of Russia following the war in Urkaine has pushed the oil major deep into the red
BP's decision to pull out of Russia following the war in Urkaine has pushed the oil major deep into the red AFP / Ben Stansall

BP also unveiled plans to invest up to ?18 billion ($22.5 billion, 21.5 billion euros) in green and fossil fuel operations in the UK by the end of the decade.

While Looney said BP was "fully committed to the UK's energy transition" to net zero, the company "intends to continue investing in North Sea oil and gas" amid Britain's near-term energy security needs in the wake of the Ukraine war.

"We're backing Britain," 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."

In the North Sea, BP plans to develop "lower emission oil and gas projects to support near term security of supply".

The company has also proposed new offshore wind projects and plans for hydrogen production facilities.

Despite the massive first-quarter loss, BP's share price jumped 2.9 percent to 403 pence in morning trade on London's FTSE 100 index, which was down overall.

Investors welcomed BP's announcement that it will repurchase $2.5 billion in shares.

"The exit from Russia, while bringing with it considerable costs, arguably helps with the transformation of the group and strong cash flow is helping to bring down debt," said AJ Bell investment director Russ Mould.

"BP has ambitious plans to become cleaner and greener but today's update is a reminder that fossil fuels, with all the environmental and geopolitical mess they entail, remain central to the company for now."