The EU is updating legislation to allow European companies to avoid US sanctions when doing business with Iran, the BBC reported.

The measure will exempt European companies from having to comply with US penalties and will provide compensation to affected firms. It is scheduled to be in place by August 6, when the first round of sanctions take effect.

The “blocking statute” legislation was first introduced in 1996 to circumvent US sanctions on Cuba, but was never used.

European energy companies’ interests in Iran are currently under threat by the re-imposition of US sanctions. French major Total’s $5 billion deal to develop the South Pars gas field, and Norwegian Saga Energy’s $3 billion agreement to build solar power plants are among those affected.

Total announced on May 16 that it would abandon its multibillion dollar agreement if it did not receive a waiver from the US exempting it from sanctions.

On May 8, US President Donald Trump announced that the US would withdraw from the 2015 Iran nuclear deal – which eased sanctions in exchange for Iran curbing its nuclear program – and would re-impose sanctions on the Islamic republic.

The US Treasury Department will give companies between 90 and 180 days to end their commercial activities in Iran.