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.
One official told Tripoli television station al-Nabaa that the residence, located in a central district of Tripoli, was empty at the time, as was the residence underneath.
"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 al-Nabaa.
Other foreign missions in the capital, such as the embassies of Algeria, Egypt and the United Arab Emirates, have also been the targeted with bombings, again with no casualties.
Most Western nations and the United Nations moved out their staff last year during fighting between rival factions vying for control of Tripoli, four years after the fall of Muammar Gaddafi.
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.