(Recasts with bomb blast)
By Alamgir Bitani
PESHAWAR, Pakistan, Aug 19 (Reuters) - A suspected suicide bomber killed 23 people in the compound of a hospital in northwest Pakistan on Tuesday as members of a religious minority were holding a protest, police said.
Violence in northwest Pakistan is a major test for the coalition government led by the party of slain former prime minister Benazir Bhutto, especially after the resignation of former army chief Pervez Musharraf as president on Monday.
The bomb went off outside a hospital in Dera Ismail Khan, 280 km (175 miles) southwest of Islamabad, as Shi'ite Muslims were protesting against the killing of a leader. Gunmen shot the leader earlier and his body had been taken to the hospital.
North West Frontier Province police chief Naveed Malik Khan said 23 people had been killed in the blast, and up to 20 wounded. He said Sunni Muslim militants were believed responsible.
"This area has been hit by sectarian violence for many years and this is also a sectarian-related incident," Khan said.
Most of the dead were protesters, a city official said.
Musharraf oversaw security after he threw Pakistan's support behind the U.S.-led campaign against terrorism. His departure has raised questions about the government's commitment, even though it has made security a priority.
The United States and other allies are keen to see Islamabad turn its attention to security and pressing economic problems now that the controversy over Musharraf is out of the way.
Since July last year, Pakistan has suffered a wave of militant violence in which hundreds of people have been killed, including many security forces members.
Violence subsided after the coalition government came to power in March and opened talks with militants.
But the lull ended and militants stepped up attacks after their top leader, Baituallah Mehsud, suspended talks in June.
Photographer Mustansar Baloch was slightly wounded in the blast at the hospital as he was covering the protest.
"I couldn't see or hear anything for some moments after the blast but then I saw bodies lying on the ground and the wounded were screaming," Baloch said.
Police said the attack was a result of sectarian rivalry between minority Shi'ites and majority Sunnis. Shi'ites make up about 15 percent of Pakistan's population of 160 million people.
Thousands of people have been killed in tit-for-tat sectarian militant attacks in Pakistan over nearly three decades.
Separately, Pakistani security forces killed at least 20 Islamist militants in a clash in Bajaur tribal region, a known sanctuary for al Qaeda and Taliban militants on the Afghan border, a government official said.
The fighting erupted about 25 km (15 miles) east of Khar, the main town in the region, on Monday evening after militants attacked several security checkposts.
"The exchange of fire lasted for about nine hours and we have reports that at least 20 militants were killed," Mohammad Jameel, a senior government official in Bajaur, told Reuters by telephone.
Heavy fighting erupted in Bajaur early this month when Pakistani Taliban militants attacked a security post.
According to government estimates, about 170 people have been killed while about 100,000 villagers have fled the region. (Reporting by Sahibzada Bahauddin; Writing by Kamran Haider; Editing by Jerry Norton)