Story highlights Children "are dying on the frontline in the war against terror," Pakistan's defense minister says

The death toll has climbed to 145 people, included 132 children and the school's principal

Attackers gunned down students taking an exam in an auditorium, military spokesman says

Attack was on a school mostly for soldiers' children; many of the dead between 12 and 16

"'God is great,'" the Taliban militants shouted as they roared through the hallways of a school in Peshawar, Pakistan.

Then, 14-year-old student Ahmed Faraz recalled, one of them took a harsher tone.

" 'A lot of the children are under the benches,' " a Pakistani Taliban said, according to Ahmed. " 'Kill them.' "

By the time the hours-long siege at Army Public School and Degree College ended early Tuesday evening, at least 145 people -- 132 children, 10 school staff members and three soldiers -- were dead, military spokesman Gen. Asim Bajwa said. More than 100 were injured, many with gunshot wounds, according to Khyber Pakhtunkhwa province Information Minister Mushtaq Ghani.

The death toll does not include the terrorists who attacked the school, bursting into an auditorium where a large number of students were taking an exam and gunning down many of them within minutes, Bajwa said.

Photos: Photos: Taliban attack Pakistani school Photos: Photos: Taliban attack Pakistani school Taliban attack Pakistani school – Soldiers patrol the streets in Peshawar, Pakistan, near a school that was attacked by the Pakistani Taliban on Tuesday, December 16. Militants stormed the military-run school in northwest Pakistan, killing more than 140 people, most of them children. More than 100 people were injured. Hide Caption 1 of 27 Photos: Photos: Taliban attack Pakistani school Taliban attack Pakistani school – Relatives carry the body of a victim during his funeral procession. Hide Caption 2 of 27 Photos: Photos: Taliban attack Pakistani school Taliban attack Pakistani school – A victim's coffin is carried from an ambulance. Hide Caption 3 of 27 Photos: Photos: Taliban attack Pakistani school Taliban attack Pakistani school – The uncle and cousin of injured student Mohammad Baqair comfort him as he mourns the death of his mother, a teacher who was killed in the attack. Hide Caption 4 of 27 Photos: Photos: Taliban attack Pakistani school Taliban attack Pakistani school – A man comforts a student who survived the attack. Hide Caption 5 of 27 Photos: Photos: Taliban attack Pakistani school Taliban attack Pakistani school – Parents escort their children away from the school. Hide Caption 6 of 27 Photos: Photos: Taliban attack Pakistani school Taliban attack Pakistani school – A wounded student receives treatment at a Peshawar hospital. Hide Caption 7 of 27 Photos: Photos: Taliban attack Pakistani school Taliban attack Pakistani school – Pakistani soldiers hold positions close to the school. All the militants in the attack were eventually killed, a police official said. Hide Caption 8 of 27 Photos: Photos: Taliban attack Pakistani school Taliban attack Pakistani school – Pakistani soldiers take position near the site of the attack. Hide Caption 9 of 27 Photos: Photos: Taliban attack Pakistani school Taliban attack Pakistani school – A student is wheeled into a hospital in Peshawar. Hide Caption 10 of 27 Photos: Photos: Taliban attack Pakistani school Taliban attack Pakistani school – A man and woman rush to a Peshawar hospital treating victims of the attack. Hide Caption 11 of 27 Photos: Photos: Taliban attack Pakistani school Taliban attack Pakistani school – Family members wait outside the school. Hide Caption 12 of 27 Photos: Photos: Taliban attack Pakistani school Taliban attack Pakistani school – People gather at a hospital where victims were being treated. Hide Caption 13 of 27 Photos: Photos: Taliban attack Pakistani school Taliban attack Pakistani school – Pakistani soldiers position themselves at a fence near the besieged school. Hide Caption 14 of 27 Photos: Photos: Taliban attack Pakistani school Taliban attack Pakistani school – A Pakistani soldier clears the area outside the school. Hide Caption 15 of 27 Photos: Photos: Taliban attack Pakistani school Taliban attack Pakistani school – An injured student lies in bed at a Peshawar hospital after the attack. Hide Caption 16 of 27 Photos: Photos: Taliban attack Pakistani school Taliban attack Pakistani school – A hospital security guard helps an injured student at the school. Hide Caption 17 of 27 Photos: Photos: Taliban attack Pakistani school Taliban attack Pakistani school – Parents leave with their children near the site of the attack. Hide Caption 18 of 27 Photos: Photos: Taliban attack Pakistani school Taliban attack Pakistani school – A plainclothes officer escorts rescued students away from the school. Hide Caption 19 of 27 Photos: Photos: Taliban attack Pakistani school Taliban attack Pakistani school – Pakistani troops reach the site of the attack. Hide Caption 20 of 27 Photos: Photos: Taliban attack Pakistani school Taliban attack Pakistani school – Volunteers carry a student at a hospital in Peshawar. Hide Caption 21 of 27 Photos: Photos: Taliban attack Pakistani school Taliban attack Pakistani school – An injured girl gets rushed to a hospital in Peshawar. Hide Caption 22 of 27 Photos: Photos: Taliban attack Pakistani school Taliban attack Pakistani school – A man comforts a student standing at the bedside of an injured boy. Hide Caption 23 of 27 Photos: Photos: Taliban attack Pakistani school Taliban attack Pakistani school – A Pakistani soldier takes position on a bunker close to the besieged school. Hide Caption 24 of 27 Photos: Photos: Taliban attack Pakistani school Taliban attack Pakistani school – Relatives of a student killed in the attack mourn over the student's body. Hide Caption 25 of 27 Photos: Photos: Taliban attack Pakistani school Taliban attack Pakistani school – Hospital staff transport an injured student in Peshawar. Hide Caption 26 of 27 Photos: Photos: Taliban attack Pakistani school Taliban attack Pakistani school – The body of a victim lies at a hospital in Peshawar. Hide Caption 27 of 27

