A vehicle bomb exploded Friday at a mosque near police offices in Kohat district of northwestern Pakistan as gunmen attempted to storm the compound, killing at least 21 people and injuring 80 others, police and rescue officials said.
Most of those killed were police officers attending prayers at the mosque, according to hospital officials. Provincial police chief Zulfiqar Hameed said an attacker apparently rammed an explosives-laden vehicle into the mosque.
At least seven armed gunmen also tried to enter the police compound and exchanged fire with officers. Police said six attackers were killed, while a suicide bomber targeted a nearby intelligence agency office.
The blast badly damaged the mosque and collapsed part of the police offices' outer wall. Residents reported hearing the explosion from far away, followed by gunfire that continued for hours.
Prime Minister Shehbaz Sharif condemned the attack and ordered authorities to speed up rescue operations.
No group immediately claimed responsibility, but suspicion was likely to fall on the Pakistani Taliban, or TTP.
The attack followed a roadside bomb in Hangu that killed six soldiers and military raids that killed 10 suspected TTP militants.
TTP attacks have increased in recent years. Pakistan accuses Afghanistan's Taliban government of sheltering TTP, which Kabul denies.