PESHAWAR, Pakistan – A suicide bomber struck a funeral attended by anti-Taliban militiamen in northwestern Pakistan on Wednesday, killing at least 36 mourners and wounding more than 100 in the deadliest militant attack in the country this year. The Pakistani Taliban claimed responsibility.

The blast near the city of Peshawar was not far from the tribally administered regions bordering Afghanistan where militants are at their strongest. The area struck is home to several tribal armies that battle the Pakistani branches of the Taliban with the government’s encouragement.

Police officer Zahid Khan said about 300 people were attending the funeral for the wife of a militiaman in the Matani area when the bomber struck. TV footage showed men picking up bloodied sandals and caps from a dusty, open space where mourners had gathered.

Witnesses said the bomber, who appeared to be in his late teens, showed up at the funeral just as it was about to begin.

“We thought this youth was coming to attend the funeral, but he suddenly detonated a bomb,” survivor Syed Alam Khan said.

Taliban spokesman Ahsanullah Ahsan said the insurgents targeted the militiamen because they were allied with the Pakistani government and, effectively, the United States.

“We will carry out more such attacks if they did not stop their activities,” he said via phone from an undisclosed location.

Militia commander Dilawar Khan said he would consult his fighters and local elders about whether to keep battling the Taliban, insisting that the government did not provide them with the resources they need.

Another witness, Farman Ullah, complained that there was no police security in place for the funeral.

“It was the duty of the government to provide us security, but it did not do it,” he said.

The main hospital in Peshawar received at least 36 bodies and more than 100 wounded after the blast, hospital official Jamal Shah said.

Al-Qaida and Taliban militants are waging a bloody war against the Pakistani state from their bases in the northwest. The army has launched several offensives against the Islamist extremists but has also encouraged the formation of private militias to help out in the fight.

While human rights groups are alarmed at the state ceding authority to armed civilians, the government has praised the role of the militias in battling the Taliban or holding ground retaken from them.

Police in Peshawar said late last year that the militias in Matani were essential in stopping Taliban infiltration into the city.

The militiamen operate from heavily fortified compounds in the region and have seen their influence rise. But commanders have complained they do not get enough government help.

The army says it is winning the war against militants, but bombings still regularly strike in much of the country. On Tuesday, at least 20 people were killed in a car bombing in Punjab province.

Also Wednesday, police in Pakistan’s largest city said they had arrested four Pakistani Taliban militants after a tip and a shootout, but four alleged insurgents managed to escape. The militants were believed to be planning attacks in Karachi, a southern city of 18 million, senior police official Mohammad Aslam said.

Police showed reporters four hooded men who they said were the suspects. They also displayed an explosives-laden sucide jacket, assault rifles and other weapons they said they recovered late Tuesday.

Karachi has a history of sectarian, political and ethnic violence. Officials say Pakistani Taliban fighters, who tend to be based in the northwest, increasingly use Karachi as a hide-out.

In the country’s southwest, a landmine exploded next to a vehicle in Dera Bugti area of southwestern Baluchistan province, killing five people and wounding 18, government official Shoaib Jadoon said.

No group immediately claimed responsibility. But Baluchistan has long been the scene of a low-level insurgency which wants the province to have more autonomy and a greater share of the money derived from its natural resources.