Map: Peshawar, Pakistan

JUST WATCHED Students thought Taliban attack was drill Replay More Videos ... MUST WATCH Students thought Taliban attack was drill 02:23

"They started shooting indiscriminately," Bajwa said, "and that's where maximum damage was caused."

Pakistani Taliban spokesman Mohammed Khurrassani said the militants scaled the school's walls around 10 a.m. (midnight ET), intent on killing older students there.

The Taliban had "300 to 400 people ... under their custody" at one point, said Khurrassani, whose group is called Tehreek e Taliban Pakistan, or TTP. But Bajwa said there was no hostage situation, as the attackers' focus was shooting to kill rather than taking captives.

They were eventually met by Pakistani troops who pushed through the complex building by building, room by room. By 4 p.m., they'd confined the attackers to four buildings. A few hours later, all the militants -- seven of them, according to Bajwa -- were dead.

Pakistani authorities spent Tuesday night inside the school in Peshawar, a city about 120 kilometers (75 miles) from the country's capital, Islamabad, looking for survivors, victims and improvised explosive devices planted to worsen the carnage.

JUST WATCHED World leaders condemn Pakistan attack Replay More Videos ... MUST WATCH World leaders condemn Pakistan attack 01:38

As they searched, they discovered that the school's principal was among the terrorists' victims.

The attack drew sharp condemnation from top Pakistani officials, who vowed that the country wouldn't stop its war against the Taliban.

"We are undeterred. ... We will not back off," Defense Minister Khawaja Asif told CNN.

But he said the ambush at the school is another example of how great his nation's sacrifices have been in fighting that's raged for more than a decade.

"Even the children are dying on the frontline in the war against terror," he said. "The smaller the coffin, the heavier it is to carry. ... It's a very, very tragic day."

Minister: Most of the dead were 12 to 16 years old

On a typical day, the Army Public School and Degree College is home to about 1,100 students and staff, most of them sons and daughters of army personnel from around Peshawar, though others attend as well.

Their nightmare began in late morning, when a car exploded behind the school. Pakistani education minister Muhammad Baligh Ur Rehman explained to CNN that the blast was a ruse, meant to divert the attention of the school's security guards.

It worked.

Gunmen got over the walls and walked through where students in grades 8, 9 and 10 have classes and fired randomly, said Dr. Aamir Bilal of Peshawar's Lady Reading Hospital, citing students. They came in with enough ammunition and other supplies to last for days and were not expecting to come out alive, according to a Pakistani military official.

Seventh-grader Mohammad Bilal said he was sitting outside his classroom taking a math test when the gunfire erupted. He fell into bushes before running to the school's gates to safety.

