A judicial probe into the 2014 massacre of 132 schoolchildren in Pakistan's northwestern city of Peshawar blamed the tragedy on inadequate school security and local support for the terrorists, declassified parts of the investigation report revealed Friday.

The 525-page report, authored by Peshawar High Court judge Mohammad Ibrahim Khan and dated June 26, 2020, was partially declassified on the instructions of the Supreme Court, which had set up a judicial commission to probe the attack that also left 13 teachers and other adults dead.

Nine heavily armed terrorists stormed the school compound at around 10 a.m. on Dec. 16, 2014, by climbing over the school's back wall.

Shooting and flinging grenades, they forced their way to the auditorium where a large number of students had assembled for first aid training and were most of the casualties occurred.

Photo taken Dec. 18, 2014, shows a military-run school in Peshawar, Pakistan, where more than 140 people, mostly students, were killed in an attack by Pakistani Taliban gunmen on Dec. 16. (Kyodo)

The rampage at the school with nearly 1,100 students had continued for about eight hours. Many of the students and teachers killed in the attack were lined up and shot in the head. Others were gunned down while trying to hide.

The attack, one of the worst in Pakistan's history, was claimed by the Pakistani Taliban as revenge for the military's operations in North Waziristan, which was then a rebel-held territory. Most of the students at school, situated in a military complex in Peshawar, came from families of troops.

Photo taken Jan. 10, 2015, shows an army-run school in Peshawar, Pakistan, at which 150 people, including 134 students, were killed in a deadly attack by militants the previous month. Schools and other educational institutions opened across Pakistan on Jan. 12, 28 days after the attack. (Kyodo)

About 132 witnesses, including 31 police and army officials testified before the judicial commission, which also examined previous investigations by police and other security agencies.

"The assistance provided to the fanatics from the inhabitants of the locality...is unpardonable," the judge wrote in the report.

He further noted that one of the two mobile patrols deployed at the school, because of a general threat alert regarding educational institutions run by the military, was first tricked by the terrorists into leaving its position by setting a vehicle on fire.

This, it said, exposed the backside of the premises allowing the terrorists to enter the school from there unchallenged.

The judge said there were inadequate guards at the school, and even those deployed were improperly stationed with more focus on the front of the compound. This, he said, compromised the security on the rear side.

"Equally incomprehensible is the inertia on part of (the guards) to the initial heavy firing and blasts by the terrorists," the judge observed in his report. "Had they shown a little response and engaged the militants at the very beginning, the impact of the incident might have been lesser."

He noted that the mobile patrol was later punished for its negligence after being found guilty through a court of inquiry. But he did not elaborate what punishment was given to its members.

The incident prompted the then government to set up military courts for trial of terrorists and end a then six-year-long moratorium on capital punishment.

One such court later sentenced six of the attackers to death, while another received a life sentence. Five of the convicts have so far been executed. Two others have been on the run.