Trends from 264 of the 272 parliamentary seats that went to the polls showed that the PML-N was set to bag in excess of 125 seats, while Imran Khan's Pakistan Tehrik-e-Insaaf and the Pakistan People's Party were lagging far behind with 34 and 32 seats, respectively.
The PML-N was returned to power at the national level after millions of Pakistanis braved Taliban threats and violence that claimed some 50 lives to vote in the landmark general election that marked the first transition from one civilian government to another in the country's 66-year history.
Mr Sharif proclaimed victory for the PML-N while addressing a group of jubilant supporters at his home in Lahore last night and asked people to pray that the final results would deliver an "absolute majority" for his party so that he would not have to lead a weak coalition.
"The results are still coming in but we almost have confirmation about one thing - that the PML-N has emerged the largest party in this election. I ask you to pray that the results that come in the morning will show that the PML-N can form government without outside support, so that the PML-N doesn't have to seek support from anyone," he said.
The PML-N's strong performance will make it possible for Mr Sharif to form government at the centre with the backing of independent candidates and smaller rightist parties like the Jamiat Ulema-e-Islam which was leading in 11 seats.
Analysts said it was possible that the Muttahida Qaumi Movement, leading in 12 seats, could back the PML-N.
To win a simple majority, a party or coalition would have to bag 137 of the 272 National Assembly seats for which polls were held. Another 70 seats, reserved for women and non-Muslims, will be allocated to parties according to their performance in polls. To have a majority 342-member National Assembly, a party or coalition would need 172 seats.
The PML-N was also set to form government in the most populous province of Punjab, where it was leading in 188 seats out of 297 seats in the provincial assembly.
In southern Sindh province, the Pakistan People's Party and its ally MQM were leading in 66 seats and 15 seats, respectively, and were comfortably placed to form government in the 130-member assembly.
The Awami National Party suffered a washout in Khyber-Pakhtunkhwa province, leading only in three seats while the Pakistan Tehrik-e-Insaf was set to bag 31 seats. There were no trends for Balochistan though the PML-N, Pashtunkhwa Milli Awami Party and Balochistan National Party-Mengal were expected to perform well in the southwestern province.
Most top leaders of the PPP, including several former ministers, and senior leaders of parties that were allied to it - like the ANP and PML-Q - were defeated in Punjab and Khyber-Pakhtunkhwa.
Sharif vowed to deliver on all the promises he had made during the campaign, including pledges to end crippling power cuts, set right the tanking economy and to counter corruption.
The two-time former premier also struck a conciliatory note, appealing to all parties to sit together with the PML-N to find ways to tackle Pakistan's pressing problems. In remarks apparently aimed at Imran Khan, who had launched personal attacks on PML-N leaders during the campaign, Mr Sharif said: "I never abused anyone but I forgive those who abused us".
Sources told PTI that the PML-N would also not be averse to working with the PPP after forming government as the party's leaders were not keen on any sort of alliance with Imran Khan's Pakistan Tehrik-e-Insaf.
Sharif, 63, served as premier during 1990-1993 and 1997-1999 but was ousted from office before he could complete his term - once on corruption charges and later because of a military coup led by Pervez Musharraf. After being deposed in 1999, he was jailed and sent into exile to Saudi Arabia. He returned to Pakistan shortly before the 2008 polls and rebuilt his party, especially in Punjab, a politically crucial province as it has more than half of the seats in the lower house of parliament.
Heavy turnout of voters was seen yesterday. The Election Commission extended polling by an hour to accommodate large numbers of voters who were still present at polling stations and officials said they expected the turnout to be around 60 per cent.
Elections in Pakistan have traditionally registered low turnouts and only 44 per cent of the electorate voted in the last polls in 2008.