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 in a chequered political career.

"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.

As the verdict was announced opposition supporters erupted in applause, rushing into the street chanting slogans and handing out sweets in celebration.

The decision brings to an unceremonious end Sharif's third term in power, roughly one year before scheduled general elections which would have seen him become the first Pakistani prime minister to complete a full five-year term.

Most have seen their tenures cut short by the powerful military or interference from the Supreme Court. Others have been ousted by their own party, forced to resign -- or been assassinated.

The court also asked the national anti-corruption bureau to launch a further probe into the allegations against Sharif, which stem from the Panama Papers leak last year linking the premier's family to lucrative offshore businesses.

The bureau has the power to arrest and bring criminal charges against those it investigates.

The Supreme Court had in April declared there was "insufficient evidence" to oust Sharif over the graft allegations engulfing his family, and ordered an investigation team to probe the matter.

The team of civilian and military investigators found there was a "significant disparity" between the Sharif family's income and lifestyle in its report, which was released to the public and submitted to the court earlier this month.

The findings sparked an uproar, including the claim that documents regarding Sharif's daughter Maryam Nawaz and her link to 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 Sharifs and their allies have consistently and noisily rejected the claims against them, with his ruling PML-N party this month dismissing the investigation team's report as "trash".

There was no immediate reaction from Sharif or his family to the court ruling Friday.

The push against Sharif has been spearheaded by cricketer-turned-politician Imran Khan and his Pakistan Tehreek-i-Insaf party.

"Today (the) Supreme Court has made a new history. I want to thank (the) judges on behalf of the people of Pakistan because they made the impossible possible," PTI vice president Shah Mehmood Qureshi told reporters outside the court.

The ruling PML-N party currently has no clear successor in place.

Sharif's daughter Maryam is his presumptive political heir but does not hold public office, while his brother Shahbaz Sharif, the current chief minister of Punjab province, holds only a provincial seat.

'Moral authority'
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 is the legitimacy of the funds used by the Sharif family to purchase several high-end London properties via offshore companies.

The PML-N insists the wealth was acquired legally, through Sharif family businesses in Pakistan and the Gulf.

Bribery and other forms of graft are 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 graft allegations once before, when he was sacked by the country's then-president during the first of his three terms as prime minister in 1993.

There is precedent for the Supreme Court to oust a sitting prime minister: in 2012 then-premier Yousaf Raza Gilani was disqualified over contempt of court charges for refusing to reopen a corruption case against president Asif Ali Zardari.

Sharif has not yet completed a term as prime minister, having been removed in his second term by a military coup in 1999.

His ousting comes ahead of general elections due to be held by next year, and as the civilian government appears to have reached an uneasy detente with the military, which has ruled Pakistan for half of its existence.