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 said authorities would prioritise 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 said.