The PPP could emerge as a coalition kingmaker if no party wins a majority, as many expect.
Sharif's party tops another poll with 26 percent compared to 25 percent for Khan's Pakistan Tehreek-i-Insaf (PTI).
While filing this report, the PTI is leading in 90 seats.
Gallup Pakistan estimated turnout at between 50 to 55 percent in an electorate of almost 106 million, similar to the previous contest in 2013. Sharif's party claims that their cadres were forced to stay at home which disenchanted their supporters to come out and cast their mandate.
Sharif, 68, was removed by presidential decree in 1993, in a military coup in 1999, and past year by the Supreme Court, which ordered his corruption trial.
PML-N's campaign had been reinvigorated by the return to Pakistan of Nawaz Sharif, 68, who was earlier this month convicted and sentenced in absentia to 10 years in prison over the purchase of upscale London apartments using offshore companies in the mid-1990s. The PPP led by Bilawal Bhutto is trailing third with leads on 32 seats.
PTI's Ghulam Sarwar leads in NA-59 Rawalpindi, PTI's Muhammad Shafiq leads in NA-161 Lodhran-2, PML-N's Amir Muqam leads in NA-29; reports Geo news citing unofficial results from 0.33% polling stations. In the prestige fight, Hamza Shehbaz, the son of Punjab Chief Minister Shahbaz Sharif, is ahead with 12,355 votes against PTI candidate Nauman Qaiser.
Counting has started at the end of Wednesday's elections in Pakistan.
"Form 45 was not given to our agents, results were stopped and votes were counted in the absence of our poll agents".
Could Imran Khan's vote in Pakistan election be cancelled?
Asked about allegations that the Pakistan Army is meddling in the elections, the spokesperson said the United States will not comment on Pakistan's internal politics. Stay with us for Live updates on counting of votes of Pakistan National Assembly and Provincial Assembly Elections 2018.
Voting is segregated throughout Pakistan with every single polling station divided into sections for men and women, including separate election officials.
On July 16, the Human Rights Commission of Pakistan (HRCP), an independent rights watchdog, decried "blatant, aggressive and unabashed attempts to manipulate the outcome of the upcoming elections".
A Pakistan hospital official says an explosion outside a crowded polling station in the southwestern city of Quetta has killed 31 people and wounded 35.
More than a 105 million Pakistanis were eligible to vote in the general election, which saw thousands of candidates competing for 272 seats in the lower house of parliament, as well as 577 provincial assembly seats. One candidate in the Sindh provincial assembly was unopposed and has already secured that seat. Here's a look at the top PM contenders of Pakistan.
Pakistan was locked in tense election race Wednesday, pitting cricketer-turned-politician Imran Khan against the party of jailed former prime minister Nawaz Sharif in a process disrupted by a suicide bomb that killed at least 31 people near a polling station.
Over four lakh security personnel have been deployed at polling stations across the country to maintain law and order and take action against harassment, after the nation witnessed one of the bloodiest campaigning, inlcuding the July 13 bombing that killed 150 people.
As polls closed, Pakistan's Election Commission spokesman Nadeem Qasim told The Associated Press that the commission had issued a notice to Khan saying his vote could be disqualified after he cast his ballot in front of television cameras, violating "the secrecy of the ballot paper".