Two bombs exploded at the gate of the Iranian ambassador's residence in the Libyan capital Tripoli on Sunday although nobody was hurt in the blast, Libyan security officials said.
Iran's official IRNA news agency confirmed the blasts and that there had been no casualties, adding that Iran had previously suspended operations at its embassy.
"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.
A Reuters reporter at the scene saw the second device going off some 30 minutes after the first one. Minor damage could be seen at the gate.
Libya's internationally recognised government and the elected House of Representatives has been forced to work out of the east since a group called Libya Dawn took control of the capital, reinstated the previous assembly and installed a rival administration.
The eastern-based government is recognised by the United Nations and Western powers. The Tripoli administration is not, but still controls ministries, airports and some oil facilities.
In January, gunmen claiming loyalty to Islamic State stormed the Coronthia luxury hotel, killing around nine people, among them five foreigners.