Wounded children and teachers were rushed to a hospital in Peshawar after Taliban gunmen took hundreds of hostages at a school, killing at least 130 people.

An official said more than 100 of the dead were children. A hospital spokesman said the dead and wounded it had seen were aged between 10 and 20.

Troops surrounded the school building and troops started an operation to rescue children still trapped inside.

Hours into the siege, three explosions were heard inside the military-run high school.

Outside, as helicopters rumbled overhead, police struggled to hold back distraught parents who were trying to break past a security cordon and get into the school.

An unspecified number of children were still being held hostage in the school, a provincial official said, speaking some three hours after the siege began.

It is not clear whether some or all of the children were killed by gunmen, suicide bombs or in the ensuing battle with Pakistani security forces.

The Pakistani Taliban, who are fighting to topple the government and set up a strict Islamic state, have vowed to step up attacks in response to a major army operation against the insurgents in the tribal areas.

An expert on the Taliban told the BBC that one of the reasons for attacking the school was to send a message to the supporters of Malala Yousafzai. The Pakistani schoolgirl activist advocates education for women and children, and was awarded the 2014 Nobel Peace Prize.

"I am heartbroken by this senseless and cold blooded act of terror in Peshawar that is unfolding before us," said Malala in a statement. "I, along with millions of others around the world, mourn these children, my brothers and sisters, but we will never be defeated."