ISLAMABAD, Pakistan — A suicide bomber detonated his explosives at the funeral procession for the wife of a prominent Taliban opponent on Wednesday, killing at least 37 people and leading to fresh condemnation of the government for failing to offer support and protection for those who stand up to militants.

At the time of the attack, more than 150 people had gathered in an open area to offer funeral prayers for of the wife of Hakeem Khan, a local figure who has resisted the influence of the Taliban.

Insurgents have frequently singled out security forces and civilians who dare to oppose them. But many leaders of anti-Taliban militias have complained of not being provided adequate support by security officials and law enforcement authorities, leaving them vulnerable to retaliation by militants.

Though a suburb of Peshawar, Matni has not been cleared of Taliban insurgents, who have repeatedly warned local residents to quit siding with the government or face punishment.

The local news media quoted witnesses as saying that a suicide bomber, who appeared to be in his late teens, joined the funeral prayers and then detonated his explosives-laden vest.

In addition to the dead, at least 45 people were wounded, several critically. Local TV channels broadcast images of blood splattered on the ground. Dozens of shoes, with bloodstains, were scattered about.

Muhammad Iman, a witness who escaped unhurt, told Dunya TV that he was standing in the front row of the service when the bomber came from the left side and joined the back row of mourners.

“Government has not provided us any support,” Mr. Iman complained.

Prime Minister Yousaf Raza Gilani condemned the blast. A statement released by his office “reiterated the government’s resolve to root out the cancer of terrorism from every nook and corner of the country.”

The attack came a day after a car bomb exploded near an office of the Inter-Services Intelligence Directorate, the country’s premier spy organization, in the eastern city of Faisalabad, killing at least 25 people.

“The Taliban may be down but not certainly out,” said Omar R. Qureshi, the opinion pages editor of The Express Tribune, an English-language newspaper based in Karachi. “And this targeting of anti-Taliban people who have been fighting them will drive home that message very hard, especially following on the blast in Faisalabad.”

“It also shows the vulnerability of those whom the government asks to fight the Taliban and who are then left to their own devices,” he said.