In a rare rebuke to Pakistan's powerful military, the top court on Wednesday prohibited them from engaging in political activities and directed spy agencies like the ISI to operate within the law.
Delivering a landmark verdict on the 2017 Faizabad sit-in by the hardline Tehreek-e-Labbaik Pakistan (TLP) and other smaller groups, a two-member Supreme Court bench also ordered the government to act against those propagating "hatred, extremism and terrorism".
"We direct the federal and provincial governments to monitor those advocating hate, extremism and terrorism and prosecute the perpetrators in accordance with the law," the bench comprising Justice Qazi Faez Isa and Justice Mushir Alam ruled.
The court directed all government agencies and departments, including those run by the army like spy agency Inter-Services Intelligence (ISI) to operate within the limits defined by the law.
The bench ordered that members of the Armed Forces were prohibited from engaging in any kind of political activity, which includes supporting a party, faction or individual.
"The government of Pakistan through the Ministry of Defence and the respective Chiefs of the Army, the Navy and the Air Force are directed to initiate action against the personnel under their command who are found to have violated their oath," the court said.
Several experts were of the view that Prime Minister Imran Khan was supported by the country's powerful army in the last year's general election.
Pakistan's powerful military has ruled the country through various coups for nearly half of the country's history since independence in 1947. The military plays an important role in the country's decision making.
The apex court also outlawed religious edicts called fatwas that aimed to harm others.
"A person issuing an edict or fatwa, which harms another or puts another in harm's way, must be criminally prosecuted under the Pakistan Penal Code, the Anti-Terrorism Act, 1997 and/or the Prevention of Electronic Crimes Act, 2016," the court ruled.
The court upheld that subject to reasonable restrictions imposed by law, citizens have the right to form and to be members of political parties. They can also assemble for peaceful protest.
It said the right to assemble and protest is circumscribed only to the extent that it infringes on the fundamental rights of others, including their right to free movement and to hold and enjoy property.
The court ordered that those protesters who obstruct people's right to use roads and damage or destroy property must be proceeded against in accordance with the law and held accountable.
It initiated suo motu proceedings on November 21, 2017 after TLP blocked a main highway leading to Islamabad.
During the 20-day long protest in 2017, daily life in Islamabad was disrupted when protesters belonging to the TLP, Tehreek-i-Labbaik Ya Rasool Allah, the Tehreek-i-Khatm-i-Nabuwwat and the Pakistan Sunni Tehreek occupied the Faizabad Interchange which connects Rawalpindi and Islamabad, the busiest roads in the twin cities.