<a href="https://www.thenationalnews.com/world/asia/2023/05/10/imran-khan-court-arrest-pakistan/" target="_blank">Pakistan's</a> top court has said the anti-corruption agency's arrest of former prime minister Imran Khan was illegal. Mr Khan was dragged from the Islamabad High Court on Tuesday during a hearing on another matter, and a court later ruled he could be detained for eight days. But on Thursday the arrest was ruled illegal by the Supreme Court and his immediate release ordered. Footage from outside the court showed Mr Khan leaving in a blue shirt and sunglasses before climing into a black Mercedes. He will remain in the custody of the court under supervision of the police until another scheduled court appearance on Friday. "Your arrest was invalid so the whole process needs to be backtracked," Chief Justice Umar Ata Bandial told Mr Khan at the hearing in the capital Islamabad. "What we propose is that Islamabad police need to provide security, and he (Mr Khan) will provide a list of his immediate family members and lawyers that should meet him at police lines headquarters," said Judge Bandial. He added that the headquarters, where Khan was taken into custody following his arrest, should instead be treated as a "residence". Mr Bandial denied Mr Khan's request to return to his farm house on the outskirts of Islamabad. "The court has ordered that he will remain in the custody of the Supreme Court of Pakistan and that he can meet and consult his friends and lawyers during his stay there," Khan's lawyer, Babar Awan, told reporters. The former cricketer apologised to the Supreme Court for the disruption caused by widespread <a href="https://www.thenationalnews.com/world/2023/05/10/imran-khan-protests-pakistan/" target="_blank">protests</a> against his detention, and said party members and supporters would remain peaceful from now. He said he had been struck with sticks when being arrested by the National Accountability Bureau on Tuesday, a claim not responded to by security forces. Demonstrations against his arrest have so far killed 10 people. Senior leaders from <a href="https://www.thenationalnews.com/world/asia/2023/05/10/imran-khan-protests-raise-fear-of-return-to-martial-law/" target="_blank">Mr Khan's</a> party were also arrested overnight as the government called in the military to end widespread protests. Authorities arrested Shah Mahmood Qureshi, a former foreign minister and vice chairman of the <a href="https://www.thenationalnews.com/world/asia/2023/05/09/imran-khans-party-fears-his-life-is-in-danger-after-shock-arrest/">Pakistan Tehreek-e-Insaf</a> party, early on Thursday, he said on Twitter. Two other senior PTI leaders, Asad Umar and Fawad Chaudhry, were arrested on Wednesday, the latter from outside the Supreme Court minutes after he spoke to reporters. Tensions remained high in the nuclear-armed nation with paramilitary troops and police on the streets in major cities on Thursday. Mobile data services remained suspended and<a href="https://www.thenationalnews.com/world/asia/2023/05/11/imran-khans-arrest-unlawful-pakistan-top-court-rules/" target="_blank"> schools</a> and offices were closed in two of Pakistan's four provinces. Islamabad police said on early on Thursday that troops had reached the capital city. Protesters have stormed military buildings, ransacked the residence of a top army general in the eastern city of Lahore and set state buildings on fire since Mr Khan's arrest. At least five people have died in the violence that has further destabilised the South Asian country of 220 million people as it grapples with a severe economic crisis, eroding hopes of the quick resumption of an International Monetary Fund bailout. “Such a spectacle has never been witnessed in the last 75 years,” Prime Minister Shehbaz Sharif said. “People were made hostages in their vehicles, patients were taken out of the ambulances and later, those vehicles were torched”. “There is a very real propaganda campaign against PTI, attempting to position us as violent creators of terror,” Mr Qureshi said on Twitter. “The nation must continue with peaceful protests wherever they can”. The corruption cases against Mr Khan are two of more than 100 cases registered against him since his removal from power in April last year after losing a confidence vote. Mr Khan faces being barred from holding public office if convicted, with a national election scheduled for November. He had not slowed his campaign against losing power despite being wounded in a November attack on his convoy as he led a protest march to Islamabad calling for a snap general election.