Islamist Taliban militants stormed a university in volatile northwestern Pakistan on Wednesday, killing at least 19 people and wounding dozens as the army hunted for any gunmen still holed up on the campus, officials said.

A security official said the death toll could rise to as high as 40 as army commandos cleared out student hostels and classrooms. A spokesman for the rescue workers, Bilal Ahmad Faizi, said 19 bodies had been recovered including students, guards, policemen and at least one teacher, named by media as chemistry professor Syed Hamid Husain.

Many of the dead were apparently shot in the head execution-style, TV footage showed.