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 stated 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 showed the remains of a burnt-out car and a police cordon in place.

The 27 people injured are receiving medical treatment, Naqvi said. He added that 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. A lawyer present during the incident described hearing a 'loud bang', leading to chaos as people sought shelter. Rustam Malik told AFP, 'Lawyers and people were running inside the complex.' He added, 'I saw two dead bodies lying on the gate and several cars were on fire.'