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.

The 68-year-old has come to embody more liberal and reform-minded Iranians' hopes for greater political freedom at home and better relations with the outside world.

Preliminary vote tallies earlier had Rouhani ahead with 22.8 million votes, out of 38.9 million counted so far. Officials say more than 40 million people voted.