The day before a major protest was planned against Prime Minister Nawaz Sharif, Pakistan’s
The decision came seven months after the leaked documents from a Panamanian law firm appeared to show that three of Sharif's children had companies in the British Virgin Islands through which they owned properties in London's exclusive Hyde Park neighborhood.
Sharif was not named in the documents, but questions about his family's finances have weakened his beleaguered government and sparked plans for an anti-government demonstration on Wednesday in Islamabad.
Ahead of the gathering, Pakistani police arrested more than 1,000 supporters of Imran Khan, the protest leader and head of the Pakistan Tehreek-e-Insaf party, and sprayed tear gas and rubber bullets at demonstrators as they attempted to march toward the capital.
Following the Supreme Court announcement, Khan called off the protest and said he would hold a celebratory gathering instead at Islamabad's main parade ground.
"Go home and rest," Khan told his supporters. "You have to return to Islamabad tomorrow to celebrate thanksgiving."
A leading member of Sharif's government, Defense Minister Khawaja Asif, told reporters, "Now that the judiciary has taken up the matter, there is no logic in agitation in the streets."
Khan's party and other opposition groups have filed court petitions demanding an investigation into the corruption allegations against Sharif and his family. Sharif, who denies wrongdoing, has also backed the establishment of a commission that he says will clear his name.
The Supreme Court ordered Khan's party and the government to submit their comments on the formation of the commission and scheduled a hearing for Thursday.
Chief Justice Anwar Zaheer Jamali asked both parties during the hearing to "show restraint" because the Panama Papers controversy threatened to undermine Pakistan's stability.
"We have to save the country from unrest and crises," Jamali said.
Sharif's daughter, Maryam Safdar, was triumphant about the cancelation of the protest, tweeting: "Another assault on the country comes to naught. I hope against hope that those beating a hasty retreat will learn from the embarrassment."
Safdar, the heir to the Sharif family's political party, was named in the Panama Papers leaks as beneficial owner of two offshore companies that in turn owned apartments in London. The leaked documents came from a Panamanian law firm, Mossack Fonseca, that purportedly helped hundreds of clients hide their wealth using offshore bank accounts and shell companies.
While owning property or other assets overseas is legal in Pakistan, the documents raised questions about whether the Sharif family – and other prominent Pakistanis named in the leaks – were using the undisclosed accounts to evade taxes or launder money.
The Sharifs are among Pakistan's richest families, owning a range of companies from steel to sugar mills, and have often been accused of corruption and money laundering. The family has denied wrongdoing and called the allegations politically motivated.
Sharif has been under pressure not just from political opponents but also from the powerful military, which has reportedly clashed with the government over the handling of a simmering border dispute with rival India.
On Tuesday, India and Pakistan each accused the other of violating the ceasefire along their disputed border in the Kashmir territory. Pakistan said six civilians were killed in "unprovoked" firing by Indian soldiers stationed along the Line of Control, as the border is known, while India said Pakistani shelling had killed seven civilians.
Sharif, who is due to face reelection in 2019, has rejected calls for his resignation, and analysts predicted the appointment of a commission would reduce the pressure on him. Such panels have generally operated slowly in Pakistan.
"This is win-win situation for the prime minister," said Farooq Faisal Khan, a political analyst in Islamabad. "He was under immense pressure from different quarters…but the 'lockdown' of the capital would have meant he was unable to govern the country.
"The crisis is averted, though a tough time is still ahead for him."
Imran Khan, a former cricket star, had repeatedly pledged to bring 1 million people into the streets and "lock down" Islamabad. The government responded by banning gatherings of more than four people in the capital and the nearby city of Rawalpindi, the military headquarters.
Hundreds of people were arrested under the assembly law, a colonial-era provision known as Section 144 that human rights groups say violates free expression.
"There is no justification for this repressive crackdown," Amnesty International said in a statement. "Pakistan's constitution guarantees people the rights to freedom of assembly, expression and movement. The authorities should immediately and unconditionally release all the people arrested solely for exercising their rights and allow them to protest peacefully."
Follow @SBengali on Twitter for more news from South Asia