By late afternoon on Saturday, the preliminary results showed Mr. Rowhani with slightly more than half the votes, followed by Mr. Ghalibaf, who was trailing far behind. Iran’s interior minister, Mostafa Mohammad Najjar, did not say when the final results would be available. Iran has more than 50 million eligible voters andas of midday Saturday nearly 16 million votes had been counted.
Tehran appeared to be deserted, despite the fact that Saturday is the first day of the week there, as people stayed home to watch the election results unfold.
The early results seemed to repudiate the coalition of conservative clerics and Revolutionary Guard commanders, the so-called traditionalists, who consolidated power after the 2009 election, which the opposition said was rigged. The traditionalists’ favored candidate, Saeed Jalili, Iran’s chief nuclear negotiator and a protégé of the supreme leader, Ayatollah Ali Khamenei, did not seem to have gained much traction with the public, emphasizing vague concepts like “Islamic society” and standing up to Western pressure.
Interior Ministry officials who had access to the preliminary tallies said that Mr. Rowhani appeared to be the clear winner in some cities. Abbas Ali Kadkhodaei, the spokesman for the Guardian Council, warned against publishing any rumored results until the official results were in.
Mr. Rowhani even managed to do well in the city of Qom, the center of Iranian theological scholarship, the early results showed, suggesting that the desire for a more responsive government extends throughout society.
Ayatollah Khamenei praised the voting in a Twitter post on Saturday despite the fact that the traditionalists’ favored candidate appeared far behind.
“A vote for any of these candidates is a vote for the Islamic Republic and a vote of confidence in the system,” he said.
Many veteran Iran political watchers, who had expected a conservative winner in what had been a carefully vetted and controlled campaign, expressed surprise at the early results.
“If the reports are true, it tells me that there was a hidden but huge reservoir of reformist energy in Iran that broke loose in a true political wave,” said Cliff Kupchan, an Iran analyst for the Eurasia Group, a political risk consulting firm in Washington. “It was unpredictable — not even tip of the iceberg visible two days or three days ago — but it seems to have happened.”
Farideh Farhi, an Iran scholar at the University of Hawaii, while careful not to draw conclusions until the official result was known, said it was clear that reformers and other disaffected voters in Iran had mobilized a heavy turnout despite doubts about the system.
“Everyone’s assumption was they would not be able to create a wave of voters in the society,” Ms. Farhi said. “This outcome was not something planned by Ayatollah Khamenei.”
In surveys and interviews throughout the campaign, Iranians have consistently listed the economy, individual rights and the normalization of relations with the rest of the world as their top priorities. They also said they saw the vote as a way to send a message about their displeasure with the direction of Iran, which has been hobbled by economic mismanagement and tough Western sanctions, stemming from the government’s refusal to stop enriching uranium.
Mr. Rowhani, a former nuclear negotiator, had been criticized by Mr. Jalili as being too willing to bargain away Iran’s nuclear program, which the West says is a cover for developing nuclear weapons but Tehran says is for peaceful purposes.
But Mr. Rowhani seemed to strike a more popular chord by promoting more freedoms and rights for women, and gained momentum late in the campaign with the withdrawal of the only other candidate with any reformist tendencies and the endorsement of Ali Akbar Hashemi Rafsanjani, 78, a moderate former president who was disqualified by the Guardian Council, which vets all presidential candidates.
While not claiming victory, Mr. Rowhani’s campaign released a statement on Saturday urging the authorities to conduct a clean count. “We hope that the respected Guardian Council and the election headquarters of the country will follow the guidelines of the supreme leader regarding protecting the peoples’ rights in counting the votes,” it read.
Mr. Rowhani’s closest competitor in the early results, Mr. Ghalibaf, is also considered a moderate and a strong manager who has improved the quality of life in Tehran in his eight years as mayor. The other four candidates, all conservatives, seemed to be trailing badly.
Mr. Jalili, known for his unyielding stance as a nuclear negotiator, had been considered a front-runner less than three weeks ago. But his campaign never gained much momentum, and in his public statements and appearances he appeared to have little knowledge of Iran’s economic problems, one of the biggest concerns here.
In the Iranian political system, the president appoints governors, some members of the cabinet and other officials, and has some say in economic policy. But all power ultimately resides with the supreme leader, particularly in foreign policy and the nuclear program.
Buy as the departing incumbent, Mahmoud Ahmadinejad, made clear with his bombastic appearances at the United Nations and his express desire to see Israel “wiped off the map,” the president can have a profound effect in setting the tone in Iran. Analysts said they expected the election of either Mr. Rowhani or Mr. Ghalibaf might soften Tehran’s confrontational tone, if not its actual stance in negotiations.
As the counting continued into Saturday, officials issued an edict that all candidates to avoid any gatherings until the official result was announced. The order was a reminder of the political minefield presented by the election, which descended into protest and chaos four years ago when pro-reformist candidates accused the authorities of rigging the vote to ensure Mr. Ahmadinejad’s re-election. He was not eligible for a third term.
Wary of stirring those passions, the authorities banned street rallies and limited the candidates to smaller meetings in enclosed spaces like theaters and gymnasiums. After casting his ballot, Ayatollah Khamenei went out of his way to reassure Iranians that the vote would be free and fair.
“I have advice for the people in charge of ballot boxes and counting the votes,” he said. “They need to know that they are the trustee of the people and their vote needs to be preserved, and this is the people’s right.”
The top election official in Tehran Province, which includes the capital and is the country’s largest urban area, said at least 70 percent of voters had cast ballots by the end of Friday. “The political epic that the leader expected took place,” the official, Safar Ali Baratloo, was quoted as saying by the Iranian Students’ News Agency.
Mr. Rowhani was drawing a number of votes in Geysha, a middle-class Tehran neighborhood. “He will change this country,” said Golnaz, 20, who refused to give her family name for security reasons. “We need change.”
But there were some doubts about just how much would change even with a more moderate president. Addressing American skepticism about the outcome as he exhorted Iranians to vote, Ayatollah Khamenei told reporters: “To hell with you if you do not believe in our election. If the Iranian nation had to wait for you to see what you believe in and what you do not, then the Iranian nation would have lagged behind.”
Here we go again. Hopefully this won't be the fiasco that the last election was.
I could have sworn we had a "here go hell come" tag.