Energy giant Shell said Tuesday it will withdraw from Russian gas and oil and immediately stop purchases of its crude, citing the country's ongoing invasion of Ukraine.

The company also apologised for buying a cargo of Russian oil last week, adding that it should not have happened.

"Shell today announced its intent to withdraw from its involvement in all Russian hydrocarbons, including crude oil, petroleum products, gas and liquefied natural gas in a phased manner, aligned with new (UK) government guidance," it said in a statement.

"As an immediate first step, the company will stop all spot purchases of Russian crude oil."

The group will also shut its service stations, aviation fuels and lubricants operations in Russia.

A wide-range of international companies have stopped doing business in Russia since President Vladimir Putin ordered the invasion of Ukraine late last month.

The United States said it was in talks with allies about banning oil imports from Russia, but Germany and other European nations have balked at the idea as the continent is highly dependent on Russian crude and gas.

British Prime Minister Boris Johnson stated Monday that it was "the right thing to do" to move away from Russian hydrocarbons -- but called for a gradual "step by step" approach.

Shell came under fire last week after it bought a shipment Russian oil at a vast discount, despite international outcry over the assault on Ukraine.

"We are acutely aware that our decision last week to purchase a cargo of Russian crude oil to be refined into products like petrol and diesel -- despite being made with security of supplies at the forefront of our thinking -- was not the right one and we are sorry," said chief executive Ben van Beurden.

Shell apologised for buying a cargo of Russian oil last week, adding that it should not have happened
Shell apologised for buying a cargo of Russian oil last week, adding that it should not have happened AFP / Oli SCARFF

The group has already pledged to commit profits to a dedicated fund for Ukraine.

"We will work with aid partners and humanitarian agencies over the coming days and weeks to determine where the monies from this fund are best placed to alleviate the terrible consequences that this war is having on the people of Ukraine," added van Beurden.

Shell had already announced just over one week ago that it will sell its stake in all joint ventures with Russia's state-controlled Gazprom.

The news came after rival British energy major BP decided to exit Russia, pulling its 19.75-percent stake in Rosneft.

Shell remains in "continuous discussions" with governments about "the need to disentangle society from Russian energy flows, while maintaining energy supplies", van Beurden added on Tuesday.

"These societal challenges highlight the dilemma between putting pressure on the Russian government over its atrocities in Ukraine and ensuring stable, secure energy supplies across Europe.

"But ultimately, it is for governments to decide on the incredibly difficult trade-offs that must be made during the war in Ukraine."

Shell will continue to work with governments to manage the impact on energy supplies particularly in Europe.

The group's share price dipped 0.2 percent in early afternoon deals on London's flat stock market.

"Shell's apology for buying Russian oil shows just how strong the winds of change are blowing through the corporate world," noted Hargreaves Lansdown analyst Susannah Streeter.

"But unwinding Shell's tentacles from the economy is set to be a complex affair and ... Shell has also warned that exiting Russia's energy sector will be hugely challenging, requiring concerted government action to ensure stable and secure supplies across Europe."