The Taliban splinter group Jamaat-ul-Ahrar claimed credit for the attack. The group claimed that the attack targeted members of a resistant tribal militia. It warned members of such militias to “stop opposing Islam and jihad,” the Wall Street Journal reported.

The Mohmand area, near the Afghanistan border, is known to have bases for the Taliban and other militant groups.

The Washington Post reported the attacker entered the village’s mosque at about noon where more than 300 worshipers were attending a weekly prayer service. The attacker shouted “Allahu Akbar” before the explosion, local tribesmen told government officials.

The four-day Eid al-Adha, or Sacrifice Feast, Muslim festival, concluded on Thursday. Militant groups in Pakistan often target civilians, such as in the 2014 Peshawar school massacre in which the Taliban killed 150 people, mostly children.

The massacre led Pakistani officials to begin a crackdown on militant Islamists, which led to the establishment of military courts to try suspects, including civilians, accused of terrorism. A six-year moratorium on capital punishment was lifted, leading to the executions of the Peshawar school massacre suspects.