Ahmed, the 14-year-old student, remembered being in the school's auditorium when four or five people burst in through a back door "and started rapidly firing." After getting shot in his left shoulder, the ninth-grader lay under a bench.

JUST WATCHED Malala: Taliban school attack 'senseless' Replay More Videos ... MUST WATCH Malala: Taliban school attack 'senseless' 01:26

JUST WATCHED Pakistan takes on Taliban militants Replay More Videos ... MUST WATCH Pakistan takes on Taliban militants 02:04

"My shoulder was peeking out of the bench, and somebody was following," Ahmed recalled. "They went into another room, (and when) I ran to the exit, I fell."

Bajwa told reporters that Pakistani security forces reached the school 15 minutes after the attack began.

They found, he said, "the children ... drenched in blood, with their bodies on top of each other."

Most of those killed were between the ages of 12 and 16, said Pervez Khattak, chief minister of Khyber Pakhtunkhwa province, of which Peshawar is the capital. But some adults in the school also were targets, like a 28-year-old office assistant who was shot and then burned alive, police official Faisal Shehzad said.

Violent past

Pakistan has seen plenty of violence, much of it involving militants based in provinces such as South Waziristan, North Waziristan and the Khyber Agency -- all restive regions in northwest Pakistan near Peshawar along its border with Afghanistan.

It is the home base of the TTP, an organization that has sought to force its conservative version of Islam in Pakistan. The group has battled Pakistani troops and, on a number of occasions, attacked civilians as well.

Peshawar, an ancient city of more than 3 million people tucked right up against the Khyber Pass, has often found itself in the center of it all. Militants repeatedly targeted the city in response to Pakistani military offensives, like a 2009 truck bombing of a popular marketplace frequented by women and children that killed more than 100 people.

And the Taliban hasn't hesitated to go after schoolchildren. Their most notable target is Malala Yousafzai, who was singled out and shot on October 9, 2012 as she rode to school in a van with other girls. The teenage girl survived and, last week, became the youngest recipient of the Nobel Peace Prize for her efforts to promote education and girls' rights in Pakistan and beyond.

Yousafzai was "heartbroken by this (latest) senseless and cold blooded act of terror in Peshawar," saying Tuesday that "innocent children in their school have no place in horror such as this."

"I call upon the international community, leaders in Pakistan, all political parties -- everyone -- (to) stand up together and fight against terrorism," the 16-year-old added in another statement. "And we should make sure that every child gets a safe and quality education."

Taliban: Revenge for killing of tribesmen

Still, even by Pakistan and the Taliban's gruesome standards, Tuesday's attack may be the most abominable yet.

This is the deadliest incident inside Pakistan since October 2007, when about 139 Pakistanis died and more than 250 others were wounded in an attack near a procession for exiled former Pakistani Prime Minister Benazir Bhutto, according to the University of Maryland's Global Terrorism Database

Even the Taliban in Afghanistan, with which the TTP is closely affiliated, criticized the "deliberate killing of innocent people, women and children (as being) against Islamic principles" and expressed condolences to the attack's victims, according to spokesman Zabiullah Mujahid.

It comes after peace talks between the Pakistan Taliban and Pakistan's government as recently as last spring. The government released 19 Taliban noncombatants in a goodwill gesture, in fact.

But talks broke down under a wave of attacks by the Taliban and mounting political pressure to bring the violence under control.

In September 2013, choir members and children attending Sunday school were among 81 people killed in a suicide bombing at the Protestant All Saints Church of Pakistan. A splinter group of the Pakistan Taliban claimed responsibility, blaming the U.S. program of drone strikes in tribal areas of the country.

And for the past few months, the Pakistani military has been conducting a ground offensive to clear out militants, spurring violence that's displaced tens of thousands of people and sparked deadly retaliations.

Khurrassani, the Pakistan Taliban spokesman, told CNN that the latest attack was revenge for the killing of hundreds of innocent tribesmen during repeated army operations in provinces including South Waziristan, North Waziristan and the Khyber Agency.

The TTP spokesman challenged that ordinary citizens were targeted, saying that five army vehicles are routinely stationed at the school.

"We are facing such heavy nights in routine," Khurrassani said, rationalizing the siege shortly before it ended. "Today, you must face the heavy night."