As voting got under way on Wednesday in the south-western city of Quetta, the Baluchistan provincial capital, militants sent a suicide bomber to a crowded polling station to carry out a deadly attack that killed 31 people.
Sharif's brother Shehbaz, who now leads the Pakistan Muslim League-Nawaz (PML-N), rejected the count after complaints soldiers stationed in polling stations had thrown out political parties' monitors during the tabulations. As Mike Armstrong explains, the election results could have wider repercussions for the region.
Analysts said the vote was too close to call as polls closed at 6 pm, despite widespread allegations of pre-poll meddling by the armed forces in favour of Khan, which saw the process dubbed Pakistan's "dirtiest election". More than 11,000 candidates vied for 270 seats in the National Assembly, and 577 seats in four provincial assemblies. He, however, acknowledged that the delay in announcement of election results had "caused some annoyance". Television projections give his party hardly 61 seats.
Khan called for "mutually beneficial" ties with Pakistan's on-off ally the United States, and offered an olive branch to arch-foe India, saying the two nations should resolve the long-simmering dispute over Kashmir.
Israel shoots down Syrian fighter near Golan Heights
The Su-22 was believed to have been among the Syrian and Russian planes targeting ISIS-held towns along the frontier. One pilot was severely injured during the ejection, while the second was lightly wounded.
Up to 8,00,000 police and troops were stationed at more than 85,000 polling stations across the country, after a string of attacks targeting political events in the final weeks of the campaign killed more than 180 people, including three candidates.
Sharif's Pakistan Muslim League-Nawaz or PML-N was ahead in 66 constituencies, and the Pakistan Peoples Party or PPP, led by the son of assassinated two-time prime minister Benazir Bhutto, led in 39 constituencies.
"I say to the people of this country today, we will govern Pakistan like it has never been governed before".
While opponents have alleged "blatant" rigging of the election, the Chief Election Commissioner allayed such speculations by attributing the delay to a new system- Results Transmission System - introduced by it.
The Trump administration said it was closely monitoring the situation in Pakistan but refused to declare the polls "free and fair".
House Republicans seek impeachment of DOJ's Rosenstein
House of Representatives has introduced articles of impeachment against Deputy Attorney General Rod Rosenstein . Trump could simply put someone else in his place who was more inclined to blunt or hamper the investigation.
In Punjab, with preliminary results from 50pc polling stations available with ECP, PML-N is now holding its lead on 129 provincial seats but PTI is closing in with a lead on 122 seats.
Accusations of military interference: Wednesday's national election was dogged by accusations that Pakistan's powerful military was manipulating the election.
If successful, the elections will mark only the second time a civilian government has handed power to another in Pakistan since the country's independence in 1947.
Mr Khan has staunchly denied allegations by PML-N that he is getting help from the military, which has ruled Pakistan for about half of its history and still sets key security and foreign policy in the nuclear-armed nation.
Former premier Sharif, a vocal critic of the army, was sentenced to 10 years in prison on corruption charges in absentia and was arrested after returning to Pakistan on July 13.
Gutsy Gilbert survives spectacular crash on Tour
As the Tour reached the mountains of the Pyrenees, Philippe Gilbert and Alaphilippe led on the ascent to Col de Portet-d'Aspet. But with only 5 kilometers of descent to go, Yates crashed turning a corner and could only watch as Alaphilippe flew past.