With Britons having voted to exit the European Union, Britain could eventually expand its trade with Iran — a country hungry for foreign investment, especially in its energy sector, compliance attorneys at the New York-based Sheppard Mullin told International Business Times. In the wake of a so-called Brexit, a warmer relationship between Britain and Iran could offer both countries solid economic opportunities.

Certain sanctions on Iran implemented by the EU during the past two decades would not necessarily be applicable to Britain after it formally leaves the bloc. Britain would no longer be bound by EU decisions and directives, including bans on dealing with designated organizations and people connected with Iran’s purported human rights abuses, such as the Islamic Revolutionary Guard Corps, the elite branch of the country’s armed forces.

After Britain's vote to leave the EU last week, Iranian officials celebrated.

“The departure of England from the EU is a ‘historic opportunity’ for Iran — an advantage must be taken from this new opportunity,” President Hassan Rouhani’s deputy chief of staff for political affairs, Hamid Aboutalebi, tweeted in the wake of the referendum.

And the Iranian Foreign Ministry said in a statement, “As a democratic establishment, the Islamic Republic of Iran respects the British people’s vote on leaving the European Union, and considers that as being in line with the will of majority of that country’s people to adopt their own foreign policy.”

The effects of American sanctions on Iran will not change with respect to Britain. A U.K. outside the EU would still be able to conduct business with Iran generally, as long as the transactions did not involve U.S. banks, U.S. dollars or U.S. citizens, compliance lawyers at Sheppard Mullin said.

Moving forward, though, the U.K. needs to keep its security goals in mind while managing its trade. The country’s security is contingent in part on its relationship with the U.S., which is working to build its own ties with Iran.

The Iranian government is focusing its trade deals on the airline industry and the energy sector.

Iran announced this month a major agreement with Boeing that would authorize the buying of 80 passenger planes and the leasing of 29 others, making it one of the Islamic Republic’s biggest deals with an American manufacturer since some sanctions were lifted this year. The European aircraft manufacturer Airbus is also engaged in a transaction with Iran.

Meanwhile, Britain is positioned to reach an agreement with Iran in the energy sector.

With the international deal on Iran’s nuclear program becoming effective early this year, the EU already has begun rolling back its sanctions on Iran, with an eye on new energy opportunities in the country. In January, the prohibition on financial transactions involving Iran was lifted, including the transfer of funds between financial institutions and individuals. Trade in oil and gas between the EU and Iran was rebooted while sanctions relating to shipbuilding, insurance and aviation were lifted.

Although the U.S. and other European countries can carry out trade with Iran, conducting trade with Britain after it leaves the EU in many ways should be easier because London will not be bound by Brussels.

Europe in general and Britain in particular have been looking for sources of crude oil and natural gas products while avoiding Russia. Since 2014, Turkey has put forward several plans to provide Europe with an alternative to Russia, and Iran could offer another alternative.

Tehran said in January it had set a two-year target to supply the European market with liquefied natural gas. Outside Russia, Iran is believed to hold the world’s largest natural gas reserves. Greece is in talks with the Islamic Republic not only to get natural gas for domestic use but also to serve as a gateway to supply the fuel to other European countries.

Countries among the biggest suppliers of oil and gas to Britain are Russia, Norway, Nigeria and Algeria.