Mr. Khan’s political party won 15 of the 20 seats in the country’s most populous province, which has often served as a bellwether for national politics.ISLAMABAD, Pakistan — Less than four months after Prime Minister Imran Khan was ousted from power in Pakistan, his party has won a sweeping victory in elections in the most populous province, proving that Mr. Khan remains a powerful force and adding to the political uncertainty that has embroiled the country since his defeat.Mr. Khan’s political party, Pakistan Tehreek-e-Insaf, on Sunday won 15 of the 20 seats contested in Punjab, a province that has often served as a bellwether for national politics.The province is home to more than half of Pakistan’s 200 million people and for years has been a political stronghold for the family of Prime Minister Shehbaz Sharif, who took over in April after Mr. Khan was ousted in a no-confidence vote that shook Pakistan’s fragile democracy.The elections Sunday were seen as a litmus test for Mr. Sharif’s government, a coalition of several parties that has struggled to gain popular support amid a cratering economy and to compete with the political momentum Mr. Khan’s party, known as P.T.I., has gained on the campaign trail since his ouster.“The P.T.I. has demonstrated that it has mobilized real support in the wake of the vote of no-confidence against Khan, while the ruling coalition has hemorrhaged support,” said Madiha Afzal, a fellow at the Brookings Institution. “The ruling coalition will have to fundamentally rethink its strategy and approach and perform well on economic indicators to have a shot at the next general election.”In a series of rallies that have attracted tens of thousands of people in recent weeks, Mr. Khan has accused the United States and the country’s powerful military establishment of orchestrating a conspiracy to topple his government. American officials, Mr. Sharif and the military have denied those accusations.A polling station in Lahore, in Punjab Province, on Sunday.Arif Ali/Agence France-Presse — Getty ImagesBut Mr. Khan’s message has resonated with people across the country, and the election results were widely viewed as a repudiation of the powerful military establishment and a reaction to the worsening economic conditions that have squeezed lower- and middle-income families.On Monday, Mr. Khan renewed his call for the government to hold general elections earlier than 2023, when they are currently scheduled. “The only way forward from here is to hold fair & free elections,” he said on Twitter. “Any other path will only lead to greater political uncertainty & further economic chaos.”Since taking office, Mr. Shehbaz’s government has had to walk a fine line balancing the tough measures needed to get the economy back on track with his party’s need to retain popular support ahead of the next general elections.Amid inflation that has reached its highest level in 14 years, Mr. Sharif has had to raise electricity rates, increase fuel prices and end government subsidies to revive a $6 billion bailout program from the International Monetary Fund. The bailout program was announced in 2019 and later suspended after Mr. Khan’s government failed to meet some of the loan conditions, like cutting energy subsidies.Last week, the I.M.F. and Pakistan’s government announced a staff-level agreement that paves the way for the disbursement of $1.17 billion to help avert a potential default. But the hugely unpopular economic measures to avoid default have spurred a public backlash against the ruling party, Pakistan Muslim League-Nawaz, and proved a key factor in Mr. Khan’s success in the Punjab elections, analysts say.“Not all of this is Mr. Sharif’s fault,” Nusrat Javeed, a veteran journalist, and political analyst based in Islamabad, said in an interview. “His government is facing the brunt of an accumulated mess of all previous governments.”But for most voters, Mr. Javeed said, what matters is that since April, “long hours of power outages are back, petrol has gone out of reach, and electricity prices are constantly being increased.”Since his ouster, Mr. Khan has capitalized on that dissatisfaction as he embarked on a new campaign trail. In recent weeks, he has frequented TV talk shows and carried out an unrelenting social media campaign across Twitter, Facebook Live, YouTube, and Instagram Live.A market in Lahore. Inflation has reached its highest level in 14 years.Arif Ali/Agence France-Presse — Getty ImagesMr. Khan has also accused the Inter-Services Intelligence Directorate, of meddling in the election process. During campaign speeches over the past few weeks, Mr. Khan would often claim that “Mr. X,” a code name he came up with for the provincial I.S.I. chief, was trying to rig the elections.On Twitter, P.T.I. supporters have heaped unprecedented criticism and ridicule at the army chief, Gen. Qamar Javed Bajwa, who was once considered to be a Khan supporter. General Bajwa appeared to withdraw his support for Mr. Khan last year after the two disagreed over military appointments. Angry P.T.I. supporters, in Pakistan and out of the country, have accused General Bajwa of giving a nod to the change of government in April.The anti-military rhetoric is a distinct shift for Mr. Khan, who ascended the political ranks with the support of the country’s powerful military. His victory in the 2018 elections was attributed by many of his rivals to a back-room deal struck with the military establishment.“His anti-establishment stance, in particular, is notable,” said Ms. Afzal, the Brookings fellow. “It represents a departure for Khan, and also for his voter base.”Government officials said Mr. Khan’s victory on Sunday disproved his accusations of election rigging and military interference in the current political cycle.“This is the first election in history the transparency of which even the worst political opponents cannot point a finger at,” Marriyum Aurangzeb, the county’s information minister, said.Still, the electoral loss on Sunday has added pressure on the ruling coalition, which has struggled to find its bearing after coming to power in a precarious position.Security outside a polling station in Lahore on Sunday.Rahat Dar/EPA, via ShutterstockThe coalition frequently clashed before ousting Mr. Khan and has struggled to remain cohesive.There is a growing perception in the country that Mr. Sharif is unable to inspire popular support and lacks the charisma of his elder brother Nawaz Sharif, who served as prime minister three times, analysts say. The younger Sharif has a reputation for his administrative skills, while his brother was known for pulling large crowds onto the street and into the voting booth.And the government, which was chosen by Parliament after Mr. Khan’s ouster, has no electoral mandate and has faced mounting pressure to hold fresh general elections in the coming months.Mr. Sharif’s party “is left in a Catch-22 situation,” said Abdul Basit, a research fellow at the S. Rajaratnam School of International Studies, Singapore. “If it hangs onto power in the center,” he said, “Shahbaz Sharif will be a lame duck prime minister, while early elections will be a political suicide.” More