At least 14 Pakistani police officers were killed late Saturday when a suicide attack targeted a security post in the country's northwest, authorities confirmed early Sunday.

A self-proclaimed breakaway group of the Pakistan Taliban has claimed the attack that saw a suicide bomber and several gunmen detonate an explosives-laden vehicle near the post in Bannu, a district in Khyber Pakhtunkhwa province bordering Afghanistan.

Senior police official Sajjad Khan said the attack triggered an intense shootout and some officers were killed in the exchange, while others died later after the building collapsed.

Rescuers conducted an hourslong search operation using heavy machinery to retrieve bodies from under the rubble, Khan said, adding that three police officers were wounded in the attack.

Meanwhile, hundreds gathered Sunday at the police headquarters in Bannu to attend the funerals of the slain officers. Uniformed colleagues stood in silence as coffins draped in the national flag were carried past grieving families. Some relatives broke down upon seeing the coffins, as a Muslim cleric led funeral prayers under tight security.