The 141 people were killed when insurgents stormed an army-run school in the northwestern city of Peshawar on Tuesday and systematically went from room to room, shooting children during an eight-hour killing spree.
The attack, claimed by the Tehreek-e-Taliban Pakistan (TTP) as revenge for a major military offensive in the region, sparked condemnation worldwide and led the Pakistani government and military to reaffirm their determination to defeat a group that has killed thousands since it began its insurgency in 2007.
Teenage survivor Shahrukh Khan, who ducked below his desk with classmates when four gunmen burst into their room, described how he played dead after being shot in both legs, stuffing his tie into his mouth to stifle his screams.
"I saw a pair of big black boots coming towards me, this guy was probably hunting for students hiding beneath the benches," the 16-year-old told AFP from the trauma ward of the city's Lady Reading Hospital.
"The man with big boots kept on looking for students and pumping bullets into their bodies. I lay as still as I could and closed my eyes, waiting to get shot again," he said.
"My body was shivering. I saw death so close and I will never forget the black boots approaching me -- I felt as though it was death that was approaching me."
Prime Minister Nawaz Sharif announced three days of national mourning and described the attack as a "national tragedy unleashed by savages".
"These were my children. This is my loss. This is the nation's loss," said Sharif, who was later due to host a meeting of all parliamentary parties in Peshawar.
Nobel peace laureate Malala Yousafzai, herself shot by the Taliban in 2012, said she was "heartbroken" by "the senseless and cold-blooded" killings. US President Barack Obama condemned the attack as "heinous" and said America would stand by Pakistan in its struggle against violent extremism.
Leaders in Europe echoed the condemnation. Australian Prime Minister Tony Abbott offered his own sympathy to Pakistan, as his government deals with the fallout from a cafe siege by a deranged Islamist gunman.
Narendra Modi, the prime minister of Pakistan's neighbour and bitter rival India, said he had called Sharif to offer condolences.
"Told PM Sharif we are ready to provide all assistance during this hour of grief," Modi tweeted.
'Indiscriminate firing'
Chief military spokesman General Asim Bajwa that 125 people had been wounded in the assault. The death toll exceeded the 139 killed in blasts targeting former prime minister Benazir Bhutto in Karachi in 2007.
There were around 500 students in the school when the attack started, and Bajwa said the attackers, equipped with ammunition and food to last "days", only wanted to kill.
"The terrorists started indiscriminate firing as they entered the auditorium so they had no intention of taking any hostages," he told reporters.
A senior security official told AFP authorities were investigating the nationality of the attackers since some were speaking in Arabic.
Funerals of many of the victims had taken place by Tuesday evening, with the rest to follow Wednesday.
Relatives attend the funeral of a school boy who was killed during an attack by Taliban gunmen at a school, in Peshawar, Pakistan, 16 December 2014. - EPA/ARSHAD ARBAB
The Lady Reading Hospital was thronged with distraught parents weeping uncontrollably as children's bodies arrived, their school uniforms drenched in blood.
Irshadah Bibi, 40, whose 12-year-old son was among the dead, beat her face in grief, throwing herself against an ambulance.
"O God, why did you snatch away my son? What is the sin of my child and all these children?" she wept.
'Soft target'
The school on Peshawar's Warsak Road is part of the Army Public Schools and Colleges System, which runs schools nationwide. Its students range in age from around 10 to 18.
Tuesday's attack was shocking even by the standards of Pakistan, which has suffered thousands of deaths in bomb and gun attacks since the TTP rose up in 2007.
TTP spokesman Muhammad Khorasani said Tuesday's assault was carried out to avenge Taliban fighters and their families killed in the army's offensive against militant strongholds in North Waziristan.
"We are doing this because we want them to feel the pain of how terrible it is when your loved ones are killed," he said.
"We are taking this step so that their families should mourn as ours are mourning."
The military has hailed the offensive as a major success in disrupting the TTP's insurgency.
More than 1,600 militants have been killed since the launch of operation Zarb-e-Azb in June, according to data compiled by AFP from military statements.
"The militants know they won't be able to strike at the heart of the military, they don't have the capacity. So they are going for soft targets," Talat Masood, a retired general and security analyst, told AFP.