A suicide attack outside a court in Pakistan's capital Islamabad has killed 12 people and injured at least 27 more, the country's interior minister said.

Mohsin Naqvi said a bomber was planning to attack the district courthouse - but was unable to get inside.

Naqvi emphasized that authorities would prioritize identifying the bomber, and that those involved would be brought to justice.

Suicide blasts in Islamabad have been rare in recent years. Footage from the scene on Tuesday showed the remains of a burnt-out car and a police cordon in place.

The 27 people injured are receiving medical treatment, Naqvi added. The attacker detonated the bomb close to a police car after waiting for up to 15 minutes.

Pakistani President Asif Ali Zardari condemned the suicide blast, expressing his condolences to the victims' families.

A lawyer named Rustam Malik, who was parking his car outside the court at the time, described hearing a loud bang. He reported chaos as lawyers and people were running inside the complex and stated, I saw two dead bodies lying on the gate and several cars were on fire.