At least 12 people were killed and 27 others wounded Tuesday in an attack on Pakistan¡¯s capital, Islamabad, according to officials. It was the first major attack to hit the city in more than a decade and comes as Pakistan is facing a resurgence of assaults by several insurgencies.

An attacker detonated a bomb near the entrance of a courthouse around lunchtime, according to the Pakistani interior minister, Mohsin Naqvi. He said the attacker had tried but failed to enter the court complex, with hundreds of lawyers, defendants and judges inside. The attacker died at the scene, authorities said.

The attack has raised alarm that insurgent violence, confined in recent years to Pakistan¡¯s western regions, has reached its urban centers. Islamabad, a quiet, leafy city of a million people, is the seat of political power and home to embassies and the headquarters of many international organizations.