The high-profile graft case is about alleged money laundering by Sharif in 1990s when he twice served as the Prime Minister to purchase assets in London. The assets surfaced when Panama papers last year showed that they were managed through offshore companies owned by Sharif's children.
A five-judge Supreme Court bench issued a landmark 540- page split judgement ordering setting up of a Joint Investigation Team comprising officials from different agencies including those from powerful spy agencies the Inter- Services Intelligence (ISI) and the Military Intelligence.
The bench comprising Justice Asif Saeed Khosa, Justice Gulzar Ahmed, Justice Ejaz Afzal Khan, Justice Azmat Saeed and Justice Ijazul Ahsan also ordered 67-year-old Sharif and his two sons - Hasan and Hussain - to appear before the JIT.
There is "insufficient evidence to remove Prime Minister Nawaz Sharif," said the verdict.
More From This Section
"A thorough investigation is required," Justice Khosa said, reading out from the highly anticipated ruling.
The JIT would be set up within a week. It will present its report before the bench after every two weeks and will complete its investigation in 60 days.
Upon receipt of the JIT report, "issues relating to the disqualification of the PM may be taken up," says the verdict.
The case filed by various petitioners - Pakistan Tehreek-i-Insaf chief Imran Khan, Jamaat-i-Islami emir Sirajul Haq and Sheikh Rashid Ahmed - sought disqualification of Prime Minister Sharif over his alleged misstatement in his address to the nation on April 5, 2016 and his speech before the National Assembly on May 16, 2016.
The case was launched on November 3 and the court held 35 hearings before concluding the proceedings on February 23.
The court also ordered that it was important to probe how money was transferred to Qatar.
Sharif had took the plea that London property was bought from the money earned after selling share in a company in Qatar and produced a letter by a Qatari prince.
The London properties owned by Sharif's children are at the center of controversy.
Sharif's supporters hailed the court's decision as a victory of justice.
"We have been vindicated as Prime Minister had last year asked to set up a probe commission to investigate Panama leaks scandal," said Khawaja Asif, defence minister and close ally of Sharif.
TV footage showed Sharif embracing his younger brother Shahbaz Sharif who is chief minister of Punjab province.
His daughter, Maryam Nawaz, tweeted a photo of Sharif, his family and PML-N leaders celebrating the verdict with smiles and embraces.
He had served as the Prime Minister from 1990 to 1993 and from 1997 to 1999. Both of Sharif's first two stints had ended in the third year of his tenure.
Opposition leader and lawyers termed the court's verdict as an indictment of Sharif and demanded his resignation.
"I demand that Sharif should resign immediately as he has lost moral authority to rule the country," Pakistan Tehreek- e-Insaf chief Khan said at a press conference here.
He said if Sharif is not ready to step down permanently, he should step aside for 60 days when JIT would probe the money laundering allegations, as ordered by the court.
Khan said the court has rejected the defence of Sharif and his family that their properties in London were bought with clean money.
Former president and Pakistan People's Party leader Asif Ali Zardari condemned the court's decision to not disqualify Sharif as premier and asked him to immediately step down.
"I condemn the judgement and ask Sharif to resign," he said at a press conference. He took a swipe at the court and said that "we never expected any justice from the court."
He expressed doubts that junior officers working under Sharif cannot deliver justice as part of Joint Investigation Team (JIT) when the highest court failed to deliver justice.
"With the decision of today, not only democracy but also justice itself have been damaged. I also says that people have been made fools through the judgement," said Zardari.
Zardari's close aide Aitzaz Ahsan said the JIT ordered by the court actually was meant to give escape to Sharif.
Earlier, the area around the Supreme Court, located in Islamabad's Red Zone, was put on 'red alert', with around 1,500 police, Rangers and Frontier Constabulary personnel deployed for security arrangements.