ISLAMABAD - A Pakistani court on Tuesday declared the jail trial of former Prime Minister Imran Khan on charges of leaking state secrets illegal, his lawyer said.

A special court has been conducting the trial in jail citing security concerns since Khan was indicted on the charges last month.

"Islamabad High Court has declared illegal the notification for jail trial," said Naeem Panjutha, the lawyer, in a post on social media platform X.

Khan's legal team had challenged the law ministry notification that ordered the jail trial.

The charges against Khan relate to a classified cable sent to Islamabad by Pakistan's ambassador in the United States last year, which Khan is accused of making public.

Former cricket hero Khan, who was forced from office in 2022 after losing a no-confidence vote in parliament, has had dozens of legal cases filed against him, which he has denounced as an effort to keep him out of politics.

He has been convicted in one graft case and sentenced to three years in jail. The sentence was suspended but he remains in prison in connection with other cases.

(Reporting by Asif Shahzad, editing by Ed Osmond and Nick Macfie)