Former Pakistan prime minister Imran Khan was granted bail on 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.
Khan's party's deputy leader, former Foreign Minister Shah Mahmood Qureshi, was also granted bail.
The former prime minister was sentenced in the summer to three years in prison over graft charges. The sentence was suspended, but he remained in jail since August due to other charges against him, including the official Secrets Act case.
"The case has completely collapsed, and Imran Khan and Shah Mahmood Qureshi have finally been granted bail," lawyer Salman Safdar told reporters outside court.
It is not yet clear whether Friday's bail decision would allow Khan to leave detention. Salman Safdar, one of his lawyers, told the Reuters news agency it the former prime minister has multiple arrest warrants issued against him in several other cases.
Khan's Pakistan Tehreek-e-Insaf (PTI) party said he would remain in jail due to separate corruption charges and that there was little chance he would be able to take part in elections set for February 8.
Khan's trial relates to a classified cable that Pakistan's ambassador in Washington sent to Islamabad early last year. Khan is accused of making the cable public. Khan denies the accusation. He says the cable's contents appeared in the media from other sources.