Pakistan's Supreme Court on Friday granted former Prime Minister Imran Khan bail in a case related to a leak of state secrets, but he remains in jail on other charges.

Khan - detained since August - alleges the powerful military is colluding with dynastic parties that have long dominated Pakistan to crush his political party and prevent him from standing for office.

"The case has completely collapsed, and Imran Khan and Shah Mahmood Qureshi have finally been granted bail," lawyer Salman Safdar told reporters outside court, referring to Khans former foreign minister who is being held in the same case.

The Supreme Court in its short order said "there are not reasonable grounds for believing" that an offence under the colonial-era Official Secrets Act, which carries a possible 14-year prison term or death sentence, was committed by Khan.

"There are sufficient grounds for further inquiry into their guilt of said offence, which is to be finally decided by the learned trial court," the top court said.

Khan remains incarcerated over numerous separate corruption cases. He has faced several charges since he was ousted from office in April 2022. (QNA)