Iranians are voting in a presidential contest which pits President Hassan Rouhani against a serious challenger, Seyyed Ebrahim Raeisi, in what is believed to be a close race.

Some 63,500 polling stations opened at 08:00 local time (0330 GMT) Friday for long lines which had already formed around the country where more than 56 million are eligible to vote.

Polls close at 18:00 (1330 GMT), but voting hours will most likely be extended as the country has seen in previous elections, amid expectations of a high turnout.

Leader of the Islamic Revolution Ayatollah Seyyed Ali Khamenei was among the first to cast his ballot, calling on Iranians to turn out in big numbers.

Speaking after casting his vote, the Leader said, “I thank God Almighty for the blessing of democracy and people's participation in the election. This is a great blessing.”

"Praise be to God, our people are thankful for this blessing. You see they are participating and my advice is that more and more people participate and come to the polls at the earliest time possible."

Ayatollah Khamenei described the 2017 elections as very important, saying the destiny of the country is in the hand of the masses.

"I believe a good work should be done in early hours and should not be delayed. I also believe the presidential election is very important," the Leader said.

"The destiny of the country is in the hands of the people who choose the chief executive. They should heed the importance of this task," Ayatollah Khamenei added.

Besides picking a president, Iranians are also voting to choose members of the country’s City and Village Councils.

“The City and Village Councils Election is also important as it elects those who are in charge of urban and rural services, namely the everyday issues involving the people,” the Leader said.

Intelligence Minister Mahmoud Alavi said no security threat had been observed so far, adding the "slightest anti-security move" would be dealt accordingly.

"In the past, anti-security and counter-revolutionary currents were trying to somehow create threats, but this time around, we are witnessing a decline in this regard," he said.

This year’s presidential race also features two low-key contenders - former deputy judiciary chief and member of Iran’s Expediency Council Mostafa Aqa-Mirsalim and former vice president, Mostafa Hashemi-Taba.

Two more consequential candidates, Tehran Mayor Mohammad Baqer Qalibaf and Vice President Is’haq Jahangiri, dropped out in the final days of campaigning in favor of Raeisi and Rouhani respectively.

Rouhani has been campaigning on the platform of an active foreign policy meant to enhance international relations, while Raeisi has vowed a strong economic management towards the elimination of poverty and unemployment.

Iranian presidential candidates Hassan Rouhani (L) and Seyyed Ebrahim Raeisi

Outside Iran, a researcher at Victoria University of Wellington in New Zealand became the first Iranian to cast his ballot. Voting was also underway in the cities of Auckland, Christchurch and Dunedin.

Across Asia, Europe and the Americas, Iranian expatriates were casting their ballots in various countries but Canada did not allow the Islamic Republic to set up polling stations on its territory.

Iranian expats in China cast their votes in presidential election, May 19, 2017. (Photo by IRNA)

Based on Iran’s election law, if no candidate manages to secure over 50 percent of the votes, a runoff will take place a week later.

Weeks of heated campaigning came to an end on Thursday morning, 24 hours before the start of the elections.

Ayatollah Khamenei has called on Iranians to turn out en masse, saying the nation and Islamic establishment are the true winners of the vote no matter which candidate emerges victorious.