By Asif Shahzad and Ariba Shahid
ISLAMABAD (Reuters) -A Pakistani court ordered former Prime Minister Imran Khan's release on bail for two weeks, his lawyer said on Friday, after his arrest in a land fraud case ignited deadly protests and a tussle with the military.
Khan departed the court premises, headed towards his hometown Lahore, amidst high security. He had remained inside for hours after being granted bail, saying he was not being allowed to leave by security officials.
The arrest, which the Supreme Court ruled "invalid and unlawful" a day earlier, has fuelled instability in the nation of 220 million at a time of economic crisis, with record inflation, anaemic growth and delayed IMF funding.
Khan welcomed the court's order and said the judiciary was Pakistan's only protection against the "law of the jungle".
"I must say I expected this from our judiciary, because the only hope now left – the only thin line between a banana republic and a democracy is the judiciary," he told journalists inside the court premises.
Khan added, in answer to questions, that he did not believe the country's security agencies were against him, but he suggested that the position of army chief was all-powerful.
"One man in this country decides whatever and it happens, it's one man. It's not the security agencies, it's one man – the army chief," he said, without naming him.
The army's public relations wing did not immediately respond to a Reuters request for comment.
Khan's critics once accused him of being manoeuvred into power in 2018 by the powerful military - a charge both sides denied. But he later fell out with the generals, accusing them of plotting his removal last year. He has since been a vocal critic of current army chief General Asim Munir.
Khan, 70, is a cricket hero-turned-politician who was ousted as prime minister in April 2022 in a parliamentary no-confidence vote and who is Pakistan's most popular leader according to opinion polls.
Pakistan's telecommunication regulator told Reuters it was restoring mobile broadband across the country. The service was shut down on Tuesday night on the orders of the interior ministry for security reasons after violent protests began following Khan's arrest.
The regulator also said it was removing restrictions on access to social media platforms, including YouTube, Twitter and Facebook, which had also been disrupted since Tuesday.
The shut down resulted in a loss of economic productivity and digital services, including digital payments.
The former premier entered court earlier on Friday wearing dark glasses and a sky blue shalwar kameez - the loose shirt and trousers popular in Pakistan - and a dark waistcoat, surrounded by lawyers and security forces, TV footage showed.
He was seen in footage waving at cameras and making a victory sign with his fingers as he walked into court. Meanwhile his supporters clashed with police elsewhere in the capital, where a police van was set ablaze, broadcaster Geo TV reported.
After the court order was announced, Interior Minister Rana Sanaullah said security forces had been instructred to abide by it.
Many cities in Pakistan saw violent protests following his arrest by the anti-graft agency on Tuesday. Khan denies any wrongdoing.
His supporters have stormed military establishments, set ablaze a state broadcaster building, smashed buses, ransacked a top army official's house and attacked other assets, leading to nearly 2,000 arrests and the army being deployed.
"The Islamabad High Court has given a two-week bail and also ordered the (anti-graft body) not to arrest Imran Khan during this period," another of Khan's lawyers, Faisal Chaudhry, told Reuters.
At least eight people have been killed in the violence that has worsened the country's instability and doused hopes of resumption of a crucial International Monetary Fund bailout.
The army, which remains Pakistan's most powerful institution, having ruled it directly for close to half its 75-year history through three coups, has warned against further attacks on its assets and has called the violence "pre-planned".
The military has historically intervened citing economic or political instability in the country. However, despite widespread fears about another intervention amidst months of tumult, the military said it stood by the democratic process.
"The army's senior leadership, the chief of army staff places its complete trust in democracy; there is no question of martial law," chief military spokesman Major-General Ahmed Sharif Chaudhry told Geo TV.
(Reporting by Asif Shahzad, Ariba Shahid; Writing by Shivam Patel; Editing by Alex Richardson and Alistair Bell)