Sharif's PML-N has been hoping its delivery of mega infrastructure projects, especially roads and power stations that helped hugely reduce electricity blackouts, would win over.
The exact time for announcement of the results is not yet known.
According to the Election Commission, 3,459 candidates are contesting for 272 general seats of the National Assembly, while 8,396 candidates are running for 577 general seats of the four provincial assemblies - Punjab, Sindh, Balochistan and Khyber-Pakhtunkhwa.
About 106 million people are registered to vote in polls due to close at 6pm local time (10pm AEST). High time that all of you came out to vote for Pakistan's progress and prosperity.
About 371,000 soldiers have been stationed at polling stations across the country to prevent attacks, almost five times the number deployed at the last election in 2013.
French farmers bring Tour de France to standstill with protest
With that in mind, Thomas even pushed for a four-second time bonus allocated to the rider taking third place in the stage. He had been 57.2 kilometres from the finish and in the lead of the 218km-long stage at the time of the crash.
More than 19 million new voters, including millions of women and youth, may prove decisive in the close race.
Hours after polling began for the general elections, an Islamic State suicide bomber blew himself up outside a polling station in Bhosa Mandi area of Balochistan's provincial capital, Quetta, killing 31 people, including policemen.
Polling took place in the country's 85,307 polling stations, out of which 17,007 were declared as "highly sensitive".
Thirty-five people have been rushed to various hospitals. The PML-N has sought to turn the vote into a referendum on democracy, and has said it was campaigning to protect the "sanctity of the vote", a reference to a history of political interference by the military.
Pakistan's flamboyant cricketer-turned-politician Imran Khan's Pakistan Tehreek-e-Insaf (PTI) was leading in 94 parliamentary seats, while its main rival Pakistan Muslim League-Nawaz (PML-N) was ahead on 53 seats in the initial round of counting on Wednesday in an election marred by a deadly suicide attack and allegations of manipulations by the powerful military. "That is why we think that the undecided voters may tilt the balance of the forthcoming election in Punjab and thereby determine the fate of the Federal Government", Gallup Pakistan said. The contest largely became a two-way race between Khan's PTI and the incumbent PML-N of ousted premier Nawaz Sharif, whose brother Shahbaz is leading its campaign.
Pakistan Peoples Party (PPP) and Muttahida Qaumi Movement-Pakistan (MQM-P) have all claimed that the votes cast at various polling stations were changed behind closed doors after their polling agents were thrown out without giving them form-45.
Trump wants to meet Putin early next year, after Russia probe: Bolton
And 42 percent of white men believe Putin has dirt on Trump, while 43 percent do not, according to the poll. Trump's proposed Washington meeting with Russian President Vladimir Putin has been delayed until 2019.
In the northwestern town of Swabi one PTI worker was killed in an exchange of fire with a rival party, police said.
That attack was also claimed by Islamic State militants.
But the erstwhile playboy's campaign has been dogged by widespread accusations he is benefitting from the support of the country's powerful security establishment, with the media, activists and thinktanks decrying a "silent coup" by the generals.
The military - which has ruled Pakistan for roughly half its history - has rejected the accusations, saying it has no "direct role" in the electoral process. He also the urged people of the country to fulfill their towards their nation and turn up in huge numbers on the election day.
Khan also raised eyebrows in recent weeks by increasingly catering to hardline religious groups, particularly over the inflammatory issue of blasphemy - sparking fears a win for PTI could embolden Islamist extremists.
Elsewhere, anger with the alleged conspiracy to unseat the PML-N was apparent among some voters. Nawaz Sharif was ousted from power previous year and jailed over a corruption conviction days before the vote, removing Khan's most risky rival.
Internet sensation April the giraffe is pregnant again
April, the giraffe whose YouTube pregnancy in 2017 made her famous, is due again around next March. April has maintained her social media celebrity status since rising to fame a year ago .
The Pakistan People's Party (PPP), with young scion Bilawal Bhutto Zardari at its helm, is also competing nationally, along with other parties.