A bomb exploded at the gate of the Moroccan embassy in the Libyan capital early on Monday, causing some damage but hurting nobody, a security official said, only hours after gunmen attacked South Korea's mission in Tripoli.
Militants claiming loyalty to Islamic State said on twitter they were responsible for both attacks, the latest strikes against foreigners, embassies or oilfields in Libya. It was not possible to verify the authenticity of the claims.
(WATCH VIDEO: The rise of ISIS in Africa)
Islamic State militants have exploited chaos in the North African country where two governments allied to a host of armed groups fight for control four years after the ousting of Muammar Gaddafi.
The bomb damaged the gate and a residential building next to the Moroccan embassy located in the up market Ben Ashour district, a security official and Reuters reporter at the scene said.
Nobody was hurt by the blast early on Monday, the official said.
On Sunday, gunmen fired shots at the South Korean embassy in Tripoli killing two local security guards and wounding a third person, South Korean and Libyan officials said.
A South Korean foreign ministry official in Seoul said there were no Korean casualties, adding that the embassy was staffed by two foreign service officials and one administrative staff member. He said the government was considering relocating, but did not elaborate.
Libyan militants professing loyalty to Islamic State have claimed several high-profile attacks on foreigners in Libya this year, including an assault on the Corinthia Hotel in Tripoli and the beheading of 21 Egyptian Christians.
(WATCH VIDEO: Boko Haram pledges allegiance to ISIS)
They have also claimed several assaults on embassies such as those of Egypt and Algeria in Tripoli, attacking mostly empty buildings as most countries have pulled out diplomatic staff because of the security situation.
Libya's internationally recognized government has been based in the east since a rival faction called Libya Dawn seized Tripoli in August, setting up a rival administration.