Assailants lobbed explosives at Algeria's embassy in the Libyan capital Saturday, wounding three people, a security official said, in an attack claimed by the Islamic State jihadist group.
The IS Libya branch said "soldiers of the caliphate" attacked the empty mission in a message posted on Twitter, together with a photograph of a tree-lined street with a fire in the background.
There was no independent confirmation of the claim -- reported by the US-based monitoring group SITE Intelligence.
The IS posted a similar claim for a December 27 car bomb attack outside the building of a Libyan unit tasked with securing diplomatic missions that left no casualties, SITE reported at the time.
The security official, who works for the unit, said Saturday's attack in central Tripoli seriously wounded a guard and that two passers-by were lightly hurt. Medical sources confirmed the toll.
The assailants threw "a bag full of explosives from a passing car at a police car parked near a guard post", he said, adding that the attack caused damage to the building and parked cars.
But in the brief tweet, the IS said the blast was caused by an explosive device planted by its militants under the guard station.
Foreign Minister Ramtane Lamamra of neighbouring Algeria condemned the bombing. "Any attack on a diplomatic post is a crime under international law," he said.
Saturday's attack came a day after a coalition of militias declared a ceasefire, hours after an agreement at UN-brokered peace talks in Geneva between Libya's warring factions.
The oil-rich nation has been wracked by conflict since dictator Muammar Gaddafi was toppled and killed in a 2011 uprising, with rival governments and powerful militias battling for control of key cities and the country's oil riches.
The foreign ministry of Libya's internationally-recognised government denounced Saturday's bombing as a "cheap attempt to influence the national dialogue in Geneva" that are to continue next week.
The Algerian embassy, like most foreign missions in the Libyan capital, was closed last year as militias battled for control of the city.
In November, two car bombs struck near the shuttered embassies of Egypt and the United Arab Emirates in Tripoli within minutes of each other, wounding five guards.
UAE Foreign Minister Abdullah bin Zayed al-Nahayan blamed those attacks on Fajr Libya and Ansar al-Sharia.
Washington has blacklisted the radical Ansar al-Sharia as a terrorist group for its alleged role in a deadly 2012 attack on the US consulate in the eastern city of Benghazi.
Fajr Libya (Libya Dawn) is a coalition of Islamist-led militias which seized control of Tripoli in August after weeks of deadly fighting with a nationalist group.
The summer fighting sparked an exodus of foreigners from Libya, with oil companies repatriating workers and embassies closing down or relocating to neighbouring countries.
In an interview with AFP, the head of Libya's Western-backed government, Abdullah al-Thani, warned that his country could become a dangerous haven for jihadists.
IS on January 12 claimed the abduction of 21 Egyptians in Libya, while Egypt has confirmed that 20 of its citizens are being held in the chaos-hit country.