It was a week full of portents for Egypt, Iran, and Iraq

Egypt, Iran and Iraq all evoke grand historical memories of great and thriving civilisations. But it's what happens next in these three nations that will determine the future of the region to a large extent.

Powered by automated translation

Egypt, Iran and Iraq each had an eventful week, one that sends meaningful signals about the future of each.

And what happens next in these three states, each the heir to an ancient civilisation, will also have considerable effect on the future of the region.

Egypt held a watershed presidential election - the first in the country's 5,000-year history.

Iran faced off with the world's powers - the five permanent members of the Security Council plus Germany, the P5 +1 - in the most serious discussion ever of its highly contentious nuclear programme.

And Iraq achieved two quiet milestones: it surpassed the 3 million barrels-per-day mark in oil production, and hosted the Iran nuclear talks without incident. It was the second high-level diplomatic meeting held in Baghdad recently.

The developments in the three countries are linked, both directly and indirectly.

Egypt faces the possibility of a presidency and a Parliament controlled by the Muslim Brotherhood, prompting more secular and non-Muslim Egyptians to be concerned about a heavier religious influence in governance.

The shriller opponents of this possibility cry "Iran!" and raise the spectre of a theocratic republic.

But this "Iran model" that has become a two-word warning is actually a model that no one should want to emulate: the Islamic Republic of Iran has under-delivered economically, has repressed Iranians politically, has marginalised the state internationally, and has executed more political opponents in an afternoon than the Shah of Iran did in his entire 38-year reign.

Meanwhile a battered but not yet beaten Iraq quietly rises.

Let us first examine the case of Egypt. The election was by all the evidence free and fair, but the results have been deeply unsettling to many Egyptians, particularly those who took part most actively in the early stages of the revolution - youth groups and the social-media-savvy secular middle class. After all, the two leading vote-getters represent a stark choice between the Muslim Brotherhood and the old regime.

Egyptian voters seem to have learnt a basic lesson about democratic elections: they are messy and often unsatisfying. The most charismatic candidates do not always win; it's often the candidate with the best organisational skill on the ground who does best.

The two uncharismatic "victors" of the first round of voting - Mohammed Morsi of the Muslim Brotherhbood and Ahmed Shafiq, former President Hosni Mubarak's last prime minister - benefited from the effective "ground game" of their respective campaign teams.

If revolutions are poetry, elections are prose. The hard slog of building institutions and holding elections does not provide the same kind of exhilaration that a revolution brings.

But elections are powerful because they put the winner on the spot: "OK, we have given you our sacred vote," the electorate says, "so now we expect you to deliver."

In today's deeply divided Egypt, where the political scars of the revolution still ache and the economy wobbles, delivering on the things Egyptians want (and even agreeing on what those things are) will be a tremendous challenge.

If the Muslim Brotherhood candidate, Mr Morsi, wins the June run-off, he will face many of the same problems Mr Mubarak faced: crime and urban insecurity, a young, restive population hungry for dignity and jobs and political foess eager to pounce on failure.

He will face some added problems too: a potential long-term decline in foreign investment, a sluggish economy, and a military that will be wary of his rule. This would not be an auspicious beginning.

But perhaps the new Egyptian president will be able to console himself with the words "at least, we are not Iran."

The Islamic Republic faces one of the most robust sanctions programmes ever aimed at a sovereign state. It is under intense pressure from the major powers, gets little support (and more outright hostility) from regional governments, and its one major Arab ally, the Syria of the Assads, is on the ropes.

As of July 1, the EU will no longer buy crude oil from Iran; many European states have already stopped. Asian buyers are reducing their purchases of Iranian crude. Indeed, Korean refiners - who once bought 250,000 barrels per day from Iran - have announced a total cut-off of Iranian oil.

Clearly, Iran was hoping for some sanctions relief as the Baghdad talks began. They got none. While the talks had some substance on the core issue of Iranian uranium enrichment, there was no breakthrough. Talks will resume in Moscow next month, but this process could be protracted and lengthy.

Meanwhile, Iran's economy will continue to suffer: the rial is dropping; gold purchases are on the rise; capital is fleeing; industrial investment is down dramatically. And production of oil has hit the lowest level in a decade.

While Iran's oil sector is on the decline, Iraq's is on the rise, as evidenced by the 3 million-barrel mark. If trends continue, Iraq will likely surpass Iran to become Opec's second-largest producer by the end of this year - a remarkable turn of events with geopolitical significance for the region.

To be sure, Iraq's internal politics are still rife with division and walking the streets of Tehran is still a much safer proposition than walking the streets of Baghdad. But Iraq's gradual reintegration into Arab state-level politics as host of an Arab League Summit, along with the nearly $9 billion in monthly earnings from oil sales put Prime Minister Nouri Al Maliki in a strong position to assert Iraqi interests.

Egypt, Iran and Iraq all evoke grand historical memories of great and thriving civilisations. But they all face tremendous challenges if their future is to be even partly as glorious as their past.

Afshin Molavi is a senior adviser at Oxford Analytica and a senior fellow at the New America Foundation

On Twitter @afshinmolavi