Hassan Rouhani's victory in the Iranian election is truly stunning. It opens a window of hope for an easing of tension between Iran and the west on the strained nuclear file but also on the more urgent issue – the self-destructive clash between Shia and Sunni Islam that is killing thousands in Syria and Iraq and threatens the entire Middle East region.
Although Rouhani had been well ahead in the final pre-election polls, no one expected him or anyone else to receive enough votes to avoid a runoff. That he did so in a six-horse race is astonishing. The result confirms that Iran's elections are always unpredictable. The high turnout also shows that Iranian voters felt they had a genuine choice, thereby confounding the tired comments from many outside analysts that little separates the candidates because they all had to be vetted by the Islamic republic's Guardian Council.
Two things seem to have swung so many people to Rouhani's side. He was endorsed in the last few days (clever of them to wait until near the end) by former presidents Akbar Hashemi Rafsanjani and Mohammad Khatam. This meant that the centrist and reformist camps had coalesced behind one man, while the conservative vote was split between the five other candidates. (Unlike 2009 – when he endorsed Mahmoud Ahmadinejad for a second term – Iran's supreme leader, Ayatollah Ali Khamenei, offered no public support for anyone – a good move, given the surprising result.)
The second factor was Rouhani's stellar performance in the three televised debates and the poor presentation by Saeed Jalili, the current nuclear negotiator, who had earlier been seen as the frontrunner. Rouhani promised to ease tensions with the west and to try to end international sanctions, implicitly blaming his predecessor Ahmadinejad for provoking them with his rash statements and uncompromising line. Jalili took a battering for his hardline positions in the latest round of talks this spring with the permanent five members of the security council, though the toughest attack came not from Rouhani but from Ali Akbar Velayati, a former foreign minister, who said that interacting with the world was better than defying it.
Sanctions have had a devastating effect on Iranian lives and the economy. Ahmadinejad, who came to power claiming to be able to do more for Iran's poorest people, was exposed as a failure, whereas Rouhani pointed out that in the several years when he was chief nuclear negotiator the issue was not taken to the security council. The clear message from the majority of the Iranian electorate is that they prefer his more rational approach.
Rouhani impressed viewers of the presidential debates when he said he had "never lied" to Iranians, and told a hardline rival candidate: "I'm not a general but a jurist."
How he will proceed once he takes office is not yet clear, but one of his former aides on the nuclear file, Hossein Mousavian, recently highlighted a proposal that Ali Akbar Salehi, Iran's foreign minister, made last year. Salehi offered to turn Khamenei's 2003 fatwa banning nuclear weapons into a "secular document that would bind the [Iranian] government". This would give much greater force to Iran's longstanding denial of interest in having a nuclear weapon. In return, all sanctions should be lifted and Iran's rights under the non-proliferation treaty to enrich uranium for peaceful purposes should be openly recognised by the security council. Salehi's proposal was ignored in the west, but it deserves serious consideration if Rouhani as president re-confirms it.
The Obama administration needs to take stock and think hard after this surprise result, especially as its first reaction was full of hasty blunders. It patronised Iranian voters by saying they showed "courage in making their voices heard" and was rude in urging Rouhani to "heed the will of the Iranian people". If the White House is really "ready to engage the Iranian government directly", as it said on Saturday, why did it not have the courtesy to send Rouhani a message of congratulations?
At the heart of the conflict between Iran and the west is the US's unwillingness to accept Iran's independence in foreign and domestic policies. Instead, the country's government is constantly demonised, and its intentions deliberately put under suspicion. The psychological wounds of having US diplomats taken hostage in 1979 have not been allowed to heal, while on the Iranian side the US and British role in toppling their government in 1953 has also not been forgiven.
When the last moderate president, Mohammad Khatami, was in power, the George W Bush administration foolishly invented "an axis of evil" and claimed Iran was part of it. Today we have a new chance to turn the page. It is a crucial issue for the whole Middle East, now that American hostility to Iran has helped to turn Saudi Arabia and other Arab Gulf states into an anti-Iranian alliance of Sunnis versus Shias. Because of this unnecessary creation of tensions and its conversion into a proxy war, sectarianism is destroying Syria and re-emerging with lethal force in Iraq.
In the wake of Rouhani's victory, the first thing Obama should do is to drop US objections to letting Iran attend the proposed Geneva conference on Syria. If Washington is ready to negotiate with Iran on nuclear issues, it makes no sense to exclude it from the talks on Syria. The second thing is to accelerate preparations for the conference itself by putting sustained pressure on Syria's rebel forces to come up with a negotiating strategy and take part.
For Washington to change course here would send an important signal, not only that Iran has to be part of any solution in Syria and the region, but also that the anti-Iranian cancer that has affected American policy in the Middle East since the axis-of-evil speech has at last been excised.