The Taliban said it was responding to the army's offensive in North Waziristan, a tribal area a few hours' drive from Peshawar, notorious as a hornets' nest of militants. For several years, the army resisted going in, fearing the backlash that might ensue. Earlier offensives in the six other tribal areas had provoked revenge bombings.
The Pakistani Taliban has a sinister and cowardly calculus. It believes that if it raises the human cost of military offensives against its fighters, it may be able to force the Government to relent and bargain for peace. A Taliban spokesman explained the logic in chilling terms : "We targeted the school because the army targets our families. We want them to feel our pain."
Prime Minister Nawaz Sharif was quick to descend on Peshawar and express his resolve against the terrorists, but slow on spelling out what steps his Government would take. He has called a conference of all political parties, something that is already being dismissed as a wasteful gimmick.
The current Government and the Opposition, led by Imran Khan, have been reluctant to face the Taliban. After last year's elections, they attempted to sue for peace, but talks broke down.
This week's events should prompt political leaders to shed their petty rivalries, take the threat seriously and finally acknowledge there can be no reconciling with people who murder children.
A look at the militant group
Who are the Pakistan Taliban?
The extremist group is made up of fighters who have been based in North Waziristan, a northwestern tribal region bordering Afghanistan. They have been battling Government troops since Pakistan aligned itself with the US-led war in Afghanistan. But the Pakistani Taliban didn't officially form until 2007 as an umbrella organisation that included various factions, all aligned against the Government. In recent months, the organisation has fractured amid a Pakistani military offensive and US drone strikes that have raised tension in the ranks. Known as the Tehreek-e-Taliban Pakistan, or TTP, it is headed by Mullah Fazlullah, who claimed responsibility for trying to kill education activist Malala Yousafzai in 2012. The teenager survived the shooting and won the Nobel Peace Prize.
What are their goals?
The TTP has vowed to overthrow the Government and install a harsh form of Islamic law. The extremists are aligned with the Afghan Taliban - a group fighting US and Afghan forces in Afghanistan - as well as al-Qaeda militants who also live in the rugged northwest. They have frequently attacked Pakistani troops, government targets and civilians to help carry out their goals. Tens of thousands of people have been killed in the violence, but the school assault was one of the deadliest.
What has Pakistan's Government done to stop them?
Pakistan's military has carried out numerous operations in the tribal areas over the years, and more than 4000 soldiers have been killed, with thousands more wounded. But many Pakistanis have tired of the operations and question their effectiveness. Prime Minister Nawaz Sharif, elected in 2013 partly on a platform of promising to negotiate an end to the violence, has tried for months to talk to the militants with little result. When militants attacked the Karachi international airport in June, the violence shocked the country. The Government began an offensive in North Waziristan - the last remaining tribal area where the military had not launched an operation. Pakistan says it has killed more than 1000 militants in the operation.