The main contests are expected to be between candidates backed by jailed former Prime Minister Imran Khan, whose Tehreek-e-Insaf (PTI) party won the last national election, and the PML-N of Sharif, who analysts say is being backed by the powerful military.
With counting continuing into Friday morning, a clear picture was likely to emerge only later in the day.
A party needs 133 seats in parliament for a simple majority but many analysts believe the vote may not produce a clear winner.
Sharif, considered by many observers to be a strong candidate, dismissed talk of an unclear result.
“Don’t talk about a coalition government. It is very important for a government to get a clear majority … It should not be relying on others,” he told reporters after casting his vote in the eastern city of Lahore.
NINE KILLED IN ATTACKS
Thousands of troops were deployed on the streets and at polling stations across the country on Thursday. Borders with Iran and Afghanistan were temporarily closed as security was stepped up to ensure peaceful polling.
Despite the heightened security, nine people, including two children, were killed in bomb blasts, grenade attacks and shootings by militants.
The victims included five police killed in a bomb blast and firing on a patrol in the Kulachi area of Dera Ismail Khan district in the northwest, authorities said. Two children died in a blast outside a women’s polling station in Balochistan.
“Despite a few isolated incidents, the overall situation remained under control, demonstrating the effectiveness of our security measures,” caretaker Interior Minister Gohar Ejaz said in a statement.
Washington was concerned about “steps that were taken to restrict freedom of expression, specifically around internet and cellphone use,” State Department deputy spokesperson Vedant Patel told reporters.
The US strongly condemned election-related violence both in the run-up to the polls and on election day, Patel added.