Pakistan Army chief General Qamar Javed Bajwa on Thursday got a six-month conditional extension from the Supreme Court, ending an unprecedented legal wrangle that shook the government of Prime Minister Imran Khan and pitted the powerful military against the judiciary.
Chief Justice Asif Saeed Khosa, who headed a three-member bench, announced the landmark verdict after getting an assurance from the government that Parliament will pass a legislation on the extension/reappointment of an Army chief within six months.
"The current appointment of General Qamar Javed Bajwa as Chief of the Army Staff shall be subject to the said legislation and shall continue for a period of six months from today, whereafter the new legislation shall determine his tenure and other terms and conditions of service," the bench said in its short order.
It pointed out that in the three days of court proceedings, the government kept changing its stance, interchangeably 'referring to it as reappointment, limiting of retirement or extension of tenure'.
The verdict was announced after the government submitted a 'new summary' to extend the service of 59-year-old Gen Bajwa.
The ruling comes in the nick of time as he was set to retire at midnight Thursday.
A much-relieved Prime Minister Khan lauded the apex court after the ruling even as he took a jibe at the country's 'external enemies' and the 'mafias within'.
Khan had extended Gen Bajwa's tenure through a notification on August 19, but the apex court suspended it on Tuesday, citing irregularities in the manner the army chief, a close confidant of the prime minister, was granted an extension.
'Today must be a great disappointment to those who expected the country to be destabilised by a clash of institutions,' Khan tweeted.
'That this did not happen must be of special disappointment to our external enemies & mafias within,' Khan said, without identifying them.
Delivering the verdict, Chief Justice Khosa directed the government to bring necessary legislation within six months.
He said the court observed 'judicial restraint' and left the matter to the Parliament.
"We have reviewed several laws including Army Act 1952 and Rule 1954 before announcing the judgment," he said.
The bench had concluded the case in the morning after three consecutive days of hearing but reserved the judgment.
It had directed to the government to present a new 'summary' for extension in the service of Gen Bajwa.
The bench had also directed that the summary should not mention any time period for which the service of army chief would be extended.
Earlier, when the hearing restarted, Attorney General Anwar Mansoor Khan told the court that government made a fresh appointment of Gen Bajwa as army chief under article 243 of the Constitution.
However, the court questioned how the fresh appointment was different from the previous appointment and the government's legal team failed to satisfy the court.
The bench asked the government to produce the documents related to the extension and pension of former Army chief Gen Ashfaq Pervaiz Kayani and those related to the retirement of his successor General Raheel Sharif.
As the documents were not readily available, the court suspended the proceedings for 15 minutes. When the hearing resumed the relevant document were presented.
But even those papers failed to answer the basic question that under which law the government was giving extension to the Army chief for three years.
It turned out that there was no law on the issue of extension and reappointment of a sitting Army chief for three years.
Khosa asked if the government was ready to formulate laws in specific period.
Attorney General Khan said the government can enact laws in three months. It prompted the court to offer that it can grant extension for three months to the army chief.
However, lawyer of the Army chief, Farogh Naeem who resigned from his post as law minister on Tuesday to pursue the case, said the government would make laws within six months.
Khosa finally ordered that the government should come up with the new summary to appoint an Army chief and after seeing it the court would issue its verdict. He ordered that the salary and other perks of the army chief should also be mentioned in it.
Some interesting exchanges took place during the hearing as Chief Justice Khosa said that judges were termed as 'agents of India' and 'agents of CIA' for questioning laws related to the extension of the Army chief.
He said that it was also alleged that the top court proceedings were part of 'fifth generation warfare' against Pakistan.
The top judge said that the objective of the court was to streamline the procedure for the key appointment.
The case started unfolding on Tuesday when the court suspended the government notification of August 19, granting a three-year extension to Gen Bajwa.
The court said the notification was not valid on technical and legal grounds.
The government then withdrew the August 19 order after the apex court observations and issued a fresh notification which was also rejected by the court on Wednesday.
The unprecedented action by the apex court shook the high echelons of power as the Imran Khan government scrambled to control the damage.
The powerful military, which has ruled Pakistan for more than half of its 70 plus years of existence, has wielded considerable power in deciding matters concerning security and foreign policies.
When Bajwa was appointed Army chief by former prime minister Nawaz Sharif, he superseded three generals.