The death toll in Tuesday's massacre at a school in northwest Pakistan has reached 141, most of them children, USA Today reported.

Taliban assailants stormed the Army Public School in Peshawar city, which teaches grades 1 through 10, on Tuesday morning and began shooting at random. Students at the school less than 100 miles from Islamabad were in the middle of their day when a car exploded out back.

"The security got their attention diverted (and) somehow they managed (to get) inside," Muhammad Baligh Ur Rehman, Pakistan's education minister, told CNN.

One survivor, student Abdullah Jamal, said he and some other students were receiving training in first-aid when the attack was launched.

"Then I saw children falling down who were crying and screaming. I also fell down. I learned later that I have got a bullet," Jamal, who was shot in the leg, told the Associated Press. "All the children had bullet wounds. All the children were bleeding."

The attack ended when Army commanders arrived and open fired on the gunmen. All seven militants were killed.   

Pakistani army General Asim Bajwa said 132 children and nine staff members were killed, USA Today reported. Another 121 students and staff were injured.

The Taliban said the attack on the school, operated by Pakistan's military, was in retaliation for Pakistani authorities killing its members, a spokesman from the extremist group said according to USA Today. Most of the 1,100 students who attend the school are the children of army personnel.

Pakistani officials, peace activists and heads of state around the world condemned the massacre carried out by an Islamist extremist group with a history of deadly assaults on children and military troops.

"Our hearts and prayers go out to the victims, their families and loved ones," said U.S. President Barack Obama, USA Today reported. "By targeting students and teachers in this heinous attack, terrorists have once again shown their depravity. We stand with the people of Pakistan."

Pakistani Nobel Peace Prize winner Malala Yousafzai, who two years ago was shot by the Taliban for supporting girls education, said she was "heartbroken" by the violence in Peshawar.

"Innocent children in their school have no place in horror such as this," the 16-year-old said according to USA Today.

"I, along with millions of others around the world, mourn these children, my brothers and sisters- but we will never be defeated."