(Reuters) - Taliban gunmen took hundreds of students hostage at a military-run school in the northwestern Pakistani city of Peshawar on Tuesday, and at least 18 people were killed, including 16 pupils, officials said.
A Reuters journalist at the scene heard heavy gunfire from inside the school as soldiers surrounded it. Helicopters hovered overhead and ambulances ferried wounded children to hospital.
The Lady Reading Hospital in Peshawar, a sprawling and volatile city not far from the Afghan border, said the hospital had received the bodies of at least 12 people and was treating 40 wounded students and two male teachers.
Provincial health minister Shahram Khan later told television that 18 people had died, including 16 students, a female teacher and a soldier.
The Pakistani Taliban, who are fighting to topple the government and set up a strict Islamic state, have vowed to step up attacks against Pakistani targets in response to a major army operation against the insurgents in the tribal areas.
The army said in a statement that many hostages had been evacuated but did not say how many.
"Rescue operation by troops underway. Exchange of fire continues. Bulk of student(s) and staff evacuated. Reports of some children and teachers killed by terrorist," the army said in a brief English-language statement.
Military officials at the scene said at least six armed men had entered the military-run Army Public School. About 500 students and teachers were believed to be inside.
"We were standing outside the school and firing suddenly started and there was chaos everywhere and the screams of children and teachers," said Jamshed Khan, a school bus driver.
One student inside the school at the time of the attack told a private television channel: "We were in the examination hall when all of sudden firing started and our teachers told us to silently lay on the floor. 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."
Taliban spokesman Muhammad Umar Khorasani told Reuters his group was responsible for the attack.
"Our suicide bombers have entered the school, they have instructions not to harm the children, but to target the army personnel," he said.
"It's a revenge attack for the army offensive in North Waziristan," he said, referring to the anti-Taliban military offensive that began in June.
(Additional reporting by Mehreen Zahra-Malik and Syed Raza Hassan in Islamabad and Saud Mehsud in Dera Ismail Khan; Writing by Katharine Houreld and Maria Golovnina; Editing by Mike Collett-White)