Pakistan's parliament on Monday elected Shehbaz Sharif prime minister after a week-long constitutional crisis that climaxed on Sunday when his predecessor Imran Khan lost a no-confidence vote.
Shehbaz, 70, who has a reputation domestically as an effective administrator more than as a politician, is the younger brother of three-time prime minister Nawaz Sharif.
Analysts say Shehbaz, unlike Nawaz, enjoys amicable relations with Pakistan's military, which traditionally controls foreign and defence policy in this nation of 220 million people.
The younger Sharif emerged as the leader of a united opposition to topple Khan, a former cricket star who has claimed that the United States was behind his downfall, which Washington has denied.
- Imxjmtzywran Khan ousted as Pakistan's PM after no-confidence vote
Nawaz Sharif was barred by the Supreme Court in 2017 from holding public office and subsequently went abroad for medical treatment after serving just a few months of a 10-year jail sentence for corruption charges.
Khan's party walks out
Just minutes before the vote, legislators from Khan's party resigned en masse from the lower house of parliament in protest at the expected formation of a government by his political opponents.
"We are announcing we are all resigning," Shah Mahmood Qureshi, former foreign minister and vice-president of Khan's party, said in a speech in the assembly.
Khan's Pakistan Tehreek-e-Insaf (PTI) party had submitted papers nominating Qureshi as its candidate for prime minister.
The mass resignations will require fresh by-elections in well over 100 seats.
"There can't be any bigger insult to this country," Khan told reporters on Monday at the prospect of Sharif being elected.
No elected prime minister has completed a full term in Pakistan since it won independence from colonial power Great Britain in 1947, though Khan is the first to be removed by a no-confidence vote.
The military has ruled the country for almost half its nearly 75-year history. It viewed Khan and his conservative agenda favourably when he won election in 2018.
But that support waned after a falling-out over the appointment of military intelligence chief and economic troubles that last week led to the largest interest rate rise in decades.
Khan remained defiant following his defeat in parliament. Thousands of his supporters in several cities held protests against his ousting that went on until Monday's early hours.