Pakistan's Prime Minister Imran Khan is due to address the nation on Friday after the Supreme Court ruled he acted unconstitutionally in blocking an attempt to oust him - a decision that could end his premiership in days.
Last Sunday, political allies of the former cricket star dissolved parliament to thwart an opposition no-confidence vote Khan had been expected to lose after coalition partners deserted him to rob him of a majority.
The Supreme Court ruled late on Thursday that Khan's manoeuvre was unconstitutional, ordering that parliament be reconvened by Saturday and for the no-confidence motion to go ahead as planned.
The court ruling is the latest twist in a crisis that has threatened political and economic stability in the nuclear-armed country of 220 million people, with the rupee currency hitting all-time lows on Thursday and foreign exchange reserves tumbling.
Dawn newspaper welcomed the Supreme Court ruling, saying the court had reasserted itself as the custodian of the constitution.
"It is hoped that the verdict, delivered just as matters seemed to be hurtling towards chaos, will be able to pull the country back from the precipice," the English-language newspaper said.
Political chaos would worry the powerful military, which has stepped in to remove civilian governments and rule on three occasions, citing the need to end political uncertainty.
Khan said on Twitter late on Thursday he had called a cabinet meeting for Friday, after which he would address the nation.
He signalled his defiance with a cricketing term: "My message to our nation is I have always and will continue to fight for (Pakistan) till the last ball," he said.
Khan, who opposed the U.S.-led intervention in Afghanistan and has developed relations with Russia since he became prime minister in 2018, has accused the United States of supporting a plot to oust him. Washington dismissed the accusation.
After the Supreme Court ruling, angry Khan supporters on the streets chanted anti-American slogans while opposition supporters nearby celebrated.
Police in riot gear kept the two sides apart.
If Khan were to lose the no-confidence vote, the opposition could nominate its prime minister to govern until August 2023, by when a new election is due.
Shehbaz Sharif, the younger brother of three-time prime minister Nawaz Sharif, said after the court ruling that the opposition had nominated him to take over should Khan be ousted.
The opposition has said it wants early elections but only after delivering Khan a political defeat and passing legislation it says is required to ensure the next polls are free and fair.
Pakistan's election commission said on Thursday the earliest a new election could be held was October.
Some political analysts said the military viewed Khan and his conservative agenda favourably when he came to power in 2018 but its support has waned.
The military leadership says it is not involved in politics, including this latest bout of turmoil.