Two car bombs struck near the shuttered Egyptian and United Arab Emirates embassies in Libya's militia-controlled capital within minutes of each other Thursday, an AFP correspondent and a UAE official said.
Two guards posted outside the empty Egyptian embassy compound were wounded in the first blast, Libya's LANA news agency reported.
Three more posted outside the empty UAE compound were wounded in the second, a senior official told AFP in Abu Dhabi.
Both governments are considered hostile by the Islamist-led militias which seized Tripoli in August in an offensive during which UAE warplanes carried out strikes against them from neighbouring Egypt.
UAE Foreign Minister Abdullah bin Zayed al-Nahayan denounced the attack against his country's embassy as a "terrorist act" and blamed it on Islamist militias 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, where it is largely in control.
Fajr Libya (Libya Dawn) is a coalition of Islamist militias which seized Tripoli in August after weeks of deadly fighting with a nationalist group.
Nahayan, in a statement carried by state news agency WAM, said the bombing "badly damaged" the embassy and wounded three people in the area.
The first bomb went off in a car park close to the Egyptian embassy, shattering several of its windows, the AFP correspondent reported.
The second went off minutes later just outside the UAE mission compound, wounding three non-Emirati guards, the official in Abu Dhabi said.
"This is an indication of the state of lawlessness in the Tripoli area," the official said, speaking on condition of anonymity.
He said the blast showed the need for greater support of Libya's internationally recognised government, which took refuge in the remote east of the country after the militia takeover of the capital.
Signup to our newsletter and follow us on Facebook and Twitter!
"The unruly condition that we are seeing will deteriorate further if the extremist militias continue to control the Libyan capital," he said.
The recognised government's foreign ministry said such attacks were the result of "the absence of the legitimate state in Tripoli, now in the hands of armed militias which use the threat of arms against citizens, public institutions and diplomatic missions".
- Support for ex-general -
A Libyan security official, who works for a unit in charge of protecting embassy and diplomatic staff, said police were investigating the bombing and studying footage from CCTV cameras.
He also linked the attacks to "support" by the governments of Egypt and Abu Dhabi for Khalifa Haftar, a former general who has launched an offensive on Islamists in Benghazi.
"This is not the first time that the embassies of those two brotherly countries are targeted... due to their continued support for Haftar's forces," he said.
He said Islamist militias had accused Cairo and Abu Dhabi of supplying Haftar with weapons and of helping him with air strikes.
Washington said Abu Dhabi launched air strikes against militia fighters from an Egyptian base in August in a failed bid to prevent their capture of Tripoli airport.
The foreign ministry in Egypt, which has denied participating in the raids, also denounced Thursday's "terrorist bombings".
Egypt closed its embassy in Tripoli in January and the UAE followed suit in May as security conditions in the capital deteriorated.
Three years after dictator Moamer Kadhafi was toppled and killed in a NATO-backed revolt, Libya is awash with weapons and powerful militias, and run by rival governments and parliaments.
Sudan said Thursday it is organising a December 4 meeting of Libya's neighbours to discuss the lawlessness and violence in the North African country.