Pakistan's Parliament elected Shahbaz Sharif as the country's new prime minister, as ousted premier Imran Khan and most of his party's lawmakers resigned their seats in the national assembly immediately before voting started.
"Mian Muhammad Shahbaz Sharif has been elected as prime minister," said acting speaker Sardar Ayaz Sadiq after 174 votes were cast in the 342-seat assembly.
Sharif took the oath of office in a brief ceremony inside the stately, white marble palace known as the Presidency.
But his elevation won't guarantee a peaceful path forward or solve the country's many economic problems, including high inflation and a soaring energy crisis.
Khan was dismissed Sunday after losing a no-confidence vote, paving the way for an opposition alliance that faces the same issues that bedeviled the cricket star-turned-politician.
Sharif, leader of the centrist Pakistan Muslim League (PML-N), was certain to be chosen after Khan loyalist Shah Mahmood Qureshi, the former foreign minister, withdrew his candidacy and resigned his seat.
"I announced a boycott of the election," Qureshi said.
"We announce we (the party lawmakers) will submit our resignations. We reject becoming a part of this illegitimate process."
Khan's Pakistan Tehreek-e-Insaf (PTI) party had 155 lawmakers in the 342-seat chamber, although more than a dozen had said they would cross the floor ahead of Sunday's no-confidence vote.
Sharif won 174 votes after more than 100 lawmakers from Khan's party resigned and walked out of the National Assembly in protest.
Those 174 votes — two more than the required simple majority — are enough to pass laws.
In a show of strength and a precursor to the political uncertainty ahead, Khan rallied hundreds of thousands of supporters in protests Sunday night, describing the new leadership as an “imposed government” that colluded with the U.S. to oust him.
His backers marched in cities across Pakistan, waving large party flags and shouting slogans promising to return him to power. The crowds were dominated by youths who make up the backbone of Khan’s supporters.
Sharif's first task will be to form a Cabinet that will also draw heavily from the center-left Pakistan Peoples Party (PPP), as well as find space for the smaller conservative Jamiatul Ulema-e-Islam (JUI-F) party.
The PPP and PML-N are dynastic parties that have dominated Pakistani politics for decades – usually as bitter rivals – but their relations are sure to fray in the lead-up to the next election, which must be held by October 2023.
They need to tackle soaring inflation, a feeble rupee and crippling debt, while militancy is also on the rise – with Pakistan's Taliban emboldened by the return to power last year of the hard-line group in neighboring Afghanistan.
Shahbaz Sharif is the younger brother of disgraced three-time prime minister Nawaz Sharif, and Pakistan media is already speculating the latter may soon return from exile in Britain.
The elder Sharif was dismissed in 2017 and later jailed for 10 years by an accountability court on graft charges after revelations from the Panama Papers but was released to seek medical treatment abroad.
The younger Sharif is also mired in graft proceedings. In 2019, the National Accountability Bureau seized nearly two dozen properties belonging to him and his son Hamza, accusing them of money laundering.
He was arrested and detained in September 2020 but released six months later on bail for a trial that is still pending.
A seasoned politician in his own right, Shahbaz Sharif, 70, jointly inherited the family's steel business as a young man and was first elected to provincial office in 1988.
He is known as a tough administrator, feared for his frequent "surprise visits" to government institutions as well as a penchant for quoting revolutionary poetry.
No prime minister has ever served a full term in Pakistan, but Khan is the first to lose office via a no-confidence vote – a defeat he has not taken well.
After losing his majority in parliament, he tried everything to stay in power, including dissolving the assembly and calling a fresh election.
But the Supreme Court deemed all his actions illegal and ordered them to reconvene and vote.
Khan insists he has been the victim of a "regime change" conspiracy involving Washington and has vowed to take his fight to the streets in the hope of forcing an early election.
Political analyst Talat Masood said Khan appears to want to "create problems" for the next government.
"From what he has been saying, he seems to want to ... pursue a kind of a policy of trying to sort of rebel rather (than) make things better for the country and society," Masood, a former general, told Agence France-Presse (AFP).
Publicly, the military appears to be keeping out of the current fray, but there have been four coups since independence in 1947, and Pakistan has spent more than three decades under army rule.