TEHRAN, Iran -- Iran's President Hassan Rouhani won re-election by a wide margin Saturday, giving the moderate cleric a second four-year term to see out his agenda pushing for greater freedoms and outreach to the wider world.

The 68-year-old incumbent secured a commanding lead of 57 percent in a race that drew more than seven out of every 10 voters to the polls. His nearest rival in the four-man race, hard-liner Ebrahim Raisi, secured 38 percent of the vote.

Turnout was so heavy in that voting was extended until midnight after a long hot day that saw people standing in line for hours to cast their ballots, CBS News correspondent Elizabeth Palmer reports from Tehran.

As Rouhani appeared close to victory, some female drivers held out the V for victory sign and flashed their car lights on highways in Tehran's affluent north.

In this photo released by official website of the office of the Iranian Presidency, President Hassan Rouhani fills in his ballot while voting for the presidential and municipal councils election at a polling station in Tehran, Iran, Friday, May 19, 2017. Uncredited / AP

"We made the victory again. 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. She said she spent more than three hours outside waiting to vote, "but it was worth it."

Interior Minister Abdolreza Rahmani Fazli announced the vote tallies in a televised news conference, based on a count of more than 99 percent of the ballots. He said Rouhani garnered 23.5 million votes out of 41.2 million ballots cast. Iran has 56.4 million eligible voters.

In 2013, Rouhani won the presidential election with nearly 51 percent of the vote. Turnout for that vote was 73 percent.

Iran's president is the second-most powerful figure within Iran's political system. He is subordinate to the supreme leader, who is chosen by a clerical panel and has the ultimate say over all matters of state.

Friday's vote was largely a referendum on Rouhani's more moderate political policies, which paved the way for the landmark 2015 nuclear deal that won Iran relief from some sanctions in exchange for curbs on its nuclear program.

Rouhani has come to embody more liberal and reform-minded Iranians' hopes for greater freedoms and openness at home, and better relations with the outside world.

Raisi, his nearest challenger, is close to Ayatollah Ali Khamenei, Iran's supreme leader, who stopped short of endorsing anyone in the election. Raisi ran a populist campaign, vowing to fight corruption and fix the economy while boosting welfare payments to the poor.

Iranian presidential candidate cleric Ebrahim Raisi waves to media after casting his ballots for the presidential and municipal councils election at a polling station in Tehran, Iran, Friday, May 19, 2017. STR / AP

Many of Raisi's critics pointed to his alleged role condemning inmates to death during Iran's 1988 mass execution of thousands of political prisoners, and feared a victory for the hard-liner could worsen human rights in Iran and put the country on a more confrontational path with the West.

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.

Hashemitaba was among the first to predict an outright win for Rouhani as he offered his congratulations Saturday morning.

"Rouhani will apply his ever-increasing efforts for the dignity of Iran" in his next term, the reformist said.

The Tehran Stock Exchange rallied after the election results came out, extending a recent winning streak to close nearly 1 percent higher at its highest level in three months.

Although considered a moderate by Iranian standards, Rouhani was nonetheless the favorite pick for those seeking more liberal reforms in the conservative Islamic Republic.

He appeared to embrace a more reform-minded role during the campaign as he openly criticized hard-liners and Iran's powerful Revolutionary Guard, a paramilitary force involved in the war in Syria and the fight against Islamic State militants in neighboring Iraq.

That gave hope to his supporters, who during recent campaign rallies called for the release of two reformist leaders of the 2009 Green Movement who remain under house arrest. The two figures, Mir Hossein Mousavi and Mahdi Karroubi, both endorsed Raisi, as did Mohammad Khatami, another reformist who served as Iran's president from 1997 to 2005.

Iran has no credible political polling to serve as harder metrics for the street buzz around candidates, who need more than 50 percent of the vote to seal victory and avoid a runoff. But what scant data that was available before the vote showed Rouhani in the lead.

The position of president is a powerful post. He oversees a vast state bureaucracy employing more than 2 million people, is charged with naming Cabinet members and other officials to key posts, and plays a significant role in shaping both domestic and foreign policy.

All candidates for elected office must be vetted, a process that excludes anyone calling for radical change, along with most reformists. No woman has ever been approved to run for president.

Ahmadi said the Interior Ministry expects to announce final results later Saturday.