The 4pm polling deadline for presidential elections, which took place simultaneously at the Parliament House in the capital, and the provincial assemblies in Lahore, Karachi, Peshawar and Quetta, has now passed.
In the running for the post are Dr Arif Alvi of the ruling Pakistan Tehreek-i-Insaf (PTI); PML-N backed chief of the Muttahida Majlis-e-Amal (MMA), Fazlur Rehman; and senior PPP leader Aitzaz Ahsan.
With an hour left in the deadline, Prime Minister Imran Khan arrived at the Parliament House and cast his vote.
A joint sitting of the Senate and the newly elected national and provincial assemblies — together known as the electoral college of Pakistan — was called to elect the country's 13th president.
The voting started at around 10am and ended at 4pm. The NA and Senate members voted inside the National Assembly hall, whereas the MPAs did the same in their respective provincial assemblies.
The Election Commission of Pakistan has barred the members from carrying mobile phones with them at the time of voting.
Personnel of Rangers and FC have been deployed around the Parliament House and the buildings of the provincial assemblies, which have been declared as polling stations.
With the Constitution requiring the presidential election to be held at least a month prior to the outgoing president's final day in the office, the exercise taking place today should have been held by August 9, as incumbent President Mamnoon Hussain's term will expire on September 9.
However, since the electoral college was not complete by the Constitutionally set deadline, the presidential election was subjected to delay.
The exercise today will mark the end of a lengthy poll season that began with the July 25 general elections and was followed by various speaker, deputy speaker, prime and chief ministerial ballots.
The newly elected president will take oath of the office on September 9 after the expiry of the five-year term of incumbent president Hussain.
While arriving at the parliament for the election, Dr Alvi told reporters that members of all political parties should "vote for the best candidate according to their conscience".
He said he expects to win a "clear majority" from all legislatures.
PPP's Ahsan, who spoke to media representatives after visiting the parliament, said votes were being cast efficiently and the process was properly moving forward.
He said the matter of significance was not who from among the three candidates is elected president, but that a new head of state is going to be elected "through the democratic process".
Ahsan said he had no complaints about the election process and that he would congratulate whoever emerges as the winner.
'PPP stabbed joint opposition in the back'
Senator Maulana Abdul Ghafoor Haideri of the JUI-F said it will remain an "example in history" that the PPP "stabbed the joint opposition in the back" by refusing to accept Rehman as the opposition parties' nominee.
He said he believed that "apparently", the establishment's favourite party has come to power in the centre.
"The second party [backed by] the establishment has emerged in the form of PPP as an apparent part of the opposition," he alleged.
Tussle over opposition candidate
After the Election Commission of Pakistan set September 4 as the day of the 2018 presidential elections, four candidates were nominated and had subsequently filed their papers.
While the PTI and its allies have seen their candidates stave off any upsets in all the post-general election polls this summer, its presidential candidate, the PM-nominated Dr Arif Alvi, could have had a tougher task since the PTI does not have a majority in the Senate, whose members are also going to vote today.
Moreover, the presidential election is held via a secret ballot, which keeps the door open for horse-trading.
However, Dr Alvi's presidency bid was given a huge boost due to disagreements within the opposition camp.
The PPP claims it's "suggestion" to nominate Aitzaz Ahsan as the opposition's candidate was misconstrued as a finalised nomination, which did not sit well with the PML-N as Ahsan had been a front line critic of its leadership in the past.
The episode reopened old wounds, and despite efforts to reconcile, a middle ground was not to be reached. PPP co-chairperson Asif Ali Zardari did not budge and stuck with his nomination of Ahsan. Meanwhile, JUI-F chief Maulana Fazlur Rehman, who had been given the task to mediate between the two parties, ended up garnering the joint opposition's support for himself; he was nominated by PML-N President Shahbaz Sharif.
A fourth candidate, PML-N's Ameer Muqam had also filed his nominated papers but withdrew from the race at the eleventh hour, possibly in Rehman's favour.
How is the president of Pakistan elected?
As mentioned above, the electoral college of Pakistan comprises six leading elected bodies of Pakistan: the Senate, the National Assembly and the four provincial assemblies.
Of the sextet, the Senate and the NA's members are given one vote each. However, the four provincial assemblies are assigned an equal weight with the smallest of them all — the Balochistan Assembly — serving as the base.
The Balochistan Assembly has 65 members while the strength of the Khyber Pakhtunkhwa Assembly is almost double this number, i.e. 124; so the vote of a member of the KP assembly has half the value of the vote of a member of the Balochistan Assembly.
According to the rules, the votes polled by a candidate in Punjab, Sindh and Khyber Pakhtunkhwa assemblies are multiplied by 65 and divided by the total strength of that house, i.e. 124, 168 and 371, respectively. The values obtained are then rounded off.