The presidential role in Pakistan is largely ceremonial. But this year, the vote is expected to be an early legislative referendum on the newly-installed government of Prime Minister Imran Khan.
Pakistani lawmakers began voting for a new president Tuesday, with a close ally of Prime Minister Imran Khan seen as the favourite to replace Mamnoon Hussain as the ceremonial head of the country.
More than a thousand lawmakers from both houses of parliament and the country's four provincial assemblies began choosing from among three candidates, with unofficial results expected late on Tuesday.
Arif Alvi, a former dentist who is a close ally of Khan, is believed to be the likely winner after opposition parties failed to come together to field a joint candidate.
Khan became prime minister last month after the Pakistan Tehreek-e-Insaf (PTI) party's victory in the mid-July parliamentary elections.
Alvi is running against Maulana Fazlur Rehman of the Jamiat Ulema-i-Islam, an opposition party backed by the previously governing Pakistan Muslim League-Nawaz (PML-N). The PML-N holds the second-largest number of seats in the National Assembly – the lower house of parliament.
The third-largest, the Pakistan Peoples Party (PPP), is running its own candidate, Aitzaz Ahsan.
Alvi is one of the founders of PTI, and served as its secretary general for eight years starting in 2006.
The father-of-four and an active Twitter user, Alvi was elected an MP in the southern megacity of Karachi in 2013, winning re-election in the July vote.
If elected, Alvi will succeed Hussain, a former businessman and close ally of ousted prime minister Nawaz Sharif who kept a low profile during his tenure.
An Alvi victory will further cement PTI's position at the apex of politics in Pakistan, a Muslim giant of more than 207 million people that has seen security improve dramatically in recent years after a decade-long struggle against extremism.
But Khan's government now faces major challenges, with the country teetering on the edge of a balance-of-payments crisis that analysts say could force it to seek an IMF bailout.
Pakistan is also among the most affected countries in the world by global warming, and is facing a shortage of water exacerbated by its surging population.