Pakistan’s top court on Thursday allowed the government to grant a six-month extension to the country’s army chief, wrapping up the marathon hearing of a case that gripped the nation, courts records and local media reported.

In a short order, a three-judge bench of the Supreme Court led by Chief Justice Asif Saeed Khosa delivered the judgment, ordering the government to pass legislation in order to clarify laws pertaining to extension or reappointment of an army chief, in the six months.

Read more: Pakistan court allows 6-month extension to army chief