Imran Khan has become the first Prime Minister of Pakistan to lose a no-trust vote. Today's vote that pushed out Mr Khan - who had declared that he will "play till the last ball" was not present in parliament - from the top post capped a dramatic week during which he sidestepped an initial no-confidence vote before getting the loyalist President to dissolve parliament and call fresh elections.
But Pakistan's Supreme Court on Thursday ruled all his actions illegal, and said the national assembly -- where Mr Khan has lost his majority -- must decide his fate.
The court's judgment was broader than expected after the Chief Justice said earlier this week the bench would only rule on the legality of the initial no-confidence motion being blocked.
Mr Khan, the cricketer-turned-politician who came to power in 2018 with promises to create a "Naya Pakistan", started as the darling of Pakistan's Army, but reports say he fell out with the Army chief and top commanders last year - the primary reason for his downfall now.
Publicly the military appears to be keeping out of the current fray, but there have been four coups since independence in 1947 and the country has spent more than three decades under army rule.
Not a single Prime Minister in Pakistan has completed a full five-year term since the country's independence in 1947.
Whoever takes over will still have to deal with the issues that bedevilled Mr Khan -- soaring inflation, a feeble rupee and crippling debt.