LASHKAR GAH, Afghanistan — Violence exploded in Pakistan and Afghanistan on Thursday during processions by Shiite Muslim worshippers observing the holy day of Ashura. A suicide bombing in northwestern Pakistan killed 23 people and wounded dozens more.
After the bombing, in the town of Hangu, angry Shiites rampaged through the streets, setting fire to stores, government buildings and vehicles. By the end of the day the death toll rose to 31, local officials said.
In western Afghanistan, fighting broke out between Shiite and Sunni Muslims during a procession of Shiite worshipers in Herat, the country's third-largest city. The fighting killed six people and wounded 120 others, said a senior military official, who spoke on the condition of anonymity because he was not authorized to discuss the matter.
Pakistani troops moved into Hangu, which is 125 miles southwest of the capital, Islamabad, after the bombing and the rampage.
Leading Shiite and Sunni religious leaders condemned the attack as an attempt to create chaos in Pakistan. No one had claimed responsibility for the attack by Thursday evening, but Sheik Rashid Ahmed, the information minister, confirmed in a telephone interview that a suicide bomber had carried out the attack.
"This was a blast," he said. "It was a suicide bomber." He would not say who he thought was behind the attack. "Such things take time," he said of the investigation.
Pakistan has been troubled by tensions between the Shiite minority and the Deobandi sect, a puritanical branch of Sunni Islam to which some of the country's jihadist political factions belong. Violence between the two groups has killed more than 1,200 people in the last 15 years. Sunnis make up 77 percent of the country's population of 150 million, and Shiites 20 percent.
In Afghanistan, the procession of hundreds of Shiites in Herat commemorating the martyrdom of Imam Hussein, the grandson of the Prophet Muhammad, turned violent, with Sunnis and Shiites fighting with sticks, stones and knives, and then guns and grenades. By the end of the afternoon the main Shiite mosque in the northern part of the city and nearby shops were on fire, said Muhammad Rafiq Shahir, leader of a civic professional group called the Experts Council.
Shahir, a Sunni, blamed the government for setting the stage for violence by appointing a Shiite last year as governor of Herat Province, which has a Sunni majority. Tensions remain in Afghanistan between ethnic groups in Afghanistan from years of factional fighting.