Pakistan’s former prime minister Imran Khan has left a high court in Islamabad after being granted broad protection from arrest in multiple legal cases against him.
The ruling struck a blow to the government in a stand-off that has sparked days of rioting by Khan’s followers and raised the spectre of widespread unrest in the country.
After the court granted him bail, Khan spent hours more in the building as he and his legal team were locked in apparent negotiations over his exit from the site.
He was to head to his home in the eastern city of Lahore, Pakistan’s second largest city, according to his lawyers.
Clashes between his supporters and police have periodically erupted outside the building.
Khan and his lawyers were also working to ensure the rulings were fully documented, trying to close off any legal loopholes that could allow his arrest again later.
In the evening, shots were heard in the area of the courthouse.
Police were investigating who opened fire, the interior minister said.
Khan was expected to head later to his residence in Lahore, Pakistan’s second largest city, officials in his party said.
The long list of around 100 court cases, on charges ranging from fomenting violence to corruption, still stands against Khan.
After he was abruptly arrested on Tuesday, widescale protests erupted, turning into clashes with police and mob attacks on government buildings and even military installations.
The court’s ruling was a victory for Khan, and averted any new arrest for the time being.
The Islamabad High Court gave him protection for two weeks on one graft charge and protection until Monday on a host of other charges in a measure called “anticipatory bail”.
The protections in each case can be extended, but it was not immediately clear if that meant a new court hearing on Monday.
The charismatic 70-year-old, a former cricket star-turned-Islamist politician, has a broad base of support around Pakistan, presenting himself as an outsider victimised by the military and the political dynasties that have long run Pakistan.
He was removed as prime minister in April last year in a vote of no confidence by parliament.
Interior minister Rana Sanaullah Khan, who is not related to the former prime minister, told the independent GEO television that the government will respect the court order.
He said he could not say whether another attempt would be made to arrest Khan in the coming days but said all those involved in violence will “not be spared” prosecution.
When asked by reporters in the court building whether he could be arrested despite the rulings, Khan replied: “So who will control my people if I am arrested?”
He said he had not been aware of the violence that followed his arrest until Thursday.
Friday’s broad rulings were unusual, fuelling government complaints that the judiciary was biased in favour of the former prime minister.
“This is judicial activism and politicising of the judiciary,” legal expert Arfan Qadir told The Associated Press, calling the rulings unprecedented.
The stand-off threatens to open a deeper vein of turmoil in a country that has seen multiple military takeovers and bouts of violence.
The unrest has echoed what followed the 2007 assassination of former prime minister Benazir Bhutto during an election rally.
Her supporters at the time, outraged by her killing, rampaged for days across Pakistan.
It was not clear what prompted Tuesday’s initial arrest of Khan, who has been free despite the multiple cases against him since he was ousted from office.
Whatever the reason, it was startlingly heavy-handed: agents from the National Accountability Bureau burst into the Islamabad High Court where Khan was attending a session on other charges – the same court where he appeared on Friday – and dragged him away, putting him into an armoured vehicle.
The response from his followers was swift.
Protesters clashed with police, burned vehicles and looted shops in various parts of the country.
The violence left at least 10 Khan supporters dead.
Dozens of protesters and more than 200 police officers were injured.
The government responded with a crackdown, arresting nearly 3,000 people.
During Friday’s court hearing, Khan supporters set fire to a police vehicle nearby when security forces would not let them approach the building.
On Thursday, the Supreme Court ruled that Khan’s arrest was unlawful and asked the Islamabad High Court to review its own previous decision allowing the arrest.
In the meantime, Khan was released from custody and spent the night under security forces’ protection in a government rest house.
Fazalur Rehman, the head of the ruling coalition parties, said its supporters would stage a sit-in on Monday outside the Supreme Court, which ruled on Thursday that Khan’s arrest was illegal.
Speaking earlier at a special cabinet meeting on Friday, Prime Minister Shahbaz Sharif said there was a “genuine corruption case” against Khan, “but the judiciary has become a stone wall protecting him”.
The various cases against Khan include allegations that he incited violence and threatened police and government officials.
A new terrorism charge was filed against him on Thursday for allegedly inciting his followers to violence after his arrest.
He also faces at least three graft cases, including accusations from the National Accountability Bureau that he accepted millions of dollars worth of property in exchange for providing benefits to a real estate tycoon.