Iran's President Hassan Rouhani is on course for a second term in office, preliminary results show.
Out of 26 million votes counted so far, he has won 14.6 million - or more than half, officials announced on state TV.
Mr Rouhani's main challenger lodged complaints about alleged voting irregularities.
Ebrahim Raisi accused supporters of Mr Rouhani of hundreds of acts of propaganda at voting booths, which are banned under electoral law.
Mr Raisi, 56, is a conservative cleric with a background in the judicial system.
Reuters reported that Mr Rouhani was on course to win more than 50% of the vote in the first round, thus avoiding a second-round run-off. Results from urban areas - much more likely to support Mr Rouhani - have not yet come in.
Voting time was extended by five hours, until midnight, amid an unexpectedly high turnout of about 70%. The interior ministry said more than 40 million votes had been cast. Election officials said the extensions to voting hours were due to "requests" and the "enthusiastic participation of people".
Mr Rouhani, 68, promised a moderate vision and an outward-looking Iran, and tied his success to the success of the nuclear deal brokered between Iran, the US and other countries in 2015.
US President Donald Trump opposes the deal, which eased sanctions on the Middle Eastern country, but his White House renewed it earlier this week.
Final results are expected to be announced at 14:00 local time (09:30GMT), according to election official Ali Asghar Ahmadi(Source: BBC)