Pakistan’s newly elected Parliament approved Shehbaz Sharif as prime minister on Sunday, ushering in his second term in that role and capping weeks of upheaval — as well as setting into motion a government facing economic and political challenges that are likely to leave the country in turmoil for years to come.
His selection also brings to a crossroads the role of Pakistan’s powerful military, which has long been seen as an invisible hand guiding the country’s politics and has previously engineered its election results. Analysts say that public confidence in Mr. Sharif’s government is low.
“The government is being seen as foredoomed,” said Talat Hussain, a political analyst based in Islamabad, Pakistan’s capital.
Mr. Sharif secured 201 votes in the national assembly, while his closest rival, Omar Ayub, a supporter of the imprisoned former prime minister Imran Khan, got 92.
Before the voting began, Mr. Sharif arrived in the main hall accompanied by his older brother, Nawaz, who was also elected as a member of the national assembly. The two brothers sat together in the front row, a reminder that the elder Sharif, himself a three-time prime minister, remains influential and is likely to wield power behind the scenes.
The proceedings started with a loud protest in support of Mr. Khan. Several Khan supporters sat in front of the speaker’s dais to chant slogans; many others waved pictures of Mr. Khan, as they, too, shouted slogans in support of the cricket star turned politician.
Mr. Sharif’s party, Pakistan Muslim League-Nawaz, which he leads with his family and which is currently the military’s preferred party, did not win the most seats in the national elections that Pakistan held a month ago. That honor went to candidates aligned with a party led by Mr. Khan, which the military had sought to sideline.
Despite that upset — a searing rebuke to the military — the P.M.L.N. was able to cobble together a coalition with other major parties to lead the government.
Yet Mr. Sharif’s government will face lingering doubts over its legitimacy after mounting accusations that the military tampered with the vote count in dozens of races to tilt them in favor of his party and away from Mr. Khan’s party, Pakistan Tehreek-e-Insaf.
Najam Sethi, a prominent Pakistani political analyst, said the longevity of the Sharif coalition government depended on support from the military chief.
“As things stand, the military leadership and the coalition parties have no option but to stick together because both stand to lose if one falters. As long as Gen. Asim Munir is army chief, the Shehbaz-led government will survive bouts of instability,” Mr. Sethi said.
Another challenge: The country’s economy has teetered on the brink of collapse for years, with inflation reaching a record high last spring. A bailout from the International Monetary Fund has kept the economy afloat, but that program is set to expire this month, and the new government will need to secure another long-term I.M.F. plan.
Any possible deal — which Aqdas Afzal, an economist based in Karachi, said would need to be “in the neighborhood” of $6 billion to $8 billion — will most likely require new austerity measures that could stoke public frustration.
In Parliament, leaders of Mr. Khan’s party have also promised to serve as a powerful opposition — and possible spoiler.
“Our priority will be to get our leaders released and bring them to the Parliament,” Mr. Ayub said, referring to Mr. Khan and Shah Mahmood Qureshi, a former foreign minister, who is also imprisoned.
The party’s supporters, energized by election success, may also take to the streets to press the government to release Mr. Khan, who is serving multiple sentences on charges that include leaking state secrets. Mr. Khan has vowed to appeal those convictions, which he says are politically motivated, and his party has promised legal challenges to some of the election results.
The new prime minister, speaking after Sunday’s vote, said the country faced huge challenges but also had opportunities. Noting that the economy remained the key challenge, he vowed to bring in investment and create a business-friendly environment.
Mr. Sharif, whose first term as prime minister came after lawmakers ousted Mr. Khan in a no-confidence vote in April 2022, is known for efficient management. He oversaw several big infrastructure projects as the chief minister of Punjab, the country’s largest province.
In contrast to his brother Nawaz, who was prime minister for three terms and has fallen out with the country’s generals several times, Mr. Sharif has been deferential toward the military. In his previous term as prime minister, the military further entrenched its role in the government and increased its influence over policy-making.
In June 2023, Mr. Sharif approved the creation of a government council intended to attract foreign investment, a move widely seen as an effort by the military to have a more direct say in economic policies. The army chief, General Munir, is a member of that body, the Special Investment Facilitation Council.
Mr. Sharif also approved a policy under which the country’s intelligence agency was given the power to approve or deny government officials’ appointments and postings. That has amplified its pervasive sway over not only politics but also the civil service, analysts say.
In the wake of the election upset, analysts say the military’s future role is an open question. But most agree that a weak civilian government will make it easier for the generals to reassert their control and wield an even heavier hand politically if they choose.
“Civil-military relations in Pakistan — including relations between the military and society — will not be, cannot be, the same as they had been,” said Adil Najam, a professor of international affairs at Boston University. “What they will become is what is on the minds of every political player in Pakistan and has to be topmost on the minds of the top brass of Pakistan’s military, too.”