A city in north-western Pakistan has observed a day of mourning, a day after a twin suicide bombing targeted a military base and killed 18 people, including five soldiers.

A militant group linked with the Pakistani Taliban claimed responsibility for the bombing in Bannu, which also left 42 injured, some critically. Militants have targeted the city in the past.

The bombers blew themselves up to breach the base’s surrounding wall. At the time, most residents were breaking their day-long fast during the Muslim holy month of Ramadan or praying at a nearby mosque.

The blasts ripped off roofs and severely damaged the mosque. Other attackers stormed the base and set off a firefight with troops.

Eighteen people were killed (AP)An army statement on Wednesday said five soldiers and 16 militants were killed.

Gunshots could be heard early Wednesday as security forces combed through the area, looking for militants.

At the scene, a mechanical digger cleared rubble where homes had stood. Debris-covered prayer mats lay crumpled at the mosque.

Joint funeral prayers were held for the victims at a sports complex.

“All education institutions are closed,” Bannu community elder Alam Khan said. “Most shops are also shut. Rescue workers have completed their operation by recovering the bodies of three deceased worshippers who were trapped under the collapsed roof of the mosque.”

Bannu is in Khyber Pakhtunkhwa province that borders Afghanistan. Several armed groups are active there. A group affiliated with the Pakistani Taliban, Jaish Al-Fursan, has claimed responsibility for the attack.