The vote marks the first time that an elected civilian administration has completed a full term and handed power to another through the ballot box in a country where there have been three military coups and four military rulers.
"My prayer is that the outcome of this election should be good for this country. On whomever Allah bestows victory, I hope he will be able to deliver," said Sharif, a badge depicting his election emblem, a tiger, pinned to his waistcoat.
Bidding for an historic third term as leader of the centre-right Pakistan Muslim League-N (PML-N) party, Sharif said he was "confident that tonight we will start receiving good news from across the country".
"Muslim League-N has brought change in the lives of people in the past and PML-N is the only party which has an agenda for the future," he said.