During the campaign, 63-year-old Mr Sharif had vowed to revive the Indo-Pak peace process which was interrupted in 1999 by the then military ruler Pervez Musharraf who ousted him in a bloodless coup. Mr Sharif had started the peace process with then Prime Minister Atal Bihari Vajpayee.
In Delhi, Prime Minister Manmohan Singh congratulated Mr Sharif for his "emphatic victory" in the elections. (Full text)
External Affairs Minister Salman Khurshid welcomed the outcome of elections in Pakistan and hoped India will continue to have good relations under Sharif's leadership.
Counting of votes was progressing at a slow pace with trends indicating that Mr Sharif may marginally fall short of absolute majority but will be able to make it up by getting the support of independent candidates and smaller rightist parties like the Jamiat Ulema-e-Islam which was ahead in 11 seats. (Read)
Trends from 264 of the 272 parliamentary seats that went to the polls yesterday showed that the PML-N was set to bag in excess of 125 seats. Mr Sharif needs 137 seats for a majority.
Imran Khan's Pakistan Tehrik-e-Insaf (PTI), about which there was considerable hype, lagged behind with trends showing it leading in just 34 seats.
The Pakistan Peoples Party (PPP), which had a tally of 124 in the 2008 elections and ruled the country for five years with the support of the MQM and the Awami National Party, was ahead in only in 32 seats.
Mr Sharif is set to return to power at a time when Pakistan is facing several major challenges, including growing extremism, a strong Taliban presence in the country's northwest, rampant corruption, uneasy relations with the US ahead of the withdrawal of foreign forces from war-torn Afghanistan and an economy that has virtually been in free fall for the past few years.
The PML-N is returning 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 elections that marked the first transition from one civilian government to another in the country's 66-year history, which has witnessed numerous military coups.
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.
Conceding defeat, cricketer-turned-politician Imran Khan from his hospital bed said, "I have seen many ups and downs in my life. But I forget the pain of this defeat when I see the enthusiasm of the youngsters."
"I want to thank the electorate for coming out in such large numbers. This is significant for Pakistan. The people have decided that they will play a role in forming the future of Pakistan through their vote," the 60-year-old PTI chief said.
Analysts said it was possible that the Muttahida Qaumi Movement, leading in 12 seats, could back Mr Sharif in forming the government.
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.
Mr Sharif 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 the coup led by Musharraf.
Heavy turnout of voters was seen on Saturday. Elections in Pakistan have traditionally registered low turnouts and only 44 per cent of the electorate voted in the last polls in 2008.