Shiites and Sunnis battled each other with rockets and gunfire in northwestern Pakistan on Friday, raising the death toll of two days of Muslim sectarian violence to 38, an official said.

The latest fighting in the town of Hangu killed three Shiites and at least one Sunni, the town's top administrator, Ghani ur-Rahman, told The Associated Press.

The violence began Thursday when a homicide bomber tore through a procession of minority Shiites observing Ashoura, their most important religious holiday. Shiites sought revenge, burning shops and cars and fighting Sunnis in the area, about 60 miles south of Peshawar.

In neighboring Afghanistan, police fired warning shots into the air Friday as hundreds of people protested the failure of authorities to prevent a similar burst of sectarian violence in the western city of Herat. The crowd pelted police with stones.

The protesters, mostly Sunnis, gathered in front of the provincial governor's residence, seeking information about people left missing or wounded in Thursday's violence, which killed at least five people as the rivals exchanged gunfire, hurled grenades and burned Mosques.

Elsewhere in the city, another predominantly Sunni group of protesters tried to reach the consulate of Iran — apparently because it's a Shiite-majority nation — but security forces dispersed them by firing in the air.

There were no immediate reports of injuries from Friday's protests.

"If the government can't control it, the situation will grow worse," said Khan Alakozai, president of the Herat chamber of commerce.

Sectarian violence during Ashoura has previously been rare in Afghanistan.

In Pakistan, sectarian attacks have often marred the annual rite, which marks the 7th century death of Imam Hussain, a grandson of the Prophet Muhammad. Hussain's death in a battle fueled a rivalry between Shiites and Sunnis over who should succeed the prophet.

The town of Hangu came under rocket attack from the mountains Friday morning, and Shiites returned gunfire, ur-Rahman said.

Khurshid Anwar, a prominent Shiite cleric, said he believed Sunnis were shooting rockets because they were launched from area where many Sunnis live.

"Those who fired rockets and other weapons wanted to target our people, our homes," Anwar said.

Thursday's bombing and the ensuing riot killed 28 people, including five who died from injuries overnight, said ur-Rahman. Four other people — three men and a woman — died in a separate shooting Thursday on a minibus on the outskirts of town.

Hangu Police Chief Ayub Khan said investigators found the remains of the suspected suicide bomber but have not identified the person.

Shiites and Sunnis generally live in peace in Pakistan but extremists on both sides often launch attacks. Last March, the bombing of a Shiite shrine in the southwestern town of Fatehpur killed 46 people.

Most shops in the main Hangu bazaar were burned by mobs Thursday, and other small markets in the area were closed Friday. Troops and police patrolled the town, said ur-Rahman.

In Islamabad, about 300 Shiites protested against the Hangu bombing and criticized the government for not providing adequate security to prevent the attack.

In the southern city of Karachi, prominent Shiite leader Allama Hasan Turabi said the Hangu bombings occurred in part because the government has failed to pursue the masterminds of past suicide attacks.

"The government always shrugged its shoulders by terming every bomb explosion as a suicide bombing so they can get out of the lengthy process of investigation," Turabi said. "There is a need to reach the real masterminds behind these incidents."