He said that as the firing started, she rushed from classroom to classroom, shouting at those inside to lock themselves in.
Other pupils said she was trying to console them as well as protect them. She was joined by another teacher, Saeed Khan, who tried to prevent pupils running away, fearing that they would be exposing themselves to more danger, and told them to lie on the floor of the classrooms.
"All the 900 students would have been killed, had both those teachers not come out in the middle of it all," said Jaffar Gul, a boy who sustained head injuries. "God bless both." They paid with their lives.
A plainclothes security officer escorts students rescued from nearby school during a Taliban attack in Peshawar. Photo / AP
Mrs Qazi, the wife of a retired army colonel, eventually sought refuge in the school lavatories, but the Taliban killers followed her in and hurled a hand grenade through a vent at her.
Mr Khan was one of a number of teachers who had fuel poured over them and were set alight. At the hospital, he could be identified only by the rings he was wearing.
"Saeed Khan didn't care for himself," said Adnan Ahmed, a grade nine student. "Later, we were told in the hospital that Khan has been killed."
Another pupil, Irfan Ullah, 15, told local reporters that he would have probably been killed if his teacher, Afsha Ahmed, 24, had not stood in front of the attackers as they entered their room and told them she would not allow them in.
"She was so brave," Irfanullah said. "Her last words to the terrorists were, 'You must kill me first because I will not see my students' bodies lying in front of me'."
The next thing we knew, she was on fire. Even while burning, she shouted at us to run away and find refuge."
Another teacher, Hifsa Khush, is thought to have been burned alive in front of her pupils.
The Pakistan Taliban continued yesterday to claim responsibility for the attack, which it said was in retaliation for army assaults on its strongholds in the north-west of the country.
The group published online pictures of the attackers taken before it launched its assault, at lunchtime on Tuesday. The pictures showed six men and their commander lined up first in military fatigues and then in civilian clothing, brandishing rocket-propelled grenade launchers and automatic rifles.
The Taliban gunmen responsible for the massacre at a Peshawar school pose in front of their flag
In the latter, the men are kneeling in front of a flag bearing the Muslim expression of faith in black writing on a white background.
The authorities allowed photographers into the school yesterday morning. They found rooms destroyed by the blasts of the suicide bombers, including the head's office.
In one, a pair of spectacles lay in a pool of blood, in another, a pair of children's shoes.
The school auditorium, where several classes were holding a lesson in first aid and where children had sought refuge under chairs and benches, furniture was upended and blood was spattered in all directions. It was here that most of the students were killed.
Overturned chairs and bloodstains on the floor marked where the Taliban carried out their slaughter of the children. Photo / AP
The army said it had retrieved more than 100 bodies from the auditorium alone.
Elsewhere torn paper and notebooks were piled up with shrapnel, broken masonry, bits of school uniform.
Mrs Qazi, as a scion of a prominent Pakistani family and as head of an elite school, was a well-established figure in Peshawar.
The school, part of a network of elite schools for the sons and daughters of soldiers as well as some civilians, was a natural target. However, the Taliban has also destroyed schools across northern Pakistan as part of its campaign against modern education. More than 1,000, especially girls schools, have been attacked and in many cases burned.
Nawaz Sharif, Pakistan's prime minister, signalled a hardening of attitudes, saying he would no longer distinguish between "good and bad Taliban", referring to previous attempts to negotiate with some jihadist factions, including that responsible for Tuesday's attack.
He also declared an end to a moratorium on the death penalty for convicted terrorists.
"We must not forget these scenes," he said after chairing a meeting of security chiefs in Peshawar.
"The way they left bullet holes in the bodies of innocent kids, the way they tore apart their faces with bullets."
Overnight, groups of people held candlelit vigils all over Pakistan in honour of the school and the dead, as funerals continued.
Candlelight vigils were held overnight for the people killed in the attack on a Pakistan school by Taliban gunmen.
One boy, though, was found to have had a lucky escape.
Fifteen-year-old Dawood Ibrahim was said by his family to have missed school on Tuesday after attending a wedding party the night before and not being woken by his alarm clock.
He was the only boy in his class to survive the day.
"Dawood isn't talking to anyone, he isn't talking at all," his brother Sufyan Ibrahim told a local newspaper.
"He just attended funerals the entire day."