The death toll in the suicide bombing at a polling station in Pakistan's north-western Buner district has risen to 40 as more victims died in hospitals, police said.
Several children were among those killed in the attack on Sunday during a by-election for a provincial assembly seat.
"By Monday morning, the number of confirmed deaths had reached 40," said Behramand Khan, a police officer in Dagar, Buner's the main town where most of the casualties were taken.
Some of the critically injured were also referred to Peshawar city for specialised treatment.
Officials and locals said the death death could climb further since the school building, in which the poll was being held, collapsed after the blast.
"There are still people under the rubble. Villagers are trying to retrieve the trapped people," Kashif Khan, a witness, said.
"We don't know how many people are dead and how many alive."
The school is in the town of Buner, in the North West Frontier Province. Security forces are attempting to subdue al-Qaeda and Taliban fighters in the area.
It was unclear whether the bomb was triggered by remote control or a suicide attacker.
A spokesman for anti-government fighters operating in the restive Swat valley, which shares boundaries with Buner, claimed responsibility for the bombing.
The attack was to avenge the killing of six of their comrades by a pro-government militia in Shal Bande on August 13.