Former Pakistan prime minister Imran Khan was granted bail Friday in a case alleging he leaked state secrets, lawyers said, but he remained jailed on other charges ahead of an election due in February.

Meanwhile his Pakistan Tehreek-e-Insaf (PTI) party was barred from using the cricket bat symbol on ballot papers, depriving them a vital campaign tool in a nation where adult literacy rates lag.

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

The 71-year-old former elite cricketer has been pummelled by a barrage of legal cases since being ousted in April 2022 after falling out with the top brass, and has twice been jailed.

“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 Khan’s former foreign minister held over the same case.

Prosecutors allege the pair mishandled a diplomatic cable sent by Pakistan’s ambassador to the United States.

The top court said “there are not reasonable grounds for believing” 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 judgement said.

PTI said Khan remains incarcerated over numerous separate graft cases, with scant chance he will leave prison to contest elections due February 8.

“The prospect of him obtaining relief in the near future appears to be very slim,” party lawyer Khalid Yousaf Chaudry told AFP.

Symbolic defeat

Khan rose to fame in cricket-crazed Pakistan captaining the nation to victory against England in the 1992 ODI World Cup final, using the triumph to springboard his political career and found PTI.

PTI has long used the cricket bat as a symbol, and in a nation where the adult literacy rate is just 58 percent, according to World Bank data, icons are vital to identify parties on ballot papers.

But late Friday the electoral commission said PTI was “declared ineligible to obtain the election symbol for which they have applied” because they failed to hold internal party polls obeying their constitution.

A PTI lawyer said they would challenge the decision, which comes just seven weeks before polling day.

Nonetheless PTI submitted Khan’s nomination papers in his home town, despite the electoral commission disqualifying him from contesting over a graft conviction earlier this year.

Other candidates will be able to challenge his nomination on the basis of his disqualification.

The fate of politicians in Pakistan has historically ridden on their relationship to the military establishment, which has directly ruled the country on several occasions.

Hugely popular Khan rose to power in 2018 with the backing of the army. But when he was ousted by a parliamentary no-confidence vote he claimed generals had conspired with Washington to end his term.

He publicly touted diplomatic documents as supposed evidence for his claims.

In the months after he was ousted, Khan was able to draw vast crowds at rallies, where he waged an unprecedented campaign of defiance against the military.

He was briefly arrested for the first time in May sparking days of deadly unrest resulting in a huge crackdown on PTI which saw most senior figures defect, be arrested or driven underground.