Moderate cleric Hasan Rowhani, a former nuclear negotiator, was declared the winner of Iran's presidential vote on Saturday after gaining support among many reform-minded Iranians looking to claw back a bit of ground after years of crackdowns.

The powerful showing by the former nuclear negotiator allowed him to avoid a two-person runoff and demonstrated the strength of opposition sentiment even in a system that is gamed against it. The ruling clerics barred from the race reform candidates seen as too prominent, allowing a list of hopefuls who were mainly staunch loyalists of the supreme leader.

But the opposition settled on Rowhani as the least objectionable of the bunch, making him the de facto reform candidate.

While Iran's presidential elections offer a window into the political pecking orders and security grip inside the country — particularly since the chaos from a disputed outcome in 2009 — they lack the drama of truly high stakes as the country's ruling clerics and their military guardians remain the ultimate powers.

Security forces also are in firm control after waves of arrests and relentless pressures since the last presidential election in 2009, which unleashed massive protests over claims the outcome was rigged to keep the combative Mahmoud Ahmadinejad in power for a second and final term. He is barred from seeking a third consecutive run. However the last-moment surge around Rowhani injected some excitement in the race.

Rowhani won with 50.7 per cent of the more than 36 million votes cast, the Interior Ministry reported, well ahead of Tehran Mayor Mohammad Bagher Qalibaf with about 16.5 per cent. Hard-line nuclear negotiator Saeed Jalili came in third with 11.3 per cent followed by conservative Mohsen Rezaei with 10.6 percent.

Minister Mostafa Mohammad Najjar said the turnout was 72.7 per cent, suggesting that liberals and others abandoned a planned boycott as the election was transformed into a showdown across the Islamic Republic's political divide. Iran has more than 50 million eligible voters.

'Purple wave' campaign

Voters waited on line for hours in wilting heat Friday at some polling stations in downtown Tehran and other cities, while others cast ballots across the vast country from desert outposts to Gulf seaports and nomad pastures. Voting was extended by five hours to meet demand, but also as possible political stagecraft to showcase the participation.

On one side were hard-liners looking to cement their control behind candidates such as Jalili, who says he is "100 per cent" against detente with Iran's foes, or Qalibaf, who was boosted by a reputation as a steady hand for Iran's sanctions-wracked economy.

The Interior Ministry said Hasan Rowhani had 18,613,329 votes, followed by Qalibaf with 6,077,292.The Interior Ministry said Hasan Rowhani had 18,613,329 votes, followed by Qalibaf with 6,077,292. (Vahid Salemi/Associated Press)

Opposing them were reformists and others rallying behind the "purple wave" campaign of Rowhani, the lone relative moderate left in the race.

Candidates needed more than 50 per cent of the vote to seal victory and avoid a runoff. Journalists face limits on reporting such as requiring permission to travel around the country. Iran does not allow outside election observers.

The Interior Ministry said Rowhani had 18,613,329 votes, followed by Qalibaf with 6,077,292, Jalili with 4,168,946 votes and Rezaei with3,884,412. The other two candidates were far behind.

Despite reformists' support, Rowhani's win is likely to be more of a limited victory than a deep shake-up. Iran's establishment, a tight alliance of the ruling clerics and the ultra-powerful Revolutionary Guard, still holds all the effective power and sets the agenda on all major decisions such as Iran's nuclear program and its dealings with the West. The greater comfort level by the theocracy and Revolutionary Guard also sets a different tone from 2009. Opposition groups appear too intimidated and fragmented to revive street demonstrations.

Rowhani, the only cleric in the race, led the influential Supreme National Security Council and was given the highly sensitive nuclear envoy role in 2003, a year after Iran's 20-year-old atomic program was revealed.

"Rowhani is not an outsider and any gains by him do not mean the system is weak or that there are serious cracks," said Rasool Nafisi, an Iranian affairs analyst at Strayer University in Virginia. "The ruling system has made sure that no one on the ballot is going to shake things up."

