Pakistan's Supreme Court on Friday disqualified Prime Minister Nawaz Sharif from public office over long-running corruption allegations, a decision that ousts him from the premiership for the third time.
The ruling saw political instability take hold in Pakistan once again, dissolving Cabinet and leaving the country without a sitting prime minister.
General elections are scheduled for next year, but Sharif now falls short of becoming the first premier to complete a full five-year term.
As the verdict was announced in Islamabad, opposition supporters rushed into the street chanting slogans and handing out sweets in celebration.
Hundreds also took to the streets in northwestern Peshawar, beating drums and distributing money and sweets while chanting "Go Nawaz Go".
But in Lahore, capital of Sharif's power base of Punjab province, sporadic protests broke out, with his supporters burning tyres and locking streets.
The allegations against the prime minister spiralled from the Panama Papers leak last year, which sparked a media frenzy over details of the lavish lifestyles and luxury London property portfolio of the Sharif dynasty.
Those claims prompted an investigation which said there was a "significant disparity" between the family's income and lifestyle, and unearthed fresh claims over Sharif's links to companies based in the United Arab Emirates.
The court cited the UAE allegations in its ruling Friday, declaring they indicated Sharif was "not honest" as it brought his tenure to an unceremonious end.
"He is disqualified as a member of the parliament so he has ceased to be holding the office of Prime Minister," Justice Ejaz Afzal Khan told the packed courtroom in Islamabad.
Sharif's ruling PML-N party confirmed he had stepped down with "serious reservations", a move which automatically dissolves Cabinet.
The party currently has no clear successor in place. The Supreme Court called on President Mamnoon Hussain, who swears in the prime minister, to take the "necessary steps under the Constitution to ensure the continuation of the democratic system".
The push against Sharif has been spearheaded by cricketer-turned-politician Imran Khan and his Pakistan Tehreek-i-Insaf party.
"I want to tell the nation that it is a huge victory of yours," Khan told reporters at his home outside Islamabad Friday, adding that he was "extremely pleased".
"I am seeing the destination of a new Pakistan in front of me," he said, announcing a rally to be held on Sunday.
- Family fortunes and 'fontgate' -
Karachi-based political commentator Farooq Moin said the judgement was "historic".
"The situation is quite fluid and it is difficult to say at the moment whether there will be snap elections or an interim government will be formed," he told AFP, though he added chances were "bright" that Sharif's PML-N would form a new government.
The Sharifs and their allies have consistently and noisily rejected the graft claims against them.
"Not a single penny of corruption has been proved in this decision against Nawaz Sharif and the people of Pakistan also know it," information minister Maryam Aurangzeb told reporters after the decision.
The court has asked the national anti-corruption bureau to launch a further probe into the allegations, which could see criminal charges brought against the Sharifs.
The controversy erupted last year with the publication of 11.5 million secret documents from Panamanian law firm Mossack Fonseca documenting the offshore dealings of many of the world's rich and powerful.
Three of Sharif's four children -- Maryam and his sons Hasan and Hussein -- were implicated in the papers.
At the heart of the case was the legitimacy of the funds used by the Sharif family to purchase several high-end London properties via offshore companies.
The Supreme Court had in April declared there was "insufficient evidence" to oust Sharif over the allegations, and ordered an investigation.
Its findings, including previously undisclosed links between Sharif and companies in the UAE, sparked an uproar, with the scandal playing out on the country's frenetic news channels.
Attention focused on the investigation's conclusion that documents regarding Sharif's daughter and some of the family's London properties were "falsified" -- dated 2006, but typed in Microsoft's Calibri font, which was not released for commercial use until 2007. The Supreme Court's judgement Friday was typed in Calibri.
Graft is endemic in Pakistan, with the country coming in 116th place out of 176 countries ranked according to corruption levels by Transparency International in 2017.
Sharif has been ousted by corruption allegations once before, when he was sacked by the country's then-president during his first term in 1993. He was removed from office in his second term by a military coup in 1999.
Sharif's ousting comes as the civilian government appears to have reached an uneasy detente with the military, which has ruled Pakistan for half of its existence.