This past weekend's deal between Iran and the P5+1 (the UN Security Council's five permanent members plus Germany) amounts to only minor changes in a series of international sanctions that have left Iran isolated from much of the world and cut off from global markets.

Still, the six-month interim deal is a historic moment, and one which could be followed up by a final deal that starts Iran on a path of full accord with the rest of the world and reintegration into the global economy. 

Several years of worsening sanctions have left Iran an economic basket case with soaring inflation and acute shortages, and its oil infrastructure is in rough shape. Still, nearly 80 million people and one of the world's largest proven energy reserves make a recipe for recovery -- and opportunities for a lot of companies.

The first and most obvious beneficiaries of an Iranian recovery would be oil companies. It's impossible to say for sure which companies would get those development contracts, but the recent Iraqi deals give us some pretty good hints.

Petrochina (NYSE:PTR) and Russia's Lukoil (NASDAQOTH:LUKOY) would be prime candidates for these potentially lucrative contracts: Not only are they both major players in Iraq, but Russia and China have retained better ties with Iran than the rest of the P5+1, meaning their companies will likely have an edge in negotiations that ExxonMobil and France's Total SA lack.

Re-modernizing an economy of 80 million people is about more than just oil; it means importing all sorts of consumer and industrial goods that have been in short supply in recent months.

As with post-Soviet Russia or China when it opened up to Western markets, it would be open season for everybody -- but Iran's isolation was not self-imposed, and some companies have an existing presence, putting them at a clear advantage.

Samsung (NASDAQOTH:SSNLF) is a major example. The company is a popular cellphone-provider in Iran, and it took a large share of the Iranian market after Nokia pulled out. It even has an Iranian localized app store all ready to go for its phones. The app store was shut down earlier this year due to U.S. sanctions, but it could doubtless be brought back online much more quickly than potential rivals could build a brand-new competing service.

Siemens (NASDAQOTH:SIEGY) has long-standing industrial ties with Iran as well. This was made particularly apparent when the Stuxnet worm was designed to target Siemens systems in an attempt to sabotage Iran's civilian nuclear program -- but quickly spread into other industries and eventually other countries. Stuxnet aside, Siemens is already a big player in Iran and could benefit enormously as Iran's economy recovers and its industries look to modernize. 

There are still a lot of possible obstacles to an Iranian rapprochement, but the potential is impossible to ignore, and the benefits are far-reaching. Even though Israel's government has harshly criticized the diplomacy with Iran, the Israeli stock markets have seen gains since the interim deal was announced. Investors clearly see Israel not going to war with Iran as good news for the Israeli economy and are hoping for a peace dividend there.

The same is potentially true across the world, and the simple answer is that virtually everyone will benefit from reopening the Iranian market. Who will benefit the most remains an open question -- but a potentially lucrative one for those who keep a close eye on the talks.