Yet a Rowhani victory is not entirely without significance either as it could make room for more moderate voices in Iranian political dialogue and display their resilience. It also brings onto the world stage an Iranian president who has publicly endorsed more outreach rather than bombast toward the West.

The last campaign events for Rowhani carried chants that had been bottled up for years.

'Long live reforms'

Some supporters called for the release of political prisoners including opposition leaders Mir Hossein Mousavi and Mahdi Karroubi, both candidates in 2009 and now under house arrest. "Long live reforms," some cried at Rowhani's last rally. The rally was awash in purple banners and scarves — the campaign's signature hue in a nod to the single-color identity of Mousavi's now-crushed Green Movement.

"My mother and I both voted for Rowhani," said Saeed Joorabchi, a university student in geography, after casting ballots at a mosque in west Tehran.

In the Persian Gulf city of Bandar Abbas, local journalist Ali Reza Khorshidzadeh said many polling stations had significant lines and many v great political epic has shocked the world," read a front-page headline inestimated at 75 per cent by the hard-line newspaper Kayhanoters appeared to back Rowhani.

'A great political epic has shocked the world.' —Hard-line newspaper Kayhan's front page

Just a week ago, Rowhani was seen as overshadowed by candidates with far deeper ties to the current power structure: Jalili and Qalibaf.

Then a moderate rival of Rowhani bowed out of the presidential race to consolidate the pro-reform camp. That opened the way for high-profile endorsements including his political mentor, former President Akbar Heshmi Rafsanjani, who won admiration from opposition forces for denouncing the postelection crackdowns in 2009. This, too, may have led to Rafsanjani's being blackballed from the ballot this year by Iran's election overseers, which allowed just eight candidates among more than 680 hopefuls.

Fervor remained strong for Rowhani's rivals as well.

Qalibaf was riding on his image as a capable fiscal manager who can deal with the deepening problems of Iran's economy and sinking currency.

Jalili drew support from hard-line factions such as the Revolutionary Guard's paramilitary corps, the Basij. His reputation is further enhanced by a battlefield injury that cost him the lower part of his right leg during Iran's 1980-88 war with Saddam Hussein's Iraq, which at the time was backed by the United States.

"We should resist the West," said Tehran taxi driver Hasan Ghasemi, who supported Jalili.

Supreme leader did not publicly endorse anyone

Iran's supreme leader, Ayatollah Ali Khamenei, has not publicly endorsed a successor for Ahmadinejad following their falling out over the president's attempts to challenge Khamenei's near-absolute powers.

'I have heard that a U.S. security official has said they do not accept this election ... OK, the hell with you.' —Ayatollah Ali Khamenei

Ahmadinejad leaves office weakened and outcast by his political battles with Khamenei — yet another sign of where real power rests in Iran. The election overseers also rejected Ahmadinejad's protege Esfandiar Rahim Mashaei in apparent payback. The usually talkative Ahmadinejad gave only a brief statement to reporters as he voted and refused to discuss the election.

Khamenei remained mum on his own choice even as he cast his ballot. He added that his children don't know whom he backs.

Instead, he blasted the U.S. for its repeated criticism of Iran's clampdowns on the opposition and the rejection of Rafsanjani and other moderates from the ballot.

"Recently I have heard that a U.S. security official has said they do not accept this election," Khamenei was quoted by state TV after casting his vote. "OK, the hell with you."

Iran's state media hailed the apparently high turnout as a boost for the Islamic Republic's political system.

"A great political epic has shocked the world," read a front-page headline inestimated at 75 per cent by the hard-line newspaper Kayhan — Kayhan Saturday. Khamenei had called for a "political epic," saying a high turnout would protect Iran against its enemies.

The economy, too, is under far more pressures than in 2009.

Western sanctions over Iran's nuclear program have shrunk vital oil sales and are leaving the country isolated from international banking systems. New U.S. measures taking effect July 1 further target Iran's currency, the rial, which has lost half its foreign exchange value in the past year, driving prices of food and consumer goods sharply higher.