PESHAWAR, Pakistan -- An explosion in a market in northwestern Pakistan on Friday killed at least 21 people and wounded 33 in what the police described as a suicide bombing.
The Pakistani Taliban claimed responsibility for the attack in Hangu, about 70 miles west of Peshawar, the capital of Khyber-Pakhtunkhwa Province. Abu Omar, a Taliban commander in the neighboring tribal region of North Waziristan, said in a telephone interview that the attack was in revenge for the killing on Thursday of a Sunni cleric.
The cleric, Mufti Abdul Majeed Deenpuri, 60, was shot in the southern port city of Karachi, setting off fears of reprisals against Shiites.
Mr. Deenpuri was a senior teacher at Jamia Binoria, one of the largest seminaries in Pakistan. A gunman opened fire on a vehicle carrying the cleric and a colleague at a busy intersection and then fled.
While the security situation is precarious across Pakistan, Rehman Malik, the interior minister, had warned of the potential for an attack in Karachi, a sprawling, violence-prone port city. Cellphone service was suspended there from noon to 3 p.m. during Friday Prayer.
Sectarian violence has also occurred in Hangu in the past, often forcing the authorities to impose a curfew. The town borders the Orakzai tribal region, where the army and paramilitary forces are fighting Taliban militants.
Friday's explosion occurred just after Friday Prayer as worshipers filed out of nearby Sunni and Shiite mosques, police officials said. "People were coming out of the mosque when the explosion occurred," said one officer in Hangu, speaking on the condition of anonymity.
Another police official in Hangu said a suicide bomber had detonated his explosives. While Shiites were the likely target, the dead included people from both Islamic sects, he said.
Separately, a Pakistani intelligence official, speaking on the condition of anonymity, said 30 mortar shells fired from Afghanistan on Friday morning killed six residents of Angoor Adda, a border village in South Waziristan. However, there was no official comment from the Pakistani military, and a local government official gave a conflicting number of casualties, saying three people were killed and six wounded.
In recent years, Pakistan and Afghanistan have traded barbs over accusations of cross-border rocket and artillery fire. The 1,510-mile craggy border between the two countries has long posed a problem for both sides, each accusing the other of not manning the border effectively. Both sides maintain that insurgents easily cross over the porous border, but plans to fence the border have been rejected as impractical.
On Thursday, Human Rights Watch released its World Report 2013, which sharply criticized the Pakistani government and its military and intelligence agencies for failing to reduce human rights abuses.
"Pakistan's human rights crisis worsened markedly in 2012 with religious minorities bearing the brunt of killings and repression," said Ali Dayan Hasan, the director in Pakistan for Human Rights Watch. "While the military continued to perpetrate abuses with impunity in Baluchistan and beyond, Sunni extremists killed hundreds of Shia Muslims and the Taliban attacked schools, students and teachers."
Ismail Khan reported from Peshawar, and Salman Masood from Islamabad, Pakistan. Ihsanullah Tipu Mehsud contributed reporting from Islamabad.
Correction: February 1, 2013, Friday
This article has been revised to reflect the following correction: Because of an editing error, an earlier version of this article misidentified the capital of Khyber-Pakhtunkhwa Province. It is Peshawar, not Hangu.
Correction: February 1, 2013, Friday
This article has been revised to reflect the following correction: An earlier headline with this article misstated the location of the suicide attack. It was in a market, not a mosque.
This article originally appeared in The New York Times.