The terrorist attack in the north-western city of Peshawar has ended, with all the attackers killed -- a total of seven militants, reports the BBC.

The army-run school, which is near a Peshawar military complex, has suffered some of the worst violence during the Taliban insurgency.

The militants were able to dodge the school's tight security because some were wearing Pakistani military uniforms, according to witnesses. They reportedly scaled walls of the school to get inside where they detonated a bomb at the start of the attack.

Children who escaped said that after the initial bomb blast militants went from one classroom to another shooting randomly.

Shahrukh Khan, 17, told the BBC from his hospital bed that a gunman had entered his classroom and started shooting. He hid beneath a desk, watching his friends and two teachers being killed.

All seven of the attackers wore suicide bomb vests, according to military spokesman Asim Bajwa.

Countless people were also injured in the assault.

Pakistan has long been accused by other countries for treating terrorists as strategic assets. When the country's army chief, General Raheel Sharif, started an indiscriminate operation earlier this year against the Haqqani network, Punjabi Taliban, Pakistani Taliban, al-Qaeda and affiliates, the political response was less than enthusiastic.

The brutal attack on the school in Peshawar may well change the response of Pakistan's political leaders toward militant groups going forward.

Late Tuesday, military spokesman Asim Bajwa said 132 children and nine staff members had been killed, according to the BBC.

"We selected the army's school for the attack because the government is targeting our families and females," Taliban spokesman Muhammad Umar Khorasani told Reuters. "We want them to feel the pain."

Hundreds of Taliban fighters are believed to have been killed in recent army operations in North Waziristan and tribal areas. The Pakistani Taliban have vowed to step up attacks in response.