A five-judge bench, comprising Justice Asif Saeed Khosa, Justice Gulzar Ahmed, Justice Ejaz Afzal Khan, Justice Azmat Saeed and Justice Ijazul Ahsan, issued an order for the formation of Joint Investigation Team (JIT) to probe the Sharif family's involvement in corruption as stated in the Panama leaks.
The team has two months to complete its inquiry, after which a special bench will decide what action to take, the court said in a ruling that opens with the epigraph from Mario Puzo's novel "The Godfather": "Behind every great fortune there is a crime". At least the prime minister's children admitted that they own property overseas.
Government supporters could be seen celebrating the judgement with candies outside the court in Islamabad, where around 1,500 police commandos and riot forces had been deployed ahead of the highly anticipated decision.
According to the judgement, Sharif, 67, survived as majority three judges supported the setting up of JIT to further probe the allegations while two other judges wanted to disqualify the Prime Minister.
Pakistan, a Muslim-majority nuclear-armed state has been ruled by its powerful military for much of its history after independence in 1947 and its politicians have long faced accusations of corruption which often resulted into their detentions and ousting from power. Sharif and his family have denied any wrongdoing.
"We are ready for all kinds of investigation", Defence Minister Khawaja Asif told reporters outside the court.
The high court launched an investigation into the offshore wealth of Sharif's family late past year after The Panama Papers linked them to offshore businesses. The investigative unit should submit its report within 60 days, he said.
Pakistan's supreme court has given a verdict that there is less evidence against the prime minister.
Sharif's ruling PML-N party insists the wealth was acquired legally through family businesses in Pakistan and the Gulf.
There is "insufficient evidence to remove Prime Minister Nawaz Sharif", said the verdict. Sources say this verdict is a takeover of Sharif by the army. Sharif says he established a steel mill overseas while he was exiled to Saudi Arabia by former military ruler Pervez Musharraf, who seized power in a coup in 1999.
He had served as the Prime Minister from 1990 to 1993 and from 1997 to 1999.
The appetite for street protests has subsided, in part because four months of demonstrations won Khan little in terms of political change. Till then, the case will continue to dominate Pakistan's domestic politics as the general elections are due next year.