Rouhani and Ayatollah Akbar Hashemi Rafsanjani, a former president, had the most votes in the capital for the 88-member committee of clerics that appoints the country's supreme leader.
In Tehran, voters are electing 16 members to the assembly from 28 candidates.
With 1.5 million ballot papers counted out of 3.9 million cast, Rafsanjani was in first place with 692,000 votes. Rouhani was just behind with 652,000.
The figures were published by the semi-official ISNA news agency, citing the interior ministry which is responsible for managing Friday's elections to the assembly and to parliament.
Supporters of the List of Hope used social media to encourage voters to reject Ahmad Jannati, Mohammad Yazdi and Mohammad Taghi Mesbah-Yazdi. All three have adopted positions hostile to reformists.
However Mesbah-Yazdi's position is still endangered, as he came 16th in the early polling, the last position that would see him re-elected to the all-male assembly.
Jannati, who chairs the Guardian Council that excluded thousands of candidates for the parliamentary election and hundreds from the assembly race, was in 10th position.
Final results are expected tomorrow.
