A bomb exploded at a religious school run by a pro-Taliban Islamist party in southwestern Pakistani on Friday, killing five people and wounding 10 more, police said.

Television footage showed a gaping hole in the external wall around the seminary on the outskirts of the city of Quetta and one partly demolished adjacent room.

A police official said the blast seemed to have occurred inside the wrecked room. However, a witness claimed it was caused by a suicide bomber intercepted at the main gate.

Officials declined to speculate about the possible motive for the attack in a city with a rich cast of violent groups.

The capital of Pakistan's Baluchistan province, Quetta is a hub for Taliban militants fighting in neighboring Afghanistan and has a history of sectarian violence. The province is also the scene of a low-level insurgency waged by ethnic Baluch nationalists seeking more autonomy.

Police officials said the school was run by Jamiat Ulema-e-Islam, a hardline Islamist party that is part of Pakistan's ruling coalition government.

City police chief Wazir Khan Nasir said five people died and 10 more were wounded. One of his officers, Raja Ishtiaq, said the blast occurred inside the room and that police were investigating how the bomb got there.

However, a witness who identified himself as Shahbaz Ahmad said students had been scuffling with a man who tried to push past them after they asked him why he wanted to enter the compound.

"When they barred his way, he blew himself up," Ahmad told reporters at a city hospital.

Ahmad had no visible wounds, but moments later, he collapsed unconscious and doctors rushed to revive him.

Later Friday, unknown gunmen riding a motorbike opened fire on a police patrol vehicle in Quetta, killing one officer and wounding one policeman and a passer-by, Ishtiaq said. It was unclear if the two incidents were related.