PESHAWAR, Pakistan - A suicide bomber struck a neighborhood yesterday that is home to government buildings, along with a nearby church, in Pakistan's main northwest city, killing five people and underscoring that militant groups retain strength despite being under siege by the army.

The attack was the second in three days in Peshawar, and the latest in violence that has killed more than 500 people in Pakistan since October. Insurgents are suspected of avenging a U.S.-supported Pakistani army offensive against the Taliban in a northwest tribal region along the Afghan border.

The bomber walked up to a checkpoint along the road and detonated his explosives when a police officer asked him to stop, city police chief Liaquat Ali said. Ali said that if the officer, who was killed, had not acted, the bomber might have struck a more crowded area, and the death toll might have been higher.

TV footage showed shattered glass and debris covering a wide area. More than a dozen people were wounded in the attack.

Recent militant attacks have struck a range of targets, from markets popular with women to security checkpoints. Yesterday's blast rocked a busy sector of Peshawar where buildings housing the state-run airline, a public school, and a government insurance company are located. A Catholic church was nearby, likely preparing for Christmas Eve services, but the bomber had been walking away from it.

Mian Iftikhar Hussain, the region's information minister, also noted that army installations were close, but he "cannot say for sure what the target was."

Also yesterday, a suicide bomber targeting a procession of Shiites detonated his explosives at the gate of a shrine on the outskirts of Islamabad, said Police Chief Kalim Imam.

Men were making their way to the shrine, with women already inside, as the bomber approached. He set off his vest when police challenged him, Imam said.

Police official Sajjad Hussein said a girl, 4, was killed and a police officer wounded.

Pakistan recently boosted security all over the country, including Peshawar, because it is the Islamic holy month of Muharram, which is often marred by bombings and fighting between Pakistan's Sunni Muslims and its Shiite minority.