Iranian President Hassan Rouhani arrives at a news conference in Tehran on Aug. 29, 2015, walking by a picture of the supreme leader, Ayatollah Ali Khamenei. (AP Photo/Ebrahim Noroozi)

While the international community squirmed in distress when Britain voted to leave the European Union, there was one country that was quick to voice its optimism: Iran. Even though only a few Iranian political and military leaders decided to speak about Brexit, the ones who did expressed support and even enthusiasm for the referendum.

"The departure of England from the E.U. 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 Aboutaebi, wrote in a tweet.

“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 Iranian Foreign Ministry said in a statement Friday.

"A large earthquake shook Europe. The stars of the E.U. flag are currently falling. It is a long time that the E.U. has lost the trust of the people," Aboutaebi added.

With many political analysts and economic experts raising concern that a post-Brexit world could negatively impact the economy and fuel mistrust of Western institutions, WorldViews answers why Iran might support Brexit:

Why does Iran view Brexit as a 'win'?

Some Iranian officials see a Britain outside the E.U. as a major geopolitical reshuffle that might give Iran more leverage in a political environment that has historically been against it.

Iran's relationship with Britain and the rest of Europe is complex and dates back before the 1979 Islamic Revolution. In the 1950s, Britain opposed the nationalization of Iranian oil and eventually, with the support of the United States, backed a coup to replace Prime Minister Mohammed Mossadegh, who wanted to take back control over Iran's oil.

Why is this important to Iranians?

Iranians saw this as a direct attack on their sovereignty and independence. Along with other things, this remains a strong reason for continued mistrust between Iran and Britain and could partially explain the lingering resentment. As the deputy chief of staff of Iran's armed forces, Brig. Gen. Massoud Jazayeri, was quoted as saying after Brexit: "Britain must pay the price for years of colonialism and crimes against humanity."

Jazayeri's choice of words to describe Britain isn't uncommon. Many officials within Iran's establishment still hold resentment of British and U.S. meddling in Iran's affairs, and use it as part of their propaganda to maintain public support in post-revolutionary Iran. For example, Iran's supreme leader, Ayatollah Ali Khamenei, during his sermons or television appearances, has referred to Britain as "wicked" and "evil."

Despite this, President Rouhani did make it a point to establish ties by reopening the British Embassy in Tehran in 2015 after it had been closed for four years.

But could Brexit actually be a 'historic opportunity' for Iran? 

Though they haven't gone into detail, it's possible to speculate that some Iranian officials were thrilled with the announcement for economic reasons. Europe is an important trading partner for Iran. And as an emerging market, some Iranian officials believe, Iran stands to benefit from business opportunities. In addition to having an easier time making business deals  with individual European countries such as Italy, Greece or Spain, as BuzzFeed's Borzou Daragahi points out, Britain might also stand to benefit.

In fact, Britain has been trying to increase trade with Iran for two years with no success, according to Lobe Log's Esfandyar Batmangheldj. He also noted how Lord Norman Lamont, Britain's formal "trade envoy" to Iran, is a supporter of Brexit. However Batmangheldj, who is a researcher on Iranian political economy and social history, also expressed skepticism. "Practically speaking, Iran will not be a priority in the post-Brexit economic agenda," he wrote.

Why does Iran think Brexit would be a rejection of U.S.-style policies? 

The British people's decision to leave the E.U. is a "rejection of America's imposition of will against European states," said Jazayeri, the armed forces deputy chief of staff, according to Mehr News. He added later that "the only path to protect the E.U. is the open and practical independence from the White House."

It's not clear how some Iranian politicians see a Britain separated from the E.U. as less open to American influence. But it is true that the United States influenced the E.U. to impose trade sanctions on Iran because of its nuclear program, which it curtailed under the Joint Comprehensive Plan of Action (JCPOA), an agreement reached between Iran and six world powers almost one year ago. Perhaps officials in Tehran think that a Britain separate from the E.U. would have weaker relations with the United States.

But could Brexit affect the U.S. relationship with Britain? 

President Obama made it clear that the American relationship with Britain won't be affected by the vote. Although he was in favor of Britain remaining part of the E.U., Obama said in a statement in that "the special relationship between the United States and the United Kingdom is enduring, and the United Kingdom's membership in NATO remains a vital cornerstone of U.S. foreign, security and economic policy."

Read more: 

Young Brits are angry about older people deciding their future, but most didn't vote

Bregret? Regrexit? Don't bet on it. 

This video shows what some Brexit supporters are fearful of: Muslim immigration