"Everyone should vote in this important election. vote at early hours", Supreme Leader Ayatollah Ali Khamenei said after casting his vote in the capital Tehran. "We sent back Raisi to Mashhad", his conservative hometown in northeastern Iran, said Narges, a 43 year-old beauty salon owner, who declined to give her full name.
Although Rouhani brought inflation down from around 40 percent when he took office in 2013, prices are still rising at nine percent a year.
The 56-year-old cleric said Rowhani's long-praised nuclear deal with six world powers - which set up global controls over Iran's nuclear programme in return for the end of 10 years of economic sanctions - had brought nothing for Iran.
The two other candidates left in the race, Mostafa Mirsalim, a former culture minister, and Mostafa Hashemitaba, a pro-reform figure who previously ran for president in 2001, respectively have 478,000 and 215,000 votes each.
The nuclear agreement Mr Rouhani's government reached with global powers in 2015, under which most worldwide sanctions have been lifted in return for Iran curbing its nuclear programme, is now likely to remain safe.
However, Mr Rouhani stills faces the same restrictions on his ability to transform Iran that prevented him from delivering substantial social change in his first term and thwarted reform efforts by one of his predecessors, Mohammad Khatami. But he remains subordinate to the supreme leader, who is chosen by a clerical panel and has the ultimate say over all matters of state. Election officials extended voting hours at least three times at the more than 63,000 polling places to accommodate the crowds.
Although considered a moderate by Iranian standards, Rouhani was nonetheless the favorite pick for those seeking more liberal reforms in the conservative Islamic Republic.
"I congratulate the great victory of the Iranian nation in creating a huge and memorable epic in the continuation of the path of "wisdom and hope", tweeted Vice President Eshaq Jahangiri, referring to the government's slogan. "Both might be reformist candidates for the next presidency", Sam added.
At recent rallies, his supporters chanted the names of reformist leaders under house arrest since 2011 for their part in the protests.
If no-one wins more than 50 per cent of votes cast, a run-off will be held next week. No woman has ever been approved to run for president. But what scant data that was available before the vote showed Rouhani in the lead.