The ruling will make it more difficult for the U.S. to find a solution to the war in Afghanistan.

Stockbyte | Getty Images

Pakistan is likely to face serious political and economic instability after the country's three-time Prime Minister Nawaz Sharif is ousted from power by the Supreme Court following a corruption investigation into his family's wealth. "He is no more eligible to be an honest member of the parliament, and he ceases to be holding the office of prime minister," Judge Ejaz Afzal Khan said in court, Reuters reported. But the nuclear-armed country is now set for political uncertainty with no clear successor in place.

Why has Nawaz Sharif resigned?

Pakistan's Supreme Court ruled on Friday morning to disqualify Sharif, along with the country's finance minister Ishaq Dar, from power. Sharif also faces a corruption trial after investigators said his family could not account for its wealth. Sharif resigned shortly after the ruling. The allegations relate to the 2015 "Panama Papers," which revealed three of Sharif's children had links to offshore companies which owned properties in London, according to BBC reports.

Pakistan's Prime Minister Nawaz Sharif addresses the General Assembly at the United Nations on September 21, 2016 in New York City. Spencer Platt | Getty Images

The court's decision is a victory for the rule of law, according to Timothy Ash, emerging markets senior sovereign strategist at BlueBay Asset Management. "Politicians have been brought to account in Pakistan - can the same be said for many emerging markets, e.g. Ukraine and South Africa. On the latter we talk a lot about the strength of South African institutions, but have any major politicians been brought to account for stuff that is not dis-similar, even worse, than this?" he said in an email to CNBC. Ash said the ruling is a credit to Pakistan, even though it raises questions over the country's political stability.

Will this affect the U.S.?

The ruling will make it more difficult for the U.S. to find a solution to the war in Afghanistan, says Wali Aslam, senior lecturer in international security at the University of Bath. "High-ranking military and civilian officials in Washington have recently been reiterating the significance of Pakistan in resolving the conflict. In his recent visit to the region, Senator John McCain said, 'We will not have peace in the region without Pakistan,'" he said in a press statement. Aslam warns Pakistan's relations with the U.S., China and India could be disrupted now Sharif is gone.

Who will take over from Sharif?

Sharif has been prime minister of Pakistan three times: from 1990 to 1993; from 1997 until 1999; and since July 2013. Pakistan's prime minister is the chief executive of the country, with the power to form a cabinet, assign government ministers and control the country's nuclear weapons. Sharif's party, the Pakistan Muslim League-Nawaz (PML-N), will get to choose the next prime minister, at least until the elections in the summer of 2018, according to Daniel Salter, head of equity strategy and head of research for Eurasia at Renaissance Capital. There may be infighting within the party, he warns. "Nawaz's daughter, Mariam Nawaz Sharif, who was being groomed as potential successor was also caught up in the (corruption) case: local sources seem to assume the army may have given its support to this ruling, perhaps to prevent the Sharif dynasty becoming overly powerful," Salter said in a note.

Pakistan's Prime Minister Nawaz Sharif Christopher Furlong | Getty Image

With Sharif's daughter compromised, Salter says the most likely successors are Sardar Ayaz Sadiq, speaker of the national assembly; Shahid Khaqan Abbasi, minister of petroleum; Khurram Dastgir Khan, commerce minister; and Khawaja Muhammad Asif, defense minister. He adds that Sharif may try to guide the party from the background. The defence minister or railway minister Khawaja Saad Rafique are the most likely successors, says Asad Ali, Asia country risk analyst at IHS Markit, but he warns there's risk of a split within the party. "An official split in the PML-N ahead of the election would fracture the party's vote bank in Punjab," he told CNBC via email.

What does this mean for the economy?