Officials estimated that the turnout may have reached 70% among more than 50 million eligible voters.
The race featured five conservatives and a single moderate,
Because of long lines, the voting deadline was extended several times, ultimately until 11 p.m. in Tehran, the capital, five hours after the scheduled closing time. Voting began at 8 am.
Television video showed lines of voters waiting patiently at polling centers throughout the country.
Official results from Friday's balloting were expected to be released Saturday. The capital was filled with speculation about the results, and security was reported to have been beefed up in several areas.
If no single candidate wins a majority, officials said, a runoff between the two top vote-getters will be scheduled for June 21.
Authorities reported no major irregularities or security issues in the first presidential balloting since the disputed 2009 elections, which resulted in mass protests after allegations of vote rigging.
Ahmadinejad ultimately won a second term that year despite charges that the vote was fixed against the reformist slate. He is constitutionally barred from seeking a third term.
The six candidates in Friday's vote issued a joint statement asking their supporters to refrain from celebration until after the official results are announced.
Supporters of Rowhani, the lone moderate and sole cleric among the hopefuls, expressed confidence that he would post a strong showing.
Rowhani has gone from a long shot to a possible finalist and unexpected standard-bearer of the long-disillusioned reformist camp. The longtime establishment mainstay reached out to reformists and vowed to work to reduce
"If he can bring a bit more freedom of speech, more freedom of the press and more space to criticize officials, that's enough," said one Rowhani backer, Ali, who would not give his last name.
Also said to be running strong was Tehran Mayor Mohammed Baqer Qalibaf, a former police commander and war veteran known for championing major development projects in the capital.
Among the first to cast a ballot early Friday was the country’s supreme leader,
Khamenei has the last say on matters of state in Iran's theocratic system.
The government here views elections as key to its international credibility and had urged a large turnout as a rebuff to Iran’s “enemies,” principally the United States and its allies. Tehran has accused Washington of seeking to deflate voter participation, a charge denied by the
The campaign has been dominated by concern about the nation’s moribund economy, which has been battered by Western-led sanctions tied to Iran’s controversial
Along with president, Iranians are electing representatives for thousands of city and village council slots. State media called the balloting the largest election in Iran's history.
The presidential race has taken on a competitive edge in recent days as moderates have rallied around Rowhani, a centrist and close ally of former President Ali Akbar Hashemi Rafsanjani.
Also on the ballot are three pro-government “principalist” hard-liners:
The three are likely to split the conservative vote, experts say, boosting the chances of Rowhani.
Rounding out the slate were two independent candidates: