Diplomats are warning of growing Islamist violence against Western targets in Libya as blowback from the war in Mali, following last week's attack on the French embassy in Tripoli.
The bomb blast that wrecked much of the embassy is seen as a reprisal by Libyan militants for the decision by Paris the day before to extend its military mission against fellow jihadists in Mali.
Jihadist groups ejected from their Timbuktu stronghold have moved north, crossing the Sahara through Algeria and Niger to Libya, fuelling a growing Islamist insurgency.
"There are established links between groups in both Mali and Libya - we know there are established routes," a Western diplomat in Tripoli said. "There is an anxiety among the political class here that Mali is blowing back on them."
That anxiety escalated last week after militants set off a car bomb outside the French embassy, wounding two French guards and a Libyan student, the first such attack on a Western target in the capital since the end of the 2011 Arab spring revolution.
"The armed groups we are fighting are fleeing to Libya," said Colonel Keba Sangare, commander of Mali's army garrison in Timbuktu. "We have captured Libyans in this region, as well as Algerians, Nigerians, French and other European dual-nationals."
France sent troops to Mali in January after an uprising in the north started by the ethnic Tuareg National Movement for the Liberation of Azawad (NMLA), named for the independent state it hopes to create.
The impetus for the uprising came from ethnic Tuareg soldiers who fought alongside Muammar Gaddafi and fled south when his regime fell. They were later augmented by jihadists from Libya and across north Africa, who triggered international condemnation for their destruction of ancient Sufi shrines in Timbuktu. The fear across the Maghreb is that the French operation that has pushed them out of the northern cities has compounded problems elsewhere in north Africa as jihadist units disperse.
"If you squeeze a balloon in one part, it bulges out in another," said Bill Lawrence, of International Crisis Group. "There's no question that the French actions in Mali had the effect of squeezing that balloon towards Algeria and Libya."
Diplomats say jihadists cross the Sahara to join cadres in Libya's eastern coastal cities Benghazi and Derna. Police stations in both cities have been hit by bombings in the past few days, part of an insurgency that threatens to undermine the country's fragile new democracy.
"From the perspective of an Islamist, it makes sense," said Dr Berny Sebe, an expert on the Sahara region from Birmingham University. "If you are in northern Mali, the best thing that you can do is to make your way across Niger and then into southern Libya, where there is no state control."