WARNING: THIS REPORT CONTAINS GRAPHIC CONTENT, READER DISCRETION IS ADVISED
Taliban militants stormed a school in Pakistan on Tuesday, killing 141 people, including 132 children.
Up to 500 students and teachers from the Army Public School in Peshawar were believed to have been taken hostage by up to 10 terrorists during the massacre.
A Pakistani military source told US TV network NBC that attackers wearing police uniforms and suicide vests charged the building.
"They burnt a teacher in front of the students in a classroom," said the unnamed military source. "They literally set the teacher on fire with gasoline and made the kids watch."
As darkness fell, officials said they had cleared the school of militants. "The operation is completed," said Bilal Ahmad Faizi, head of the rescue effort.
The attack began in the morning hours, with the gunmen entering the school - which has students in grades 1-10 - and shooting at random, said police officer Javed Khan.
Outside the school, shooting was initially heard along with as many as 15 loud blasts. According to reports the school was booby-trapped with IEDs.
Pakistani television showed soldiers surrounding the area and pushing people back. Boys in blood-soaked school uniforms with green blazers were seen being carried from the scene.
The school is located on the edge of a military garrison in Peshawar, but the bulk of the students are civilian.
Later, one of the wounded students, Abdullah Jamal, said that he was with a group of 8th, 9th and 10th graders who were getting first-aid instructions and training with a team of Pakistani army medics when the violence began.
When the shooting started, Jamal, who was shot in the leg, said nobody knew what was going on in the first few seconds.
"Then I saw children falling down who were crying and screaming. I also fell down. I learned later that I have got a bullet," he said, speaking from his hospital bed.
"All the children had bullet wounds. All the children were bleeding," Jamal added.
Taliban spokesman Mohammed Khurasani claimed responsibility for the attack in a phone call to media, saying suicide bombers had carried out the attack in revenge for the killings of Taliban members at the hands of Pakistani authorities.
He told AFP the team of attackers: “… Include target killers and suicide attackers. They have been ordered to shoot the older students but not the children.”
He added: "We targeted the school because the army targets our families. We want them to feel our pain."
Hundreds of Taliban fighters are thought to have died in a recent military offensive in Waziristan and the Khyber region.
Nigel Inskter, a British former MI6 assistant chief, said the bloody attack could be the first of several "revenge" hits by Taliban fighters.
He said: "It is an attack of revenge, and there is possibly more where this came from."
Peshawar has been the target of frequent militant attacks in the past but has seen a relative lull recently.
On Tuesday Prime Minister Nawaz Sharif was en route to the region to supervise the operation.
In comments reported by Pakistan’s Dawn newspaper he said: “These are my children and it is my loss.”
He has announced a three-day countrywide mourning in the wake of the attack.
Shocked at attack on school in Peshawar. Strongly condemn this inhuman act of utter barbarism.— Imran Khan (@ImranKhanPTI) December 16, 2014
British Prime Minister David Cameron said: "The news from Pakistan is deeply shocking. It's horrifying that children are being killed simply for going to school."
Former PM Gordon Brown, who has campaigned for security in schools in his role as United Nations special envoy for global education, said: "The whole world will be shocked and heartbroken at the massacre in Peshawar that has destroyed so many innocent young lives.
"We must remain resolute in saying that no terrorist group can at any time ever justify denying children the right to an education and we will do everything in our power to support the Pakistan authorities and make sure their schools are safe and protected.
"The whole world will be shocked and heartbroken at the massacre that has destroyed so many innocent young lives" - GB on Peshawar attack— Gordon & Sarah Brown (@OfficeGSBrown) December 16, 2014
"It has never been acceptable for schools to be places of conflict and for children to be subject to violence simply because they want to learn. Education is opportunity and hope for building nations.
"Too often innocent girls and boys have become targets for terrorists who want to deny children the right to education and schools have become theatres of war.
"No-one has the right to deny a boy or girl their education and we will stand alongside the parents and the children against the Taliban's refusal to recognise every child has the right to education."
Education campaigner and Nobel peace prize winner Malala Yousafzai, who was shot by the Taliban, also condemned the "atrocious and cowardly" attack.
She said: "I am heartbroken by this senseless and cold-blooded act of terror in Peshawar that is unfolding before us."
Bolton South East MP Yasmin Qureshi described the "gut-wrenching" scenes as "an utterly barbaric and inhumane attack on innocent children".
Gut wrenching images coming in from Pakistan. An utterly barbaric and inhumane attack on innocent children in #peshawar death toll rising— Yasmin Qureshi (@YasminQureshiMP) December 16, 2014
I guarantee according to islam that the Taliban will go to hell. #PeshawarAttack— Mohammed Shafiq (@mshafiquk) December 16, 2014
Mohammed Shafiq, chief executive of the UK-based Ramadhan Foundation, condemned the "brutal and evil" assault as "an attack against all Pakistanis" and "an affront to Islam".
Indian Prime Minister Narendra Modi said on Twitter: "Strongly condemn the cowardly terrorist attack at a school in Peshawar.
It is a senseless act of unspeakable brutality that has claimed lives of the most innocent of human beings - young children in their school.— Narendra Modi (@narendramodi) December 16, 2014
"It is a senseless act of unspeakable brutality that has claimed lives of the most innocent of human beings - young children in their school.
"My heart goes out to everyone who lost their loved ones today. We share their pain and offer our deepest condolences."
Devastating news from Pakistan. Appalling that school children were targeted in this murderous attack. My thoughts are with those affected.— Ed Miliband (@Ed_Miliband) December 16, 2014
Utter condemnation for this barbaric targeting of children.— Sayeeda Warsi (@SayeedaWarsi) December 16, 2014