Hardliner Ebrahim Raisi is to be Iran's next president after a partial vote count gave him an unassailable lead, BBC reports.
He beat three other candidates in a poll in which several contenders were barred from standing.
Mr Raisi is Iran's top judge and holds ultra-conservative views. He is under US sanctions and has been linked to past executions of political prisoners.
Iran's president is the second-highest ranking official in the country, after the supreme leader.
The president has significant influence over domestic policy and foreign affairs. But it is Supreme Leader Ayatollah Ali Khamenei who has the final say on all state matters.
Mr Raisi's three rivals and outgoing President Hassan Rouhani have all congratulated him on his victory.
With counting continuing, state TV said Mr Raisi had so far received 62% of the vote - nearly 18 million of more than 28 million votes cast. Some 59 million Iranians were eligible to vote.
Almost 600 hopefuls, including 40 women, registered for the election.
But in the end only seven men were approved last month by the 12 jurists and theologians on the hardline Guardian Council, an unelected body that has the ultimate decision with regard to candidates' qualifications. Three of those candidates subsequently pulled out before polling day.