At least 141 people were killed and 121 injured Tuesday when Taliban gunmen attacked a military-run school in Peshawar, Pakistan. 132 of the dead were children, Pakistan military spokesman Asim Bajwa said.

Bajwa announced that the siege had ended, and that all 7 attackers had been killed, after an eight-hour gun battle between the Taliban fighters and Pakistani security forces.

Most of students killed were between 12 to 16 years old, said the chief minister of the Khyber Pakhtunkhwa province, Pervez Khattak. In all, about 500 pupils and teachers were believed to be inside the Army Public School and Degree College when uniformed militants stormed the building Tuesday morning, according to Reuters.

As distraught parents watched from behind a security cordon, students were held hostage inside the school for grades 1 through 10 in the northwest part of the country.

Explosions and gunfire were heard from the school hours after Taliban attackers first entered.

"My son was in uniform in the morning. He is in a casket now," one grieving father, Tahir Ali, cried out as he came to collect his 14-year-old son's body from the hospital. "My son was my dream. My dream has been killed."

"We were in the examination hall when all of sudden firing started and our teachers told us to silently lay on the floor," one student inside the school at the time of the attack told a private television channel. "We remained on the floor for an hour. There was a lot of gunfire. When the gunfire died down our soldiers came and guided us out."

“I saw six or seven people walking class-to-class and opening fire on children,” Mudassar Abbas, a lab assistant at the school, told The Express Tribune.

Traumatized children who were lucky enough to escape alive recalled the bloodshed. "While we were being moved out, we saw bodies of our classmates lying in the corridors," one student told DawnNews.

Shahrukh Khan, 16, was shot in both legs while hiding under a desk as the attackers moved through his classroom, picking off students. "I folded my tie and pushed it into my mouth so that I wouldn't scream," he told AFP.

Taliban spokesman Muhammad Umar Khorasani claimed responsibility for the attack in a phone call to media, saying that six suicide bombers had carried out the attack as revenge for the killings of Taliban members at the hands of Pakistani authorities. But the chief minister said there were eight attackers, dressed in military uniforms.

"We selected the army's school for the attack because the government is targeting our families and females," he said. "We want them to feel the pain."

Khorasani said that the attackers had been ordered to shoot the older students but not the young children.

Pakistani Prime Minister Nawaz Sharif headed to Peshawar after getting word of the attack. "I have decided to proceed to Peshawar and I will supervise the operation my self," he said. "These are my children and it is my loss."

Sharif announced that three days of national mourning would be observed in the wake of the attack.

President Barack Obama condemned the attack "in the strongest terms." "Our hearts and prayers go out to the victims, their families, and loved ones," Obama said in a statement. "By targeting students and teachers in this heinous attack, terrorists have once again shown their depravity. We stand with the people of Pakistan, and reiterate the commitment of the United States to support the Government of Pakistan in its efforts to combat terrorism and extremism and to promote peace and stability in the region."

Nobel Prize winner Malala Yousafzai, who was shot in the head by the Taliban in 2012 for promoting girls' education, said in a statement that she was "heartbroken" by the violence.

"Innocent children in their school have no place in horror such as this," she said. "I condemn these atrocious and cowardly acts and stand united with the government and armed forces of Pakistan whose efforts so far to address this horrific event are commendable. I, along with millions of others around the world, mourn these children, my brothers and sisters -- but we will never be defeated."