By Asif Shahzad and Syed Raza Hassan
ISLAMABAD (Reuters) - Pakistan's Supreme Court disqualified Prime Minister Nawaz Sharif from office on Friday over undeclared assets, plunging the nuclear-armed South Asian nation into political turmoil after a period of relative stability.
Sharif swiftly resigned, but a member of his outgoing cabinet implied that elements of the powerful military had a hand in his ouster.
Pakistan was left with no government leader after Friday's verdict, which also ordered a criminal probe into the Sharif family over allegations stemming from the "Panama Papers" leaks of international offshore companies.
Sharif's ruling Pakistan Muslim League-Nawaz (PML-N) party, which holds a solid majority in parliament, is expected to name a new prime minister to hold office until elections due next year.
Among possible allies to replace Sharif in the short term are members of his outgoing cabinet including Defence Minister Asif Khawaja, Planning Minister Ahsan Iqbal and Petroleum Minister Shahid Abbasi.
Sharif's influential brother Shahbaz was also rumored as a candidate, though legally that would require him to step down as governor of Punjab parliament and win a by-election for an open parliamentary seat, which would take at least 45 days.
Whoever replaces Sharif will have to tackle Pakistan's worsening ties with the United States, frayed relations with India, and persistent attacks by Islamist militants including the Pakistani Taliban and Islamic State. The economy is benefiting from vast investment from China, but economists are concerned about falling currency reserves and dwindling exports.
The ouster of Sharif, 67, who has now had three separate stints as prime minister, raises questions about Pakistan's fragile democracy. No prime minister has completed a full term since independence from British colonial rule in 1947.
The court verdict marks a major political victory for opposition leader Imran Khan, a former cricket star who last year threatened mass street protests unless Sharif's wealth was investigated.
Khan pounced on the leaking of the Panama Papers, which revealed Sharif's family had bought expensive London apartments through offshore companies.
"Today is a victory day for Pakistan," said Khan. "Today onward, big thieves will be caught."
Khan is himself under a Supreme Court investigation on allegations he failed to declare sources of income, a charge he denies.
Sharif has not spoken in public since the court ruling, but his railways minister, Khawaja Saad Rafiq, implied that the elements of the military were in some way involved.
"We know very well what the crime of Nawaz Sharif and the Muslim League is. What do we ask for? We ask for civilian supremacy in Pakistan," Rafiq told a news briefing.
Questioned further, however, Rafiq would not name the military as a whole.
"We have already said that no institution of Pakistan is involved any conspiracy ... We have said that Imran Khan is the central pawn of conspiracy. We have repeatedly said that in Pakistan people are available for this conspiracy."
Sharif's two previous stints in power were also cut short, including by a military coup in 1999, but he returned from exile to win a resounding victory in general elections in 2013.
Pakistan's military has denied any involvement in the legal case and did not respond to requests for official comment on Friday. Khan's party has said the ruling party often blames the military to deflect from its own failings.
The Supreme Court's five-member panel ruled unanimously that Sharif should be disqualified, enacting little-used Article 62 of the constitution which allows dismissal of any lawmaker found to be dishonest.
The court's decision follows a two-month probe by a Supreme Court-appointed panel that alleged the Sharif family could not account for its vast 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.
The written court decision cited Sharif's failure to declare monthly income, equal to $2,722, from a Dubai-based company his son owned in disclosure papers filed for the 2013 elections his party won.
Sharif's legal advisers say he never actually received the salary. They argued on Friday that the court had overstepped its remit, saying that no charge of corruption or abuse of authority has been proved in a criminal trial.
"Those who are happy and dancing will cry tomorrow," said Abid Sher Ali, a junior minister.
"They have stabbed democracy in the back."
After the court ruling, supporters of Khan's PTI opposition party gathered outside, shouting: "Go, Nawaz, Go," and jeered politicians from Sharif's party.
Political turmoil could unnerve foreign investors, who are already reticent to invest in Pakistan, deterred by security fears and a tough business climate.
The benchmark stock index tumbled 3.4 percent after the announcement but then regained some ground.
The index, which was one of the world's best performing in 2016, recorded major outflows during the two-month investigation into Sharif. The rupee currency, which is part of a managed float, has largely been stable.
"DEMOCRACY A TARGET"
Sharif has always denied any wrongdoing and has called the investigation into him biased and inaccurate.
The Supreme Court ruled in April there was insufficient evidence to remove Sharif from office - by a 3-2 verdict - but it ordered a probe by an investigative panel that included members of the military intelligence agencies.
The Joint Investigation Team (JIT) this month returned its findings in a 254-report that said Sharif's family assets do not match their earnings. The panel also accused his children, including daughter Maryam, of signing forged documents to obscure ownership of the London flats.
The Supreme Court's decision to include two members of the country's military intelligence agencies as part of the six-person JIT team fueled rumors Pakistan's powerful generals had a hidden hand in the probe against Sharif. The military, however, has distanced itself from the proceedings.
Analysts expect Sharif to push for one of his allies to form a government until elections are held next year, when his brother Shahbaz, who is the chief minister in Punjab province, may take over the party leadership.
Sharif's daughter Maryam, who will now face a criminal investigation, tweeted photos of top PML-N figures and said the party remains united.
"Today will pave the way for Nawaz Sharif's resounding victory in 2018. He will be unstoppable. Insha'Allah," she tweeted.
(Reporting by Asif Shahzad; Writing by Drazen Jorgic and Kay Johnson.; Editing by Nick Macfie and Richard Balmforth)