Islamabad, Pakistan - Pakistan's Prime Minister Nawaz Sharif has stepped down after the Supreme Court disqualified him from office as leader of the country's government.

Friday's landmark ruling comes after months of hearings in a case instigated by the "Panama Papers" leaks, related to alleged corruption during his previous two terms in office.

Pakistani political analyst Mosharraf Zaidi's analysis of Sharif resignation "The prime minister and his family have failed in the court of public opinion - and, more importantly, in the Supreme Court - to establish credibility in terms of where the money came from, how it has been accounted for, and how well it was reported in the nomination papers submitted to the elections commission. "The failures here are of Nawaz Sharif and his family to establish a credible and coherent case in terms of explaining how their names ended up in the Panama Papers [revelations]. "Every democratic government has faced a whole range of obstacles in sustaining themselves and remaining in power. "However, the ultimate responsibility for where we are today, which is potentially enormous political instability, is in the prime minister’s camp. "The minimum that we expect from elected leaders is to answer important questions in the public domain, and that is very much the business of ordinary Pakistanis. He failed to answer those questions."

The five-member bench of the Supreme Court announced the verdict to a packed courtroom in the Pakistani capital, Islamabad.

Sharif's removal on the grounds that he lied about his assets during a corruption probe means that his ruling Pakistan Muslim League-Nawaz (PML-N) party, which holds a comfortable majority in parliament, will have to nominate a new leader.

According to a statement from the prime minister's office, Sharif stood down from his post in accordance with the Supreme Court ruling.

"All legal and constitutional options will be exercised regarding our serious differences with this verdict, the statement read.

The 67-year-old becomes the latest Pakistani prime minister not to have completed a five-year term in office, many having been overthrown in coups by the country's powerful military, which has ruled the country for roughly half of its 69-year-history.

Sharif and three of his children have been referred to a National Accountability court, which has been ordered to register corruption cases against them within six weeks, the judges said.

The court also referred Ishaq Dar, the finance minister, who has served as Sharif's accountant in the past, to the corruption court, along with other associates of Sharif.

Mariyam Aurangzeb, Sharif's information minister, said the government was "saddened" but "not surprised" by Friday's ruling.

PML-N would consult legal experts before deciding on a course of action, she told reporters, adding that the verdict did not offer any proof of government corruption.

"I want to speak directly to Pakistan's public ... not a single paisa [the smallest unit of Pakistani currency] of government corruption has been established even by this verdict," she said.

READ MORE: What's next for Pakistan's Prime Minister Nawaz Sharif?

Meanwhile, the opposition Pakistan Tehreek-e-Insaf (PTI) has announced plans to celebrate the verdict with a rally on Sunday.

Imran Khan, the PTI leader who championed the case against Sharif, described Friday's ruling as a triumph for democracy.

"What we have seen today, if anything could strengthen Pakistan's democracy, then this is it. In a democracy, a leadership must be accountable," the cricketer turned politician said. "Our democratic evolution has moved forward."

Bilawal Bhutto Zardari, leader of the opposition Pakistan People's Party, said the PPP will field a candidate for prime minister against the government's nominee after consultation with other opposition parties.

"We hope that the verdict will help in deterring corruption in high places," he said.

"The Pakistan People's Party fully intends to field its own candidate for the post of prime minister of Pakistan."

Speaking before the verdict, Siraj-ul-Haq, leader of the opposition Jamaat-e-Islami party and one of the plaintiffs in the case, said he hoped the decision would help strengthen the rule of law.

"True accountability is necessary for true democracy," he said outside the courtroom. "The law seems to not have been applied to the rich, but only to the poor."

The allegations against Sharif centred around the ownership of four apartments in London's posh Park Lane neighbourhood.

In 2016, the International Consortium of Investigative Journalists leaked 11.5 million documents from Panama-based law firm Mossack Fonseca, dubbed the Panama Papers.

Several documents included in the leak showed three of Sharif's children - Hussain, Hasan and Maryam - owned at least three off-shore companies registered in the British Virgin Islands.

The documents showed that these companies had engaged in deals worth $25m.

Crucially, one of the documents also revealed that the companies had been involved in a $13.2m mortgage involving the London properties as collateral, the first time the Sharif family's ownership of the apartments was proven on paper.

In November, after months of political turmoil, the Supreme Court launched hearings to establish whether the Sharif family had committed wrongdoing in obtaining the properties, or if the prime minister was liable for not declaring them earlier on tax and parliamentary wealth declarations.

Sharif denied the allegations against him, saying the assets were legally held by his children and were not in his name, and therefore he was not liable to declare them or be taxed on them.

The court demanded that the Sharif family establish a clear money trail showing how they came to own the properties.

READ MORE: Pakistan army 'rejects' PM's actions on security leak

According to the Sharifs, the money was obtained from the sale of a steel mill in the United Arab Emirates and was further invested with Sheikh Hamad bin Jassim bin Jaber al Thani, former prime minister of the Qatar.

Not satisfied with the explanation, the court in April constituted a high-level team to investigate the Sharifs.

The investigators found that Sharif had for years been the chairman of the board of Capital FZE, a company based in the UAE, without declaring his position.

The court's decision to remove Sharif was based on him not revealing his stake in the company in parliamentary wealth disclosures.

No democratically elected prime minister in Pakistan's history has completed a full five-year term.

Sharif's first two stints in power in the 1990s were both cut short; he was unseated in a military coup by General Pervez Musharraf in 1999.

Other prime ministers have been overthrown in two previous coups in 1958 and 1977, by the courts or by motions of no-confidence within the parliament.

Follow Asad Hashim on Twitter: @AsadHashim