With multiple cases against him still pending, the ruling does not exclude Khan being rearrested on different charges, something his supporters fear authorities may do in the coming hours.
Khan supporters followed the proceedings near the court on Friday, chanting slogans calling for their leader’s release and at times clashing with security forces.
In a ruling that surprised observers on Thursday, Pakistan’s Supreme Court had judged the circumstances of Khan’s arrest to have been unlawful. The judges ordered Khan to be placed under court protection overnight, but limited access to him to 10 visitors.
Khan has denied all accusations against him and his supporters say the charges are fabricated, as the government worries about his party’s strength ahead of elections that are expected to take place later this year. Khan’s party has outperformed in regional votes over the past months, leaving government officials worried that his party could again come to power.
In a televised address, Prime Minister Shehbaz Sharif compared violent protesters to “terrorists” this week, saying they had committed “unforgivable crimes.” The violence has constituted some of the worst political tensions since 2007, when former prime minister Benazir Bhutto was assassinated while campaigning.
The tensions had threatened to spiral out of control after Pakistan called in the military to directly confront protesters on Wednesday, deploying it in the capital city of Islamabad and several provinces. Since clashes began, dozens of people were injured, several were killed and hundreds were arrested, including several key members of Khan’s party.
Protesters’ anger is directed against the military to an extent that has rarely been seen in Pakistan. As prime minister, Khan was widely perceived as having the military’s support, but tensions mounted after his ouster by Parliament. Khan accused the prime minister, interior minister and an intelligence officer of having been behind an assassination attempt he narrowly survived in November, and he has doubled down on those accusations in recent days.