LAHORE, Pakistan — A Taliban suicide bomber detonated his explosives in a congested neighborhood here on Tuesday after failing to breach the security cordon around the headquarters of the police, killing at least five people and wounding at least 23, officials said.

“The target was the main building of Police Headquarters,” said Mushtaq Sukhera, the police chief of Punjab Province.

A breakaway faction of the Pakistani Taliban called Jamaat-ul-Ahrar claimed responsibility for the attack, which it described as retaliation for army operations in the country’s tribal belt.

“Today’s suicide attack was made in revenge for our fighters’ death in tribal areas,” a spokesman, Ehsanullah Ehsan, said, according to Reuters.