TEHRAN, Iran — Iran’s state television has declared incumbent President Hassan Rouhani the winner of the country’s presidential election, giving him a second four-year term to see out his agenda calling for greater freedoms and outreach to the wider world.

State TV offered its congratulations in a brief statement Saturday, based on vote tallies.

Interior Minister Abdolreza Rahmani Fazli confirmed the result on state television, saying Rouhani had won 23.5 million votes — 57 percent — compared to 15.8 million — 38.3% — for hardline challenger Ebrahim Raisi.

It followed a huge 73 percent turnout on Friday — similar to the previous elections in 2013 — which forced authorities to extend polling by several hours.

“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.

Rouhani, a 68-year-old cleric who spearheaded a 2015 nuclear deal with world powers, framed the election as a choice between greater civil liberties and “extremism.”

Hardline cleric Raisi, 56, had positioned himself as a defender of the poor and called for a much tougher line with the West.

Iranian presidential candidate Ebrahim Raisi greets his supporters during a campaign rally at Imam Khomeini Mosque in the capital Tehran on May 16, 2017. (AFP Photo/Atta Kenare)

Iranian presidential candidate Ebrahim Raisi greets his supporters during a campaign rally at Imam Khomeini Mosque in the capital Tehran on May 16, 2017. (AFP Photo/Atta Kenare)

But his revolutionary rhetoric and efforts to win over working class voters with promises of increased handouts appear to have gained limited traction.

“Rouhani’s vote, particularly in rural areas, shows that Iranian people no longer believe in economic populism and radical change,” said Ali Vaez, Iran analyst for the International Crisis Group, a think tank.

“They have the maturity to understand that the solution to their country’s predicaments are in competent management of the economy and moderation in international relations,” Vaez told AFP.

Rouhani’s central first-term achievement was a deal with six powers led by the United States that eased crippling economic sanctions in exchange for curbs on Iran’s nuclear program.

He gained a reprieve this week when Washington agreed to continue waiving nuclear-related sanctions, keeping the deal on track for now.

Supreme Leader Ayatollah Ali Khamenei in Tehran, Iran, Tuesday, Nov. 22, 2016. (Office of the Iranian Supreme Leader via AP)

Supreme Leader Ayatollah Ali Khamenei in Tehran, Iran, Tuesday, Nov. 22, 2016. (Office of the Iranian Supreme Leader via AP)

But the election comes at a tense moment in relations with the United States, with President Donald Trump still threatening to abandon the accord and visiting Iran’s bitter regional rival Saudi Arabia this weekend.

Although Rouhani has been deeply entrenched in Iran’s security establishment since the early days of the revolution, he has emerged as the standard-bearer for reformists after their movement was decimated in the wake of mass protests in 2009.

“We’ve entered this election to tell those practicing violence and extremism that your era is over,” he said during the campaign.

At recent rallies, his supporters chanted the names of reformist leaders under house arrest since 2011 for their part in mass protests two years earlier.

International affairs researcher Foad Izadi, of Tehran University, said Rouhani may now have the leverage to push for more freedoms, despite opposition from the conservative-dominated judiciary and security services.

“A number of years have passed (since the 2009 protests) and the country is demonstrating a high level of stability — this gives the system confidence, which means more room for change,” Izadi said.

Last month, the Guardian Council excluded all but six candidates for the election but still left a stark choice between moderate-reformists and hardliners.

Two dropped out to back Raisi and Rouhani, respectively, while the remaining candidates — reformist Mostafa Hashemitaba and conservative Mostafa Mirsalim — were headed for only a marginal percentage of the votes.

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.