A suicide bomber struck the funeral ceremony of a tribal elder who belonged to an anti-Taliban militia in northwestern Pakistan on Thursday, killing at least 25 people, police and government officials said.

The Lower Dir region where the attack took place is close to the Afghan border and abuts an area where Pakistan’s armed forces are engaged in an offensive against domestic Taliban insurgents. The Pakistani military says the region also faces a rising threat from cross-border attacks by fighters based in Afghanistan.

The blast, the latest in a recent string of militant strikes against anti-Taliban forces and leaders, occurred minutes after the funeral prayer for Bakht Sultan began, an eyewitness said. At least 50 people were reported wounded.

Tariq Ali, a government official in the region, said Sultan’s tribe, the Mashwani, spans the border, and its militia patrols in both Lower Dir and the neighboring Afghan province of Konar.

Other militia members were also killed in the blast, he said, but District Police Chief Salim Marwat said it was unclear whether the event was targeted because of its anti-Taliban stance. Sultan was killed in an auto accident Wednesday, officials said.

Several tribes in northwestern Pakistan have formed militias, known as lashkars, to fight Islamist militants in recent years. But the militias, which complain that Pakistan’s government provides them with insufficient support, have increasingly become the targets of insurgent attacks.

On Tuesday, Pakistani Taliban militants killed four children in an ambush of a school bus near the northwestern city of Peshawar, an attack the militant group said was meant to punish the local Kalakhel tribe for forming an anti-Taliban lashkar. The assault triggered widespread revulsion in Pakistan, where Islamist militants’ strikes have rarely directly targeted children.

An official of northwestern Pakistan’s main political party, the Awami National Party, was also killed Tuesday in a roadside bomb attack in Lower Dir. The Pakistani Taliban claimed responsibility for that attack as well, saying it was meant to avenge the victim’s support for military offensives in the area.

Earlier this month, the Pakistani Taliban abducted at least 20 young men who had accidentally wandered into Afghanistan from Pakistan’s Bajaur Agency, which is next to Lower Dir. The Taliban, which is is reportedly holding the group across the border in Konar province, has said it will release the men only if Bajaur tribesmen disband all anti-Taliban forces and abandon support for the Pakistani state.

Brulliard reported from Islamabad, Pakistan.