Police in Pakistan said on Tuesday that they were hunting a would-be suicide bomber who ran inside a court complex in the northwestern town of Tangi. Later, authorities said they had managed to shoot the man dead inside the compound.

A second attacker was killed by security forces while a third managed to detonate their explosives outside the entrance.

"I am on the spot, the dead body of one bomber is laying outside the main gate of the court complex, the dead body of the second bomber is inside the complex," said Bahadur Yar, the mayor of Charsadda district where Tangi is located.

"The third attacker managed to enter inside," Yar added.

Officials confirmed that there had been at least five deaths and 15 injuries, but that the death toll may rise. Hundreds of lawyers, judges and everyday citizens pass through such facilities on a daily basis.

Tangi is in Pakistan's Khyber Pakhtunkhwa province on the border with Afghanistan, a Taliban stronghold

"I escaped towards the canteen and climbed the wall to save my life. But there were many people dead and injured," resident Mohammad Shah Baz told Reuters news agency. Other witnesses reported seeing "many" dead bodies as they clambered to escape the complex.

A spokesman for the Jamaat-ur-Ahrar (JuA) faction of the Pakistani Taliban claimed responsibility for the attack. Earlier this week, the Taliban had made a promise to target the judiciary.

A recent wave of violence has claimed 100 lives in Pakistan in the past week, raising concerns about the resurgence of militant attacks across the country. "Islamic State" (IS) terrorists killed at least 90 people and wounded hundreds at an attack on a Sufi shrine in Sindh province last Thursday, and JuA claimed responsibility for a blast in the city of Lahore that took 14 lives.

es/se (AP, AFP, Reuters)