Dozens of people were injured in the attack on the mosque
Hundreds of tribesmen are continuing an offensive against Taliban militants in north-west Pakistan, officials say.
At least 11 Taliban are said to have been killed in the three-day offensive.
It follows the bombing of a mosque on Friday which killed 38 people in Upper Dir district. Villagers blamed the bombing on Taliban fighters.
Nearby Swat valley has been the scene of heavy fighting between the Pakistani military and Taliban militants. Upper Dir has also seen sporadic clashes.
Local officials say between 1,000 and 1,500 tribesmen are involved in the offensive against the Taliban.
Tribesmen attacked five villages in the Dhok Darra area which are thought to be militant strongholds, the Associated Press news agency quoted district official Atif-ur-Rehman as saying.
The citizens' militia had occupied three of the villages since Saturday and was trying to push the Taliban out of two others on Sunday, he said.
Some 20 houses of local tribesmen suspected of harbouring Taliban fighters were destroyed, the official said.
"It is something very positive that tribesmen are standing against the militants. It will discourage the miscreants," Mr Rehman said.
At least 11 militants had been killed by Sunday afternoon, AP quoted district police chief Ejaz Ahmad as saying.
He said around 200 militants were putting up a tough fight but were surrounded by the villagers.
The government has encouraged local citizens to set up militias, known as lashkars, to fight the Taliban in the region bordering Afghanistan where al-Qaeda and the Taliban are known to have hideouts.
This is not the first time a tribal force has attempted to battle the Taliban. In the Salarzai area of Bajaur, just such a tribal force successfully denied sanctuary to the Taliban in November 2008.
But these efforts have come at a cost in the past as Taliban militants have retaliated by targeting tribal gatherings, or jirgas, with suicide attacks.
The Taliban has retaliated with ferocity against tribal forces in the past.
The BBC's M Ilyas Khan in Islamabad says the idea of lashkars had been seen to be futile - particularly when the Taliban were able to punish tribal elders and communities with impunity in areas where government forces were unable to provide adequate security.
But, our correspondent says, the key difference this time is that the present military action in Swat appears to have convinced people that the government is serious about countering the Taliban.
If this impression spreads there may be further examples of local forces taking on Taliban fighters, he says.
There has been broad public support for the army's offensive against the Taliban in Swat valley, including from opposition parties, the media, and even some religious leaders.
Public opinion appears to have generally shifted against the Swat Taliban since they broke a peace deal earlier this year which imposed Sharia law in Swat valley and other parts of Malakand division.
Friday's bomb explosion killed at least 38 people and wounded dozens more.
Police said a suicide bomber detonated explosives at the mosque in Hayagai Sharki village, about 15km (nine miles) from the town of Upper Dir.
There has been no claim of responsibility for the blast, but there have been a number of suicide attacks linked to the Taliban insurgency in the north-west.
In March, about 50 people died in a suicide bomb attack at a mosque near Jamrud, on the Khyber Pass route to Afghanistan.
There are fears that such attacks are part of a militant backlash across the north-west in response to the army's anti-Taliban offensive. The army says it has captured a number of militant strongholds in the past week.
But the fighting has displaced more than two million people, raising fears of a humanitarian crisis in overstretched camps trying to cope with those forced to leave their homes.