Pakistan’s former Prime Minister Imran Khan will remain in a high-security prison for at least another two weeks despite being granted bail the previous day, as an anti-terrorism court extended his detention Wednesday in a case involving the revealing of an official secret document, a defense lawyer said.

The anti-terrorism court announced the decision after a brief closed-door hearing that was held at a high-security Attock prison in the eastern Punjab province, lawyer Intazar Hussain Panjutha said.

The next court hearing will be on Sept. 2, he said.

PAKISTANI COURT SUSPENDS FORMER PRIME MINISTER IMRAN KHAN’S CONVICTION, SENTENCING

Khan's other lawyer, Salman Safdar, told reporters that he is petitioning a court to seek bail for Khan in the latest case. He said he is challenging Khan's imprisonment and jail trial as "it is illogical and unconstitutional."

The latest development was a blow to Khan and his legal team, which expected his release after a court in the capital, Islamabad, suspended the corruption conviction and three-year prison term of the former premier. Tuesday's ruling by the Islamabad High Court, which also granted bail, was a major legal victory for Khan. He has been held in prison since Aug. 5, when he was arrested after his conviction and sentencing by another court.

prison officer

An officer observes an area at a checkpoint on a road leading to a jail in Attock, Pakistan, on Aug. 30, 2023. A court asked an official in charge of the prison to detain former Prime Minister Khan until Wednesday at the earliest. (AP Photo/Anjum Naveed)

Khan has been embroiled in more than 150 cases since his ouster through a no-confidence vote in Parliament in April 2022.

One of the key cases against him was registered by the Federal Investigation Agency earlier in August on charges of "exposing an official secret document," which Khan had waved at a political rally in Islamabad after his removal. In his televised speeches, Khan repeatedly described the document as proof of a threat to him from the United States.

IMPRISONED FORMER PAKISTANI PM IMRAN KHAN PLANS TO CHALLENGE GRAFT CASE

The document, dubbed Cipher, has not been made public by the government but apparently contained diplomatic correspondence between the Pakistani ambassador to Washington and the Ministry of Foreign Affairs in Islamabad.

Before his arrest, Khan publicly said his removal was a conspiracy by the United States, his successor Shehbaz Sharif, and the Pakistani military — accusations that they all deny. Sharif stepped down July 28 after the parliament’s term ended.

CLICK HERE TO GET THE FOX NEWS APP

Khan’s continued detention will give an edge to his political rivals ahead of the vote to be held later in the year. Pakistan’s election oversight body said that elections must be delayed for at least three to four months because it needs more time to redraw constituencies to reflect the recently held census. It is widely believed that the vote will be delayed until February.

However, until then, caretaker Prime Minister Anwaar-ul-Haq Kakar is running the day-to-day affairs.