About 300 students held hostage by three would-be suicide bombers at a school in north-western Pakistan on Thursday were freed by armed local residents who stormed the building killing two of the militants in a gunbattle.
The militants took control of the government-run primary school in Dir district of the North West Frontier Province and held the children hostage for several hours.
Local residents rushed to the school and rescued their wards after exchanging fire with the militants, killing two of them while the third escaped, TV channels reported.
The two dead militants had explosives strapped to their bodies and they blew up during the gunbattle.
Police and local residents were not certain whether the militants blew themselves up or had exploded after being hit by bullets.
All the children were freed unhurt, the school management said.
The Dir district is located near the restive Bajaur tribal region and the troubled Swat valley in the NWFP.
The people in Dir have formed committees to expel the Taliban from the area.
The Pakistani Taliban have been running a terror campaign to close down girls' schools all over the tribal region.
The Taliban have burnt over 100 girls' schools in Swat valley over the past few months.