Pakistan's top judge has ordered the first official investigation into the country's deadliest terror attack, a massacre at a school that killed more than 150 people in 2014, authorities said Thursday.

Relatives of the victims -- mainly children -- have long called for an accounting of the security and intelligence failures that allowed Pakistani Taliban gunmen to storm the school, run by the powerful military, in the northwestern city of Peshawar on December 16 that year.

No government or military official has ever been held to account for the security failings. Criticism of Pakistan's powerful armed forces, especially their counter-insurgency operations, is largely seen as a red line in the country.

Supreme Court Chief Justice Mian Saqib Nisar ordered the formation of a judicial commission to examine the attack during a court hearing in Peshawar Wednesday, Abdul Latif Yousafzai, advocate general of Khyber Pakhtunkhwa province, told AFP.

The inquiry was set to be completed in two months, he added.

No official explanation of the timing was given. But the announcement comes after the newly formed Pashtun Protection Movement (PTM) civil rights group has made the issue a central demand in recent months, putting renewed pressure on the government.

PTM is set to hold a massive rally in the sprawling port city of Karachi on Sunday, which is home to millions of ethnic Pashtuns and expected to draw thousands of supporters.

Following the announcement, families of the victims cheered the decision, with some moved to tears.

Ajun Khan, who lost his only son in the attack, told AFP he hopes the commission can uncover who was responsible for the negligence that allowed the militants to execute the hours-long bloodbath.

‘We want the commission to probe the incident and place a responsibility for the negligence and failure of the state to protect our children,’ Khan said.

The investigation comes after a dramatic improvement in security across the country following several successful military offensives targeting extremist strongholds.

The alleged mastermind behind the school attack was killed in a drone strike in 2017, according to the Pakistani Taliban, who have claimed responsibility for it.

The Pakistani state has also said it has hanged at least four men involved in the attack, though the nature of their role has not been made public.