An Iranian-Syrian man sells breads and pizza in the religious Shiite city of Qom, Iran © BEHROUZ MEHRI, AFP, Getty Images

Companies should start planning for Iran, analysts say, as the slow thawing of diplomatic relations with the country could open the door to foreign investment.

The Middle Eastern country, which has been on the receiving end of strict sanctions since its revolution in 1979, has been in political transition this year. Following presidential elections in June, hardliner Mahmoud Ahmadinejad was replaced by Hassan Rouhani who has since embarked on a series of charm offensives around the world – including a phone call last month with U.S. President Barack Obama.

Matthew Spivack, practice leader at emerging market advisory firm Frontier Strategy Group told CNBC that investors now need to start working a contingency plan for when, and if, sanctions are rolled back.

"Iran is not just about oil," he said. "FMCG (fast moving consumer goods) and healthcare companies prioritize Iran, because of very attractive demographics."

Tehran's stock exchange lists 339 companies on its website with a combined market capitalization of $104.21 billion. The country has the second largest population in the Middle East and North Africa region, according to the World Bank, with 77 million people -- three times the regional average. It has the fourth biggest oil reserves in the world, according to the U.S. Energy Information Administration, and the second biggest natural gas reserves -- second only to Russia.

Spivack expects Iran's public sector to attract a lot of foreign investment interest in the long term. One area ripe for Iranian government contracts would be the country's energy sector. If sanctions are lifted and Iran can start selling its oil and gas on the open market – at the moment it mainly deals with China and India – the country's energy infrastructure will need upgrading.

Sven Richter, head of frontier markets at Renaissance Asset Managers is another portfolio manager looking closely at the country. On the Tehran stock exchange the basic metals and banks are the latest sectors that are en vogue, he said, followed by telecoms.

"The stock market has the possibility of attracting attention as it's relatively large and liquid and could be an interesting part of a Frontier fund," he told CNBC.

"P/E (price-to-earnings) valuations ranging between 7 times and 11 times for many of these companies look attractive."

Even business leaders are looking closer at the country. Martin Sorrell, CEO of WPP -- the world's largest advertising company by revenue - included Iran in a list of frontier markets that the company was considering, adding that the "political noises" coming from the country were positive.

In recent months, Iran has held constructive talks with the United Nations about its controversial nuclear program. Iran and the U.S. also engaged in high-profile talks in September with President Obama speaking to Rouhani by telephone -- the first direct dialogue between the two counties for over three decades.

Last week, The New York Times reported that Hossein Naqavi Hosseini, the deputy head of the national security and foreign policy committee, has said Iran has cut the production of enriched uranium by up to 20 percent, a move closer to one of the key demands world powers have asked of it.

Downside risks

Spivack said that these are positive developments but he is cautioning his clients to manage expectations regarding the possibility of a diplomatic breakthrough.

"Even if a deal is reached, decades of an uncoordinated international sanctions policy would be difficult to roll back," he said.

Richter warned that while political upheaval in the country could lead to a thawing of relations, the constitution of the country still sets out that large industries should be government-owned. Another risk would be any reversal of the promising diplomatic work undertaken by Rouhani further down the road, he said.

Currency factors also pose a problem, with sanctions causing wild fluctuations in the value of the Iranian rial. In September 2012, data from Persian-language currency tracking website Mazanex showed the rial plunged to record lows against the dollar, according to Reuters, with the then President Ahmadinejad declaring that Iran was fighting an economic war. A weak currency makes imports more expensive and affects anything denominated in rials including wages, shares, houses, pensions and gold. Business can also find it hard to value its services with a fluctuating currency and set prices for its goods.

Nomura's Senior Political Analyst Alastair Newton told CNBC that potential investors need to be just as mindful of sanctions today as they were before the Iranian election.

"A presidential phone conversation alone hardly constitutes 'a thaw' after 34 years of non-communication," he said.

"If negotiations go well over the next several weeks (sanctions) may be eased. But of over 30 separate packages of U.S. sanctions only eight are controlled by the administration: Persuading Congress to ease sanctions will likely not be straightforward unless Iran were to give up its nuclear program altogether."

Click here to become a fan of MSN Money on Facebook

More from CNBC: