Islamabad: Beleaguered Pakistan Prime Minister Nawaz Sharif resigned on Friday after the Supreme Court, accusing him of dishonesty, disqualified him from holding the post following a probe that exposed illegal family wealth stashed abroad. Later, the PML-N decided to make Punjab Chief Minister Shahbaz Sharif, Nawaz’s brother, the new Prime Minister.

A five-judge bench unanimously disqualified Nawaz Sharif from his post after an investigative panel linked his grown up children to offshore companies, showing that their wealth was far above their legitimate earnings.

One of the judges, Ejaz Afzal Khan, said: “He (Sharif) is no more eligible to be an honest member of Parliament and he ceases to be holding the office of Prime Minister.” His cabinet was also dissolved.

The much-awaited verdict in what came to be known as the Panama Papers case stunned the ruling Pakistan Muslim League-Nawaz, which put up a brave front saying he would remain its leader.

But very soon the veteran politician, who was in his third term as Prime Minister, quit from office while claiming he had “strong reservations” about the Supreme Court ruling.

The Election Commission later issued a notification disqualifying Sharif as a member of the National Assembly.

The opposition was jubilant and celebrated on the streets. Many distributed sweets.

The Panama Papers leaks of April 2016 revealed that three of Sharif’s children owned offshore companies and assets not shown on his family’s wealth statement. This was apparently used to channel funds to acquire foreign assets, including in London.

The court has recommended that anti-corruption cases should be registered against several individuals including Sharif, his daughter Maryam and her husband Mohammad Safdar, Sharif’s sons Hassan and Hussain Nawaz as well as Finance Minister Ishaq Dar.

The bench also disqualified Dar and Safdar, an MP, from holding office.

The bench said the Prime Minister, who has denied any wrongdoing, had been dishonest to Parliament and the judiciary and could not be deemed fit to hold office.

Within hours, the elder Sharif met senior party leaders and it was decided that his younger brother, Shahbaz Sharif, would succeed him. The younger Sharif, who has visited India, is not a member of the National Assembly or Senate and will have to be elected.

The PML-N will have to propose an interim Prime Minister to fill the 45-day vacuum until Shahbaz gets elected to Parliament. PML-N leader Khawaja Asif will most likely be the interim Prime Minister.

Born four years after Pakistan’s independence, Shahbaz Sharif has been the Punjab Chief Minister since June 2013. He earlier held the post from February 1997 to October 1999 and from June 2008 to March 2013.

Justice Ejaz Afzal Khan said all material collected by the Joint Investigation Team (JIT), which probed the allegations against Sharif and his family, would be sent to an accountability court within six weeks.

The President of Pakistan, Mamnoon Hussain, has been asked to take necessary measures to run the country after Sharif’s disqualification.

It was the second time in Pakistan that the Supreme Court has disqualified a sitting Prime Minister. In 2012, Yousaf Raza Gilani was disqualified over contempt of court charges for refusing to reopen a corruption case against then President Asif Ali Zardari.

This is the third time Sharif has failed to complete his term in office. In 1993 he was sacked by the President over corruption allegations. And in 1999 he was ousted in a coup by Army Chief Pervez Musharraf.

Pakistan Tehreek-e-Insaf leader Imran Khan, who had emerged as the most vocal critic of Sharif, said that with his disqualification, the foundation of a new Pakistan had been laid.

Former President Musharraf, who went into virtual exile after Sharif returned to power, said the Supreme Court decision will have a positive impact on the country.

The Pakistan People’s Party said it was regrettable Sharif didn’t step down earlier and urged the authorities to ensure he didn’t flee the country.

Sharif’s daughter Maryam Nawaz was defiant. She tweeted: “Today will pave the way for Nawaz Sharif’s resounding victory in 2018. He will be unstoppable. Rok sakte ho to rok lo!”