But it now appears that the apparent campaign to break up Khan's party may have significantly underestimated the generation that followed Khan online rather than on television, and which already represents about half the electorate in this nuclear-armed nation of 240 million.
Millions of young voters rallied on Thursday behind the party they said the ruling establishment was most determined to keep alive. Young Pakistanis have pulled off this country's biggest electoral upset in half a century, with candidates backed by Khan winning more seats in parliament than any other party.
“The election results showed one thing: that the old rules of the game will no longer work,” said Muhammad Malik, a Pakistani political analyst. “If the military still wants to maintain its influence and stay involved, it will have to adopt different tactics.”
For now, Khan's party is unlikely to return to power any time soon. Although its performance was well above expectations, it did not obtain an absolute majority in Parliament and had no clear coalition partners after losing popularity with the political system.
As expected, former three-time prime minister Nawaz Sharif's party announced on Tuesday that it was set to form a government with the support of the Pakistan People's Party and smaller parties, which had tacit approval from the establishment.
Sharif will leave the prime minister's post to his younger brother Shehbaz, who was leading a fragile coalition government after Parliament ousted Khan in April 2022. But even before the new government was formed, some analysts had already predicted its demise.
At almost every turn over the past weeks, Khan's party, the Justice Tehreek-e-Insaf (known as the Pakistan Tehreek-e-Insaf), has found ways to defy the odds that appear to be facing it.
When authorities banned the party's distinctive cricket bat symbol – which many illiterate voters in the past relied on to identify the party on the ballot – Khan's candidates used TikTok to promote their new symbols among rural voters. Despite being in prison, Khan himself surprised everyone with a victory speech in an AI-generated video on Friday, telling his supporters: “You have laid the foundation for true freedom.”
While PTI's campaign has struck a chord with young, digitally-savvy voters by putting them at the center of its messaging, Khan's main political rivals have failed to understand the scale of the generational challenge facing this election, Malik said.
Malik said that when Sharif, another former Pakistani leader who had fallen out with the army, returned from self-imposed exile in October after appearing to reconcile with the army, his speeches were all “about him, not about the youth.”
Zulfi Bukhari, spokesman for the Pakistan Tehreek-e-Insaf (PTI), said in an interview that preliminary analysis of voter files indicates that Khan's party's strategy worked. “A completely new demographic – they all voted for the PTI.”
Some of the frustration felt by Pakistani youth may disappear if circumstances change. Many are tired of economic uncertainty and stagnation, which they blame on corruption and ruling families like the Sharifs, which have dominated Pakistani politics for decades.
But never have these sentiments been expressed with such cynicism and publicity as on Pakistani social media in recent days, which could strain the delicate balance between civilian leaders and Pakistan's powerful military establishment in a way that will be felt for a long time.
“They are making fun of our country, so we are making fun of them,” said Uzair Chowdhury, a 19-year-old cell phone salesman in Islamabad, who voted for the PTI.
In one possible indicator of how the establishment is turning against digital spaces, mobile internet service was suddenly suspended across the country as voters began heading out to vote on Thursday, and remained cut off long after the polls closed. While Khan's supporters suspect this was part of an attempt to derail the party's plans to mobilize voters and document alleged election fraud, Pakistani authorities justified the shutdown by citing the risk of terrorist attacks potentially fueled by mobile internet.
The Pakistani military leadership has repeatedly denied allegations of a crackdown on the Pakistan Tehreek-e-Insaf (PTI) and has maintained that it does not interfere in Pakistani politics.
There were early signs that the Internet could cause problems for the Pakistani establishment. When Parliament ousted Khan in April 2022, his party supporters immediately took to social media to denounce what they saw as an impeachment orchestrated by the Pakistani military and the United States.
Dozens of social media users were arrested after anti-military and anti-US posts spread online in a campaign that officials said at the time was launched by Khan's party.
Pakistani officials also blamed social media for contributing to riots by Khan's supporters across the country in May, following Khan's arrest. The Pakistani government compared the riots to the attack on the US Capitol on January 6, 2021 by supporters of President Donald Trump.
Establishment concerns about the influence of social media appear to have increased in the run-up to the election. Pakistani state television quoted Asim Munir as saying that, without directly blaming PTI, he condemned the creation of an “atmosphere of anxiety, despair and chaos on social media” in December.
But the Tehreek-e-Insaf and its supporters say that rather than posing a threat, the Internet could make Pakistani political debate more informed. TikTok in particular has played a key role in mobilizing rural youth, said Gibran Ilyas, who helps direct PTI's social media efforts. Through TikTok, the party has been able to reach millions of illiterate voters who do not use Facebook and other text-intensive platforms.
Asim Amin, 22, who lives in rural northwest Pakistan, said TikTok opened his eyes to Khan in the run-up to the election. Although the jailed candidate was unable to campaign in person, Amin followed his party's videos on healthcare and the economy.
He added: “Khan is the true leader of the country.”
For Malik, the political analyst, last week's election result indicates that Pakistani parties will need to work harder to win votes in the future. “This is the first election in which the candidate was not looking for the voter, but in fact the voter was looking for the candidate.”