TEHRAN, Iran - Dancing in the streets of Tehran greeted the news that Hassan Rouhani had won Iran’s race for president over the weekend, as voters hailed the reformist cleric’s victory.
The mostly young Iranians lit Chinese lanterns and chanted slogans like “bye-bye Ahmadi,” in reference to outgoing President Mahmoud Ahmadinejad, who became unpopular with reformist voters after the last elections.
A similar scene took place in 2009 -- young Iranians chanting the same slogans -- but the demonstrations ended in a bloody crackdown.
Unlike celebrations four years ago, the rejoicing over the weekend was peaceful and passed without incident.
Rouhani, 64, declared the election was a "victory of moderation over extremism.” What the election revealed, however, was just how divided Iran is between reformists and conservatives.
Rouhani, the country’s former chief nuclear negotiator and the only non-conservative in the field, got more than 18 million votes. Meanwhile, the five conservative candidates combined garnered just under 18 million.
Iran’s standing internationally preoccupied many in the crowd.
"We have had a very bad image in world over the last eight years – we want our dignity back now," said Shanaz, a young woman who attended the street festivities.
Tehran is at loggerheads with much of the world over its nuclear program, which it insists is for peaceful purposes.
Some of those celebrating in Tehran also said they were anxious to win back some of the freedoms that the 2009 crackdown extinguished.
"We want some social freedoms back, we want to be able to breathe again, and we want better relations with the rest of the world,” said Ramin, a man in his forties. “I hope Rouhani can deliver, but he is going to have a tough job."
Rouhani's challenges include lessening tensions with the West over Iran's nuclear program, reviving an economy crumbling under strict international sanctions and resolving sensitive issues such as what to do about former reformist presidential candidates Mir-Hussien Mousavi and Medi Karoubi, who are under house arrest.
Rouhani is a centrist who seems to have good relations with people on both ends of the political spectrum in Iran. He has never posed a challenge to the Supreme Leader Ali Hosseini Khamenei, and has been loyal to the country's principles steeped in the Islamic religion.
But the key to his success in this election was the backing he got from the country’s leading reformist, former President Mohammad Khatami, one of the pillars of the revolution, and great political survivor and also former president, Ali-Akbar Rafsanjani.
Nobody knows what Rouhani will do next, but he is known to be a pragmatist. During his time as chief nuclear negotiator from 2003 to 2005, he brokered a deal that saw Iran suspend its uranium enrichment.
This move that made him popular in the West did not do the same in Iran. During the campaign, conservatives accused him of selling Iran's nuclear rights down the river and making too many concessions, which they believe weakened Iran.
In his campaign speeches, Rouhani said he supported greater personal freedoms for Iranians and a less intimidating security system. He also said Iran must stop wallowing in mediocrity because it is a powerful country with huge resources.
Significant to the outside world, he also called for better relations with the West, especially the United States. He has said that the only way to get Iran out of its current rut was to negotiate with America.
The news of Rouhani's election victory had an almost immediate economic effect in Iran – its currency, the rial, strengthened against the dollar and the country’s stock market climbed for the second day in a row.
But the optimism both inside and outside the country is tempered by the knowledge that final decisions on matters of state, foreign policy and the nuclear issue lie with the Supreme Leader – and he isn't going anywhere.
It is still too early to know whether Rouhani will herald in a period of tangible policy changes or just a softening of tone instead of substance.