ISLAMABAD, Pakistan - Pakistan's Supreme Court on Thursday declared the arrest of former prime minister Imran Khan unlawful, two days after his detention sparked deadly clashes and huge protests nationwide.
Khan was ordered to remain in the bench's custody under police protection for his own safety until Friday, when he will return to the court where he was detained earlier this week.
"Your arrest was invalid so the whole process needs to be backtracked," Chief Justice Umar Ata Bandial told Khan at a hearing in the capital Islamabad.
Since being ousted from office last April, Khan has waged a tempestuous campaign for snap elections and fired unprecedented criticism at Pakistan's leaders and powerful military elite, even accusing them of plotting a November assassination attempt which saw him shot in the leg.
Meanwhile he has become tangled in a slew of legal cases -- a frequent hazard for opposition figures in Pakistan, where rights groups say courts are used to quash dissent.
The onetime cricket star, who was surrounded by dozens of paramilitary troops Tuesday and manhandled into custody on graft charges at Islamabad High Court, said he had been "treated like a terrorist".
Arrests should not take place on court premises, Bandial said Thursday.
Khan, 70, was ordered back to the same police headquarters where he has been sequestered for the past 48 hours on the condition it should be treated as a "residence".
"What we propose is that Islamabad police need to provide security, and he (Khan) will provide a list of his immediate family members and lawyers that should meet him at police lines headquarters," said Bandial, denying Khan's request to return to his farm house on the outskirts of Islamabad.
"We will arrest him again," interior minister Rana Sanaullah told Dunya TV, in a stark admission of the grudge between the administration and Khan.
"If he gets bail from the High Court tomorrow, we will wait for the cancellation of bail and arrest him again."
- Tear gas and water cannon -
Small groups of supporters danced on the streets at news the arrest was overturned. In Lahore, police fired tear gas canisters into a crowd cheering the decision.
But with dozens of cases against him, Khan "has a long way to go", analyst Imtiaz Gul told AFP.
"This is just a timely relief, probably as part of efforts to de-escalate the explosive situation and reduce tensions," he said.
"The cobweb of criminal cases seems meant to entangle and thus incapacitate him from active politics" ahead of elections due in October, he said.
On Friday, Khan will once again face the graft charges brought by the National Accountability Bureau, which ordered his arrest after saying he failed to respond to multiple court summonses.
Over the past few days several thousand supporters have rampaged through cities around the country, setting fire to buildings and blocking roads, incensed by their leader's arrest.
At least nine people have died in the unrest, police and hospitals said.
Hundreds of police officers have been injured and more than 2,000 people arrested, mostly in Punjab and Khyber Pakhtunkhwa provinces, according to authorities.
At least eight officials from PTI's central leadership accused of orchestrating the protests were also detained, Islamabad police said.
Security forces have responded with tear gas and water cannon to quell the crowds and on Thursday came equipped with batons and riot shields.
- 'To civil war' -
Khan was ousted in April 2022 in a no-confidence vote in parliament after he lost the support of Pakistan's powerful military. He now alleges they are colluding with the government to keep him out of power.
Since Wednesday, soldiers have been deployed in two provinces -- including Punjab, the most populous -- and in the capital.
The military warned of a "severe reaction" to any further attacks on state and military facilities, and said responsibility for any violence would lie with "a group that wants to push Pakistan into civil war".
The interior ministry ordered mobile internet services cut and restricted access to social media sites Twitter, Facebook and YouTube, Pakistan's communications agency said.
Authorities also closed schools nationwide -- with year-end exams cancelled.
Meanwhile Pakistan is struggling through a severe economic downturn, brought about in part by the deepening political instability of the past year, with the rupee plummeting to a record low against the dollar on Thursday.
Khan was arrested hours after the military rebuked him for repeating his allegations a senior officer was involved in a plot to assassinate him.
The army fiercely denies Khan's accusation and criticism of Pakistan's military establishment is generally considered a red line.
Pakistani politicians have frequently been arrested and jailed since the country's founding in 1947.
But few have so directly challenged a military which holds significant influence over domestic politics and foreign policy and that has staged at least three coups and ruled for more than three decades. - Sajjad Tarakzai, Zain Janjua / AFP