Islamabad - Pakistan's top court ordered the prime minister be investigated for corruption on Thursday, in a highly anticipated decision that granted Nawaz Sharif a temporary reprieve as judges said there was insufficient evidence to oust him from power.
Sharif and his children had been accused of graft in an ongoing case that had threatened to topple the prime minister and captivated Pakistan after the Panama Papers leak last year linked the family to offshore business.
The Supreme Court issued a split ruling calling for a joint investigation team of anti-corruption officials along with the powerful Inter-Services Intelligence (ISI) and Military Intelligence to probe the claims.
"A thorough investigation is required," Justice Asif Saeed Khosa told the court, announcing the decision.
Two of the five judges went further, branding Sharif "dishonest" and saying he should be disqualified, but they were outnumbered.
The court has disqualified leaders before, holding former prime minister Yousuf Raza Gilani in contempt in 2012 for refusing to re-open corruption investigations into then president Asif Ali Zardari, resulting in his disqualification.
"We respect the court verdict... It will be implemented in all its spirit," government Railways Minister Khawaja Saad Rafique said immediately after the verdict.
Around 1 500 police commandos and riot forces had been deployed around the court in Islamabad ahead of the highly anticipated decision.
Dozens of baton-wielding police were also seen along some roads leading into the capital.
The controversy could mean turmoil for Sharif's governing party ahead of general elections that must be held by the end of next year, and as security and the economy improve in the militancy-plagued country.
It erupted with the publication of 11.5 million secret documents from Panamanian law firm Mossack Fonseca last year which documented the offshore dealings of many of the world's rich and powerful.
Among the global elite implicated were three of Sharif's four children - his daughter and presumptive political heir Maryam, and his sons Hasan and Hussein.
At the heart of the matter is the legitimacy of the funds used by the Sharif family to purchase several high-end London properties via offshore companies.
Sharif's ruling PML-N party insists the wealth was acquired legally through family businesses in Pakistan and the Gulf.
But lawyers for Pakistani cricketer-turned-politician Imran Khan, leader of the Pakistan Tehreek-i-Insaf (PTI) party, argue the paper trail for the funds is non-existent, and say the onus is on Sharif to prove his relatives did not engage in money laundering.
"The nation is expecting some sort of judgement which will change the course of history in Pakistan," senior Supreme Court lawyer S.M. Zafar told AFP prior to the ruling.
Regardless of the outcome, he said, the case was important for Pakistan, which ranked a lowly 116th out of 176 countries in a corruption index released by Transparency International in January.
Political analyst Rasul Buksh Rais said: "It's going to be (a) historic decision that will push Pakistan into electoral mood in either case".
"Whether the court convicts him or not today it spells trouble and the prime minister will be weakened," added Herald newspaper editor Badar Alam.
The controversy is the latest to hit Sharif, an industrialist serving his third term as prime minister after the first two were interrupted by interventions from the country's powerful military.
Late Wednesday he detailed his party's infrastructure achievements in televised comments at the inauguration of a power plant, without mentioning the looming verdict.
Pakistan, which marks its 70th anniversary of independence later this year, has seen a surge in optimism in recent months.
Security has dramatically improved in the last two years, overall confidence in the economy is growing, and the military, which has ruled the country for more than half its history, appears to have reached an accommodation with Sharif's civilian government.