Shell is writing off up to $5 billion in assets after pulling its Russian operations.

The energy major announced on March 8 that it would withdraw from the Russian oil and natural gas sector, as well as close all of its service stations in the country. It followed an announcement that it would exit its investments in other Russian energy projects.

Shell said in an earnings update on Thursday that there would be an impact from impairment of non-current assets and additional charges relating to Russia activities.

Russia is the third largest oil producer and the second largest crude oil exporter.

Shell said on February 28 that it would limit business with Russia by pulling out of the Nord Stream 2 project and selling off its joint ventures with the Kremlin-owned energy company.

The firm was criticized five days later for purchasing a cargo of Russian crude oil.

On Thursday, the firm said that it had not renewed longer-term contracts for Russian oil, and will only do so under explicit government direction, but we are legally obliged to take delivery of crude bought under contracts that were signed before the invasion.

Shell was one of a number of Western oil firms that decided to stop operations in Russia after the outbreak of the conflict and the subsequent package of international sanctions.

The firm said it would take a $25 billion charge because of the invasion of Ukraine.

ExxonMobil announced that it would stop operations at the Sakhalin-1 oil and gas venture, a project it operates on behalf of an international consortium of Russian, Japanese, and Indian companies.

Russia's energy sector has been a target for Western governments.

The European Commission said it could reduce EU demand for Russian gas by two-thirds by the end of the year under a plan to diversify supplies.

It became the first EU country to completely cut off Russian gas imports. The US wants to squeeze Russian natural gas exports.

Russia's finance ministry said on Tuesday that revenue from the country's oil and gas sales in March was 38% lower than it had initially forecast.