Imran Khan was dismissed Sunday as Pakistan's prime minister after losing a no-confidence vote, paving the way for an unlikely opposition alliance that faces the same issues that bedeviled the cricket star-turned-politician.
A new premier will be chosen Monday, with centrist Pakistan Muslim League chief Shahbaz Sharif already anointed to lead the nuclear-armed nation of 220 million people.
His first task will be to form a cabinet that will also draw heavily from the center-left Pakistan Peoples Party, as well as find space for the smaller conservative Jamiatul Ulema-e-Islam group.
The Pakistan Peoples Party and the Pakistan Muslim League are dynastic parties that have dominated politics for decades – usually as bitter rivals – and their relations are sure to fray in the lead-up to the next election, which must be held by October 2023.
Shahbaz Sharif is the brother of disgraced three-time Prime Minister Nawaz Sharif, while Pakistan Peoples Party leader Bilawal Bhutto Zardari is the son of former President Asif Ali Zardari and assassinated ex-Prime Minister Benazir Bhutto.
Khan's exit was met with a mixture of glee and sympathy.
"Back to the pavilion," screamed the influential Express Tribune newspaper, using a cricket metaphor headline writers have found difficult to resist during Khan's tenure.
No prime minister has ever served a full term in Pakistan, but Khan is the first to lose office via a vote of no-confidence.
"Sad day for Pakistan ... a good man sent home," his former information minister Fawad Chaudhry said on Twitter.
There had been high hopes for Khan when he was elected in 2018 on a promise of sweeping away decades of entrenched corruption and cronyism, but he struggled to maintain support with soaring inflation, a feeble rupee and crippling debt.
Khan had vowed to fight "until the last ball," and he certainly took his exit to the wire Sunday.
He tried everything to stay in power after losing his majority in parliament – 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.
Still, there was drama right until the midnight deadline ordered by the court, with the speaker of the assembly – a Khan loyalist – resigning at the last minute.
The session restarted after midnight with a replacement, and the vote was finally held.
Khan's Tehreek-e-Insaf lawmakers stormed out, but the no-confidence motion passed with 174 votes in the 342-seat assembly.
New Pakistan governments frequently have a reckoning with those they replace, but Sharif said there would be no vendettas.
"We will put a balm on the wounds of this nation," he said immediately after the result was announced.
Khan insists he has been the victim of a "regime change" conspiracy involving Washington, and he is certain to tap into anti-U.S. sentiment from the opposition benches.
"Khan's politics don't stop here, his support base is intact," said Zahid Hussain, a political analyst and author.
"His narrative of last few months, that he has been removed through a foreign conspiracy, has earned him some support."
His party has called for mass protests to start after the Ramadan fast is broken Sunday evening, while Khan has vowed in his first tweet since being ousted that he would not give up.
"Pakistan became an independent state in 1947; but the freedom struggle begins again today against a foreign conspiracy of regime change," he said.