Pakistan's former Prime Minister Imran Khan alleged Friday that the powerful military was behind his short-lived arrest on graft charges, saying that violent nationwide protests sparked by the unlawful action had killed 40 people.

Khan, 70, was dragged outside of a courtroom and shoved into an armored vehicle by paramilitary troops on Tuesday as he waited to attend a hearing in the capital, Islamabad. An anti-graft court swiftly indicted him the next morning, while another remanded him into custody for eight days on separate corruption charges.

But the Supreme Court on Thursday declared the arrest as "invalid and unlawful," ordering Khan to be immediately released. It also directed the federal court to urgently reconvene the proceedings to ensure Khan's right of access to justice.

The cricket star-turned-popular prime minister's dramatic arrest sparked swift countrywide protests by supporters of his opposition Pakistan Tehreek-e-Insaf, or PTI party, leading to deadly clashes with riot police.

On Friday, Khan appeared before the high court and secured two weeks' bail in the case he was arrested in. The judges also granted him bail in several other challenges against him.

Khan departed the judicial complex for his hometown Lahore amid tight security. In a video statement on the way back, he said he had remained inside the courtroom for several hours after being granted bail, claiming police authorities were deliberately blocking his departure. An Islamabad police spokesman said in a statement while responding to the allegations that they were under instructions from the Supreme Court to ensure “foolproof” security for the former prime minister, and he blamed a lack of cooperation from Khan for the delay.

In the run-up to the hearing, he spoke to Western media inside the courtroom and claimed that at least 40 people were killed in violent protests that followed his arrest. Khan directly accused Pakistan's incumbent military chief, General Asim Munir, of being behind his arrest and "maligning" the army institution through his actions.

Khan praised the Pakistani judiciary for asserting its independence under the circumstances.

"The only thin line between a banana republic and democracy is that judiciary. That's our only hope now. Otherwise, there is no rule of law here. It is a complete law of the jungle, might is right. … One man in this country decides whatever and that happens," he said.

"I was abducted from inside the high court [building]. This happens when there is the law of the jungle and the army abducts [people]," Khan said. "Where did the police go? Where did the law go? It seems as if martial law has been declared here."

Witnesses and local media have reported that at least 10 protesters were killed in clashes with police, while more than 300 were injured since the violence erupted on Tuesday.

Authorities began restoring internet services late Friday as protests subsided. Access to information had been severely impacted because of the complete media blackout of the PTI-led protests on dozens of local news channels.

There was no immediate reaction from the government or the military in response to the allegations from Khan, who was removed from office in a parliamentary vote of no-confidence last year. Khan has since faced dozens of charges, ranging from alleged terrorism and corruption to treason and other criminal offenses.

The PTI chief rejects all the allegations as politically motivated and a bid to block him from staging a comeback to power through impartial elections.

Prime Minister Shehbaz Sharif, addressing a Cabinet meeting in Islamabad Friday, criticized the judicial decisions that relieved the opposition leader, citing attacks on state institutions by his supporters.

Meanwhile, an ongoing police clampdown on the PTI has arrested most of the central leadership of the country's largest political party and at least 2,500 of Khan supporters. Police have defended their actions, alleging the detainees were involved in rioting and assault on state property.

Khan's supporters, including men and women, directed their rage mainly at the powerful military, which the PTI chief has persistently accused of orchestrating his ouster from office in April 2022 and later instituting "baseless and frivolous" court cases against him to get him disqualified from politics.

Protesters also gathered outside the general headquarters in the city of Rawalpindi, adjacent to Islamabad. Some kicked the main gate to the highly secured military facility, an unprecedented sight in the history of the nuclear-armed country of about 230 million people. PTI supporters also stormed and ransacked the residence of a regional military chief in Lahore, the capital of Pakistan's most populous province.

The violence and Khan's release are seen as a victory for his party and a setback for Prime Minister Sharif's embattled coalition government, particularly for the powerful military establishment.

On Wednesday, the army issued a strongly worded statement backing Sharif's assertions that the PTI had turned into a group of "miscreants" and condemning the attacks on military installations.

"These developments are a blow for the military, but I doubt it will be deterred by the court's decision," said Michael Kugelman, the director of the South Asia Institute at the Wilson Center.

"There are other options it can pursue - another arrest on different charges, disqualification. I am not inclined to think it will waste much time," Kugelman told VOA. He added that ideally, the civilian and military leadership could use Khan's release to ease the political tensions so the government can focus its attention on the worsening economic crisis facing Pakistan.

"But sadly, I feel that's not in the cards. The vendetta is just too strong."

Khan was removed from office in a parliamentary no-confidence vote in April of last year, a move he rejected as illegal and planned by the now-retired chief of the Pakistani military, General Qamar Javed Bajwa.

The ousted leader has since organized massive public rallies to press Sharif to announce snap elections in the country, demands the government has rejected.

The Pakistani military has a long history of direct and indirect political intervention, with political parties and independent analysts blaming the institution for the fragility of the country's democracy.

Military chiefs have staged four coups and arrested politically popular prime ministers on trumped-up treason and other criminal charges, ruling Pakistan for nearly half its 75 years.

Khan was taken into custody on Tuesday hours after he renewed his allegations in a video message that a senior general within the Pakistani military spy agency, the Inter-Services Intelligence or ISI, was plotting to kill him.

In late November, the ousted prime minister was injured in an assassination attempt while leading an anti-government protest march near Lahore, Punjab's capital, to push for fresh elections.

The attack killed one person, while Khan sustained bullet wounds in his legs. He accused Major-General Faisal Naseer, the ISI's director general of counterintelligence, of being one of the planners of the November assassination attempt.

Government and military officials reject the charges and insist that the assassination attempt was the work of a lone gunman, who is now in custody and confessed in a video controversially leaked to the media.

In his video message on Tuesday, Khan reiterated that three shooters were involved in the attack. He added that despite him being a former prime minister and leader of Pakistan's "most popular" political party, the military had blocked his attempts to seek an impartial investigation into the incident.

"This person tried to kill me twice and whenever there would be an investigation, I would prove that the said person was behind it. He has many accomplices with him," Khan said, naming Naseer for the first time. "No investigation occurred because no one could dare to follow as they (military leaders) are holy cows above the law."

Source: Voice of America