Sharif, 67, had to step down as prime minister and president of the ruling PML-N party after he was disqualified by the Supreme Court on July 28 in the Panama Papers scandal.
Raising questions over his disqualification, Sharif told his supporters that the real verdict came from the constituents of NA-120 Lahore, the seat recently won by his ailing wife, Kulsoom Nawaz.
"You didn't win an National Assembly seat but also helped justice prevail," he said, criticising the July 28 verdict that unseated the three-time prime minister.
"I still fail to understand why I was ousted [from the prime minister seat]," he said.
More From This Section
The conditions under which the election was contested and won by his party, Sharif said he wanted to congratulate the people from his heart.
"Nawaz Sharif wants to kiss all your foreheads," the former premier said, expressing his gratitude to party workers for supporting his daughter, Maryam, who campaigned on behalf of her ailing mother, Kulsoom, for the by-poll.
If this passion continues, Pakistan will only move forward. The old traditions will break. The sanctity of your vote will be revived, he said.
Sharif was re-elected yesterday as President of the ruling PML-N party, thanks to the election reforms passed by parliament a day earlier.
He said his government had ended prolonged hours of power outages in the country, and help lift the industrial sector. He also claimed credit for curbing terrorism in the country.
"Despite all that, I was removed from office," he said.
Sharif said he was confident that his party would win the 2018 general election.
"By voting in NA-120, you have proven that not only the constituency and not only the city but the whole country is Nawaz Sharif's fort," Shahbaz, the brother of Nawaz Sharif, said.
Terming the PML-N's victory in the by-poll "historic," Shahbaz said that the 2018 election would prove even more successful for the ruling party.