A group affiliated with the Taliban have claimed responsibility for the attack in the northwestern city of Bannu, the third since the start of Ramadan.