Tribesmen assailed Taliban militants who beheaded a local militiaman in public and tried to abduct their chief, as clashes across northwest Pakistan left 41 people dead on Sunday, officials said.

The government has hailed the emergence of anti-Taliban tribal militias as evidence that it can root out militants waging an insurgency in both Pakistan and Afghanistan.

The militias, known as lashkars, have been compared to the so-called awakening councils that have helped U.S. forces turn the tables against Al Qaeda in Iraq.

"Our tribal brothers, those who are patriots, have broken with them [the militants], and lashkars are fighting against those involved in terrorism," Pakistani Prime Minister Yousuf Raza Gilani said Sunday.

However, there are doubts that the ramshackle militias can face down heavily armed insurgents who have seized swaths of Pakistan's border belt, forged ties with Al Qaeda, and targeted pro-government elders with suicide bombings and kidnappings.

Officials have denied reports they are arming the militias, though observers suspect that they at least receive government funding.

The botched abduction occurred in Swat, a picturesque valley once popular with tourists where government forces have been battling militants for more than a year.

Police said a group of assailants were trying to hustle militia chief Pir Samiullah from his home in the Mandaldag area to a getaway car when dozens of local tribesmen confronted them and snatched him back.

Dilawar Bangash, the Swat police chief, said hundreds of Taliban later returned, seized three members of the militia and beheaded one of them on a road before a large crowd.

A Taliban commander called Mullah Shamsher told onlookers "that this was a lesson for anyone who tried to oppose them," Bangash said, citing accounts gathered later by police.

Meanwhile, the militia was gathering men from the surrounding area who engaged the Taliban in an hours-long gunbattle.

Bangash said 20 militants, six militiamen and four bystanders were killed in the shooting and another police official said several tribesmen were reported missing.

Muslim Khan, a militant spokesman contacted by telephone, confirmed a clash but said only three Taliban died. He claimed that 12 tribesmen were killed and another 62 abducted.

Insecurity and government restrictions make it virtually impossible to verify accounts of the fighting.

While the militia in Mandaldag is the first to emerge in Swat, several tribes have swung behind the government in Bajur, a nearby region that has also seen heavy fighting.

Their role appears to be to hold territory cleared by an ongoing military offensive.

Jamil Khan, a government representative in Bajur, said eight insurgents died when helicopters and artillery shelled several areas on Sunday morning. Three more insurgents died in a gunbattle in the village of Tang Khata, Khan said. He said there were no troop casualties.

Pakistan's army launched its offensive in Bajur in early August after officials declared it a "mega-sanctuary" for militants and a major infiltration route into Afghanistan.

The operation has drawn praise from U.S. officials, but faces criticism in Pakistan, where many blame their country's alliance with the United States for escalating violence on their own soil.

"It seems our army is committed to creating a separatist movement" in the ethnic Pashtun-dominated northwest," Qazi Hussain Ahmed, the head of Pakistan's largest Islamist party, told supporters in the eastern city of Lahore. "It is committed to shed the blood of our own people to fulfill American designs."

As well as killing 1,500 militants and 71 troops, the army acknowledged for the first time on Saturday that 95 civilians had died in Bajur. Nearly 200,000 more fled their homes.

The government has offered to negotiate with groups who lay down their arms, seeking to reduce the violence that has contributed to Pakistan's economic problems.

The South Asian country is in talks with the International Monetary Fund and other lenders about receiving help to ward off a balance of payments crisis and prevent it from defaulting on its foreign debts.