A bomb explosion during funeral prayers held for a local elder killed at least seven people and wounded 23 others in northwestern Pakistan on Thursday, police said.

The incident took place in the district of Lower Dir, 100 kilometres northwest of the Swat valley where the military in 2009 launched a large-scale operation to crack down on Islamist militants.

Senior police official Salim Khan Marwat said the explosion targeted members of a government-sponsored anti-Taliban militia operating in the area.

"Seven people were killed and 23 others were wounded in the bomb explosion," said Marwat, adding that the death toll was likely to rise.

Another local senior police official Akhtar Hayat Gandapur confirmed the blast and said the explosion rocked funeral prayers of a local elder in Lower Dir's Jandol town.

"We are trying to ascertain whether it was a timed device or suicide attack," he said.