There are two main contenders among the dozens of parties in the election fray
Pakistan election: The runners and riders to know ahead of national vote
The political party of Pakistan's jailed former prime minister Nawaz Sharif has said he must be urgently moved to hospital due to ill health with just two days before his party faces a close fought general election.
Mr Sharif has a history of heart disease and is suffering from high blood pressure, but has been refused permission to see his personal doctor, his party said.
More than 100 million voters are eligible to vote on Wednesday in a general election that should usher in what will only be the country's third democratic transfer of power in its existence.
Mr Sharif remains the figurehead of his Pakistan Muslim League party, despite having been jailed earlier this month after being found guilty by an anti-corruption court.
The country's interim prime minister and the Punjab chief minister were both asked to provide access to Sharif's personal physician “but all requests went down the drain,” PML-N spokesperson Maryam Aurangzeb told AFP.
“Nawaz Sharif, who is also a heart patient, has been quite unwell since Saturday after his blood pressure went up," Ms Aurangzeb added.
The world's sixth most populous nation goes to the polls as it faces an imminent financial crisis, as its relations with India remain frozen and after it was blasted by US President Donald Trump for its “lies and deceit”.
The election has become a neck-and-neck struggle between Mr Sharif's League and the political party of Imran Khan.
But the run-up to the election has been marred by suicide bombings on campaign rallies and accusations that the security establishment is trying to handicap Mr Sharif's ruling party.
Below, The National looks at the parties and their prospects ahead of Wednesday's poll.
Pakistan Muslim League (PML-N)
Not long ago the Pakistan Muslim League (PML-N) was seen as certain to win a second term in power. Pakistan's largest party won a landslide in 2013 and seemed destined to repeat the feat this month. Yet, in the past year, the centre-right party has faced a wave of legal and political hurdles that have left its leaders battling for survival and the party neck-and-neck with its main rival.
Party figurehead Nawaz Sharif, the three-times prime minister, has been jailed with his daughter and political heir Maryam by an anti-corruption court. Other PML-N figures have also been investigated, charged or imprisoned as the judiciary have combed through the party's upper echelons.
Mr Sharif has said the barrage of legal action is not coincidental. Disliked by the military for his attempts to build bridges with India and for confronting generals over their use of militant proxies, he claims it has retaliated by trying to weaken his party in a campaign that has seen supporters intimidated into switching sides and the media muzzled.
Such an onslaught may have destroyed another party, but the PML-N are not yet written off. Mr Sharif's return to Pakistan to face a jail cell has allowed him to portray himself as a political martyr and the party remains a potent political force under his younger brother Shahbaz, particularly in Punjab.
Pakistan Tehreek-e-Insaf (PTI)
When Imran Khan lifted the cricket World Cup above his head in 1992 he was guaranteed the adulation of the country
But his decision four years later to trade the life of a celebrity playboy for the bare-knuckle world of Pakistan politics took many by surprise.
Twenty-two years after he founded his centre-right Pakistan Tehreek-e-Insaf (Pakistan Justice Movement) party he has his best ever chance of taking power.
Populist attacks on the venality of members of Pakistan's political elite, such as Nawaz Sharif, as well as vows to clean up Pakistan's politics have long formed the cornerstone of his platform.
The former fast bowler has also said he will build an Islamic welfare state to improve the woeful health and social care available to most.
Yet some fear Khan's mercurial nature and lack of management skills are unsuited to being prime minister.
He is renowned for making policy u-turns and has raised eyebrows by catering to religious hardliners, spurring fears his leadership could embolden extremists.
His critics and rivals also say Mr Khan's surge in popularity after struggling to breakthrough for two decades is no accident. They say he is the beneficiary of a systematic campaign by the security state that wants to derail the PML-N and instead install a more amenable government. If the charges prove true and Mr Khan does win with military support, then all eyes will be on how he repays them.
Pakistan People's Party (PPP)
The Pakistan People's Party (PPP) may have struggled to gain momentum during campaigning, but in a close result between the two leaders, it is likely to play a critical role in coalition discussions. The centre-left party represents one of the country's most prominent political dynasties, led by Bilawal Bhutto Zardari and his father Asif Ali Zardari. The 29-year-old PPP leader, son of assassinated former prime minister Benazir Bhutto, has said he wants a "peaceful, progressive, prosperous, democratic Pakistan".
National polls indicate Mr Bhutto could finish in third place, but he could become kingmaker if he chooses to form a coalition with a rival party.
The military establishment
Voters may not be able to put a cross on a ballot paper next to the army, but the military and associated spy agencies are widely considered the most powerful players in the poll. The establishment, as those institutions are referred to in polite political code, has ruled the country directly for around half its existence and tried to pull levers for the other half.
Generals consider national security and foreign policy, particularly regarding Afghanistan and arch enemy India, to be their preserve and not the affairs of civilians.
Where civilian governments are deemed to have overstepped the mark, they have been removed by coups. The military now says it fully endorses democratic rule, yet analysts and several parties say the military with allies in the judiciary is instead engaged in determined vote engineering.
Wednesday's poll may effectively by a two-horse-race, but Pakistan's voters will also have the choice of a bumper crop of extremists.
The ultra-conservative candidates are not expected to win large numbers of seats, but their sheer number and unabashed extremism has led to fears that they are changing the country's political landscape.
Religious parties – some new, others established – are fielding more than 1,500 candidates for national and provincial assemblies, compared with a few hundred in 2013.
One new party, Tehreek-e-Labaik Pakistan, campaigns under the rallying cry "death to blasphemers" and is fielding 566 candidates.
Another party, the Sunni extremist Ahl-e-Sunnat Wal Jamaat (ASWJ), is also fielding dozens of candidates under a different name, even though it is banned as the political wing of Lashkar-e-Jhangvi (LeJ), which has killed hundreds of minority Shiite Muslims. The party denies links with the LeJ.
All the mainstream parties are attempting to court the hardliners to win critical seats.