* Biggest economy to rejoin global system in decades
* Sanctions likely to stay in place for some months
* But trade may boom quickly, followed by portfolio investment
* Large-scale foreign direct investment to take much longer
* Winners and losers among surrounding countries
By Andrew Torchia
DUBAI, July 14 (Reuters) - Iran is preparing for a trade and investment boom that could reshape the region after agreeing with world powers to curb its nuclear programme, paving the way for sanctions that have stifled its economy to be lifted.
With just under 80 million people and annual output of some $400 billion, Iran is set to be the biggest economy to rejoin the global trading and financial system since the break-up of the Soviet Union over two decades ago.
"This is the deal that we have been waiting for, the one that will open the doors," said Iranian investment banker Xanyar Kamangar, founding partner of Griffon Capital, an asset management and corporate advisory firm in Tehran.
The toughest sanctions look likely to remain in place for at least several more months; the agreement says measures such as U.S. and European banking restrictions will be lifted only when the International Atomic Energy Agency has verified that Iran is keeping to its side of the bargain.
For this reason, and because Iran needs to repair its dilapidated infrastructure, some of the benefits of lifting sanctions will be slow to come. It may take years for oil exports to return to the pre-sanctions levels of four years ago, almost three times the 1 million barrels per day that Iran exports now.
But the nuclear deal will provide an immediate boost to Iran by making companies around the world more comfortable dealing with it, and by encouraging the Iranian diaspora to send money home, businesspeople said.
Neighbouring countries will feel the impact fastest.
Although most Gulf Arab oil exporters may lose out as the prospect of more Iranian supply pushes down crude prices, trading centres such as Dubai can look forward to resuming their traditional role as a hub for business with Iran.
Economists estimate that a third of Iranian industry may have been idled by the sanctions, which the U.S. Treasury estimates cut Iran's GDP by a fifth; much of this could now revive as trading ties with the West are re-established.
Meanwhile, the modernisation of Iran's oil industry, and infrastructure projects that were put on hold during the sanctions years, are expected to boost imports of commodities such as cement and steel.
Iran's trade with the European Union last year totalled 7.6 billion euros ($8.4 billion). In 2011, before banking sanctions hit, it was 27.8 billion euros - a measure of the ground that may be recovered.
Portfolio investment into Iran may also increase quickly, as frontier market funds enter a $100 billion stock market that is very cheaply valued by international standards.
Further out, many firms are likely to establish a presence in Iran through representative offices, partnerships and franchise agreements. Some Western fast food and clothing franchises are already present, operating via Turkey, Tehran businessmen say.
Large-scale foreign direct investment may take at least a year or two; big Western firms will want banking networks to be rebuilt first, and will be wary of provisions for sanctions to "snap back" if Tehran is seen to violate the agreement.
But Iran is hungry for foreign capital. Mohammad-Baqer Nobakht, head of the state Management and Planning Organisation, said last week that Iran's 2016-21 development plan would need investment of $361 billion; he estimated only $204 billion could be raised domestically, leaving the rest for foreign sources.
The five-year plan envisages annual economic growth of 8 percent, matching Asia's "tiger economies" during their boom years. Private economists think that level is possible if the government removes red tape and deregulates the labour market.
Iran has as large a population as the six wealthy Gulf Arab oil exporting states and Iraq combined. For most of the past decade, those states boomed while Iran struggled; now the pattern may shift radically.
"Iran could turn into an engine of economic growth for the whole region," said Ramin Rabii, chief executive of Tehran-based financial firm Turquoise Partners.
With its several hundred thousand ethnic Iranian residents, Dubai in particular is likely to be used as a staging post for foreign companies going back into Iran.
Energy-hungry Oman may be another beneficiary. Last year it agreed to import gas from Iran in a deal that would involve building a $1 billion pipeline across the Gulf; with sanctions lifted, the project looks more likely to go ahead.
Regional transport and logistics companies could also prosper from an Iran boom. Shares in Dubai port operator DP World climbed 1.4 percent on Tuesday; Kuwait-based logistics giant Agility gained 1.5 percent.
But some countries and firms profited from helping Iran survive the sanctions, and they may now suffer from greater competition. India, for instance, did not back the sanctions, and has seen its exports to Iran double to $5 billion in the past three years.
Most of the Gulf Arab oil exporters have minimal commercial ties with Iran so they stand to gain little. Instead, financial pressures on them may increase if the return of Iran to the global oil market forces them to give up market share.
Saudi Arabia's economy grew solidly in the first quarter of this year partly because it raised oil output by 350,000 barrels per day, or 3.6 percent, in the year to March. Fresh Iranian supply in the next 18 months could be many times that amount.
Gulf Arab states are keen to attract foreign capital; Saudi Arabia opened its bourse to direct foreign investment last month. They will now face additional competition for funds from Iran, a more diverse economy. (Editing by Kevin Liffey)