Immediately after, unofficial results started pouring in and showed that the PTI was in a commanding position and set for a major triumph.
Even before any official announcements, journalists, politicians and analysts across the country took to Twitter with congratulatory messages for PTI and advice for PML-N.
Read more: Make-or-break by-elections
Journalist Khurram Husain said the results showed that Imran Khan had "arrived" as a "genuinely popular leader in Pakistan with grassroot support".
He also warned that "dark clouds" were now gathering over Islamabad.
Another journalist, Mehreen Zahra-Malik tweeted that elections had become much tougher for Prime Minister Shehbaz Sharif now.
TV anchor and columnist Mubashir Zaidi suggested that PML-N should now "admit defeat" and "gracefully hand over the government".
Salman Masood, Pakistan's correspondent for the New York Times, said that the vote was a "repudiation of the establishment and a reaction to the high fuel prices, inflation and grinding power outages".
Barrister Asad Rahim Khan was of the opinion that beyond the parties, the vote was a "referendum".
Michael Kugelman, deputy director of the Asia Programme at the Wilson Centre in Washington, called it a "big victory [...] in Punjab, Pakistan’s most populous province and biggest electoral prize".
"Khan’s victory also delivers a strong message to his critics that post-ouster, his mobilization power isn’t just about big crowds; it can also serve as a precursor to electoral success. If the new beleaguered government was looking for a boost to its mandate, it clearly didn’t get it."
Researcher and activist Ammar Rashid congratulated the PTI, saying that Imran Khan's narrative resonated in Punjab amid the "tanking economy".
"And another reminder (after prior Muhammad Nawaz Sharif-led PML-N victories) that anti-establishment narratives no longer a deal breaker in Punjab politics," he pointed out.
Sahar Baloch, a journalist, was of the similar opinion.
Meanwhile, barrister Abdul Moiz Jafferi highlighted that the defeat was a reminder for the PML-N.
On the other hand, columnist Nadeem Farooq Paracha congratulated PTI for "learning to stand on your own feet".
Felicitations for PTI chief Imran Khan and his party also came in from outside the border. Ahmed Jamal Pirzada, a lecturer at the University of Bristol, tweeted that people power could still trump the use of "state's machinery and establishment's machinations".
Ashok Swain, a professor at the Uppsala University, asserted that Imran's party won the elections in "Sharif's backyard".