The fatalities included 132 students and nine school employees, the Military's Director of Public Information General Asim Bajwa told a press conference.

More than 900 people were inside the compound at the start of the assault, Bajwa said, adding that the attackers never planned to take hostages and were simply out to kill as many people as possible.

At least 122 students and nine of the soldiers, who retook the school from the insurgents, were wounded.

Taliban attack in pics

Seven Taliban fighters dressed in army uniforms entered the school through a back door shortly before midday, Police Spokesperson Seid Wali said.

The attackers hurled grenades and fired burst of gunfire as they went from classroom to classroom, Wali added.

One of the students, a 14-year-old boy, told the media that two men burst into his classroom and began shooting indiscriminately.

The Pakistani army launched an operation to liberate the school, which serves grades 1-10, but progress was slow as the troops had to contend with explosives planted inside by the attackers.

Soldiers eliminated the last of the insurgents by 6:20 pm, authorities said. Television stations broadcast scenes of chaos around the school and the sounds of explosions and gunfire were clearly audible in the background.

After securing the school, the military embarked on a anti-insurgent sweep across Peshawar and the surrounding province of Khyber Pakhtunkhwa.

Pakistan's main Taliban group, known as the TTP, claimed responsibility for the attack and said it was in reprisal for the what the militants claimed was the targeting of their families by the military.

A counterinsurgency operation six months ago in the Khyber and North Waziristan areas left more than 1,100 insurgents dead, according to Pakistani army.

Prime Minister Nawaz Sharif called the assault on the school "a national crisis", declared three days of mourning and convened a meeting on Wednesday in Peshawar with leaders of all parties represented in the Pakistani Parliament.

US President Barack Obama condemned the attack, as did Prime Minister Narendra Modi and Afghanistan's Ashraf Ghani.

Malala Yousafzai, the Pakistani girl who was shot by the Taliban in 2012 for her outspoken advocacy on behalf of girls' education and went on to share this year's Nobel Peace Prize, said she was "heartbroken by this senseless and coldblooded act of terror in Peshawar."

Latest News from World News Desk