Turnout figures among the country's 48 million eligible voters were not immediately available.
An Interior Ministry spokesman said today that early election results could be ready as soon as tomorrow morning.
Authorities three times announced extensions of voting hours today before the polls were closed at 11 p.m. local time (1830 GMT), four hours after they were originally scheduled to shut.
Former President Hashemi-Rafsanjani was widely seen as the front-runner ahead of the vote, but recent polls suggested strong challenges from Moin and from former national police chief Mohammad Baqer Qalibaf.
The Iranian Labor News Agency (ILNA) website quoted a senior executive-board member of the country's Election Headquarters, Seyyed Mohammad Doai, as saying that Hashemi-Rafsanjani was "ahead" in a report filed some three hours before polling stations were closed.
If no candidate wins more than 50 percent of the vote, the election goes to a runoff between the top two candidates.
"Sharq" newspaper's website reported that Hashemi-Rafsanjani was leading in big cities, while it said Moin was doing well in Sunni regions. Those two candidates were reportedly leading in Khorasan Razavi, Isfahan, and Ardabil provinces, according to "Sharq," which reported that Moin was also doing well in Gilan Province.
Polling stations in the city of Arak and in many other locations ran out of ballot papers, Fars News Agency reported.
Interior Minister Musavi-Lari told AFP during the voting that turnout appeared to be strong. Election Headquarters official Doai also suggested that voter turnout would be above 60 percent. (To see turnout figures for the country's eight previous presidential elections, click here.)
Incumbent President Khatami cannot seek a third four-year term under the Iranian Constitution. Khatami had urged voters to come out to the polls.
"I hope that with the enthusiastic participation of all women, men, and youngsters and adolescents in the elections, the difficult road to religious democracy, which is the result of the revolution, will be made smoother and easier and the decision of the Iranian nation will be respected by all of us," Khatami said.
(with additional wire reports)
[For all our coverage of Iran's ninth-ever presidential election, see RFE/RL's dedicated Iran Votes 2005 webpage.]