The damage caused by today's bomb attack on Iran's embassy in Tripoli, Libya. (Reuters)
The damage caused by today's bomb attack on Iran's embassy in Tripoli, Libya Reuters

Militants loyal to Islamic State (Isis) have claimed responsibility for a bomb attack on the Iranian embassy in the Libyan capital Tripoli.

Two bombs exploded at the gates of the Iranian embassy, but no-one was hurt in the blast, reports al-Jazeera.

"Two devices were laid, one exploded first and then the other. The point of the second bomb was to create confusion," Colonel Jumaa al-Mashri from the National Security Agency told Tripoli-based al-Nabaa television on Sunday, reports the network.

Witnesses said that the windows of the nearby Ukrainian embassy were shattered in the blast, reports AFP.

The Iranian ambassador to Turkey was not in the residence, which has been empty since 2012, reports AP.

"It's a huge symbolic target for Isis linked militant groups in Libya," Fawaz Gerges of the London School of Economics told al-Jazeera, with Isis styling itself as the defender of Sunni Muslims against the Shia and their Iranian backers.

Many embassies in the city have been closed since 2014, with armed militias battling for control of the city and the security situation spiralling downwards.

In January, Isis claimed responsibility for an attack on the empty Algerian embassy in Tripoli, in which a guard and two passers-by were injured.

In recent months, Isis has taken advantage of the chaos in Libya to seize control of areas in the north-east of the country.

Last week, the group released a video of 21 Coptic Christians being executed in Libya, in the group's first official video produced outside the territory it controls in Syria and Iraq.