The charges against Mr. Sharif and three of his children â two sons and a daughter â stemmed from disclosures last year in the Panama Papers, which revealed that the children owned expensive residential property in London through a string of offshore companies. In their ruling on Friday, the justices also ordered the opening of criminal investigations against the Sharif family.
Imran Khan, the opposition politician who has been spearheading the campaign against Mr. Sharif since he took power in 2013, stands to gain the most politically from the removal of Mr. Sharif. Mr. Khan has doggedly and almost obsessively led the charge against Mr. Sharif and rallied a wide swath of the public against him through a mix of street agitation and court petitions.
The Supreme Court had asked the members of the Sharif family to provide a paper trail of the money they used to buy their London apartments. Investigators found that they were âliving beyond their means.â
Despite repeated court exhortations, Mr. Sharifâs family and its lawyers failed to provide satisfactory documentation, the justices said. Several of the documents they produced were declared fake or insufficient.
Mr. Sharif has called the inquiry into his familyâs finances a conspiracy and has asserted that in his three terms as prime minister he has not been tarred by a major corruption scandal. He repeatedly rebuffed calls to resign and said that he had done no wrong.
The ruling, while expected, leaves unanswered the long-term fate of the man who has been a dominating force in Pakistani politics for the better part of three decades.
âI did not expect Nawaz Sharif to go scot-free,â said Hasan Askari Rizvi, a prominent political analyst who is based in Lahore.
âIf he has a long-term vision, he will sit back and guide his political party,â Mr. Rizvi added. âHe and his supporters will portray the court verdict as victimization and a grave conspiracy involving international powers.â
Mr. Sharifâs removal from office throws his political succession plans into disarray. His daughter Maryam Nawaz Sharif, who was being groomed as his political heir, was also implicated in the case.
Political insiders say there are several possible contenders to replace Mr. Sharif: Sardar Ayaz Sadiq, the speaker of the national assembly; Shahid Khaqan Abbasi, the minister of petroleum; Khurram Dastgir Khan, the commerce minister; and Khawaja Muhammad Asif, the defense minister.
âWhoever they bring will be a weak prime minister, as Nawaz Sharif would want to have someone who is more or less in line with his thinking,â Mr. Rizvi said.
Mr. Khanâs supporters had laid siege to the Parliament and other government buildings in 2014 after accusing Mr. Sharif of rigging the 2013 general elections. Another attempt to blockade the capital in 2016 was unsuccessful, but it forced the Supreme Court justices to take up the Panama Papers case.
After the Supreme Court reserved judgment on the case on July 21, Mr. Khan on Wednesday urged the court to announce a verdict without delay.
âThe whole country is at a standstill due to the Panama Papers case,â Mr. Khan said. Critics said Mr. Khan was pressuring the courts.
Political analysts say the court verdict hands Mr. Khan an undeniable political and moral victory.
âImran Khan will be strengthened, but it remains to be seen how he capitalizes in Punjab Province, which is critical to winning the general elections,â Mr. Rizvi said. Punjab, the most populous and prosperous of the countryâs four provinces, has remained a stronghold of Mr. Sharif for decades.
Mr. Sharif presided over a period of relative economic stability and was able to complete a few large infrastructure projects while reducing the crippling power outages that have long afflicted Pakistan.
But the stubborn scandal over the London real estate holdings sullied the reputation of the family.
Mr. Sharifâs political party nonetheless hopes that his achievements can bring it another electoral success next year even if Mr. Sharif cannot run for office. Mr. Sharif is expected to campaign for his party.
During his current tenure, Mr. Sharif had an uneven relationship with the powerful military. His overtures of more openness toward India, Pakistanâs longtime foe, backfired as generals spurned his efforts.
More recently, relations with the military took a darker turn after news reports detailed how civilian officials confronted the military over what they called a failure to act against Islamist groups. Mr. Sharif had to fire his information minister and two top aides to placate the army.
Bilawal Bhutto Zardari, the chairman of the Pakistan Peoples Party, said the Panama Papers ruling was âa real test of our system.â
Some predicted a politically volatile time ahead.
âUntil the elections, this will lead to a period of political instability,â Amber Rahim Shamsi, a prominent journalist who hosts a show on Dawn TV, said of the verdict.
âThe Sharif political dynasty has somehow managed to survive Pakistanâs rough and bloody politics for over three and a half decades through wheeling and dealing,â Ms. Shamsi said. âIt is hard to imagine all the family falling like a pack of cards. Nawaz Sharif has a following and could cash in on political martyrdom to stage a comeback.â