Young Pakistani Supporters of Malala YousafzaiReuters

The Taliban has killed dozens of children at a Peshawar school in a revenge mission for Pakistani schoolgirl activist Malala Yousafzai being awarded the 2014 Nobel Peace Prize.

Ahmed Rashid, an expert on the Islamic militants, told the BBC the insurgents had various reasons to attack the school, one of which was to send a message to the supporters of Malala, who advocates education for women and children.

"This is an attempt to try to demoralise the military, which I don't think it will work," he said during a radio interview. "I think the second message has to do with Malala: Remember that Malala has been receiving accolades from all over the world, she's just won the Nobel Peace Prize and she was shot by the Taliban for advocating education for all.

"The Taliban have been very strongly opposing her views on education," Rashid continued. "So by attacking the school I think they are sending a very strong message saying that 'we don't like your schooling system and we want an Islamic schooling system.'"

In response to the events at the school in Pakistan, education campaigner Malala has condemned the "atrocious and cowardly" attack.

As reported by the Guardian, she said: "I am heartbroken by this senseless and cold-blooded act of terror in Peshawar that is unfolding before us.

"Innocent children in their school have no place in horror such as this.

"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."

At least five militants entered the school, in north-west Pakistan, wearing security uniforms and massacred 126 people, mainly children, on Tuesday (16 December).

The Pakistani army officials said hundreds of students were evacuated but it is not yet clear how many are still in the building.

The Taliban said the massacre was a "revenge" attack following an army offensive against Islamic extremists in North Waziristan and in nearby Khyber.

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

Malala attacked by the Pakistani Taliban in 2012

Malala, the youngest ever Nobel Prize winner, was shot by the Pakistani Taliban in 2012 for advocating education for women in Pakistan.

She was attacked on a school bus in the Swat valley, in the Khyber Pakhtunkhwa province, of which Peshawar is the capital.

After she survived the homicide attempt, Malala moved with her family to the UK to receive treatment and finish her education, and has since become a worldwide symbol for the fight against oppression on women and the right to education.

A few days before the Peshawar attack, the Taliban warned that Malala had forged a pact with "Western satanic forces" and the Nobel committee gave their award to her to "promote Western culture and not education".

Children cross a road as they move away from a military-run school attacked by Taliban gunmen in Peshawar, PakistanKhuram Parvez/Reuters

Gordon Brown, the United Nations special envoy for global education, has joined the condemnation of the attack.

He said: "The whole world will be shocked and heartbroken at the massacre in Peshawar that has destroyed so many innocent young lives.

"Prime Minister Sharif has called the attack a national tragedy and our thoughts are with families and school friends. Our hope is that emergency assistance can come immediately to those who are injured.

"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.

"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."