The Pakistani Supreme Court ruled on Thursday to grant a temporary extension to army chief General Qamar Javed Bajwa.
"We leave this matter to parliament to make law regarding this," Chief Justice Asif Saeed Khosa said.
Following the court's ruling, the government submitted an undertaking saying that the parliament would pass legislation within six months on the extension of the term.
The country's Prime Minister Imran Khan has turned to Twitter to comment on the court's decision.
The cabinet of Pakistan's Prime Minister Imran Khan has twice approved a three-year extension for the general, citing a worsening national security situation in the region over its rivalry with India.
In its Tuesday ruling, however, the Supreme Court suspended the decision to extend the term, citing a series of irregularities and ordering the government and the army to produce legal provisions and detailed arguments on the move.
A Pakistani army chief usually serves for three years, while only one general's term has been extended since the position was established in 1972.