A hundred meters from the office of Libyan Prime Minister Fayaz al-Sarraj in Tripoli, guards at a detention center for migrants had a message for a visiting French delegation: no minister, no journalists, nobody is allowed in, according to Reuters.
French Foreign Minister Jean-Yves Le Drian went to Libya on Thursday to revive UN talks between rival groups controlling the west and east, with a view to stabilizing a nation in turmoil since the fall of Muammar Gaddafi in 2011.
But the Tripoli leg of the visit showed how difficult it will be to find anyone capable of imposing authority, with a UN-backed government depending on an array of armed factions, each with its own agenda.
After meeting Sarraj in his impressive office, Le Drian was meant to visit the nearby detention facility to see conditions for African migrants caught as they try to reach Europe.
But after CNN aired a video appearing to show migrants being auctioned off as slaves, Libyan officials are on edge, with guards refusing to let the French visitors through the detention camp's thick steel door.
"What do you want to call it?" said a visibly tetchy man who described himself as the supervisor. "It is a detention center. Nobody is allowed. Not the minister and not journalists. Not allowed."
French officials played down the incident, telling Reuters there had been no time for a visit anyway. But it was symptomatic of how Sarraj's government is struggling to make an impact, failing to fix anything from electric power cuts to a collapsing currency.
Sarraj promised to tackle migrant trafficking, but French officials say that will depend on which armed groups are prepared to help him.
While armed factions are vying for control in Tripoli, power in Benghazi is in the hands of one man, General Khalifa Haftar, whose forces have driven out Islamist fighters.
"It's a lot more ordered here. There's no doubt here that there is just one chief," said a European security contractor in Benghazi.
Haftar's Libyan National Army is made up of different groups, which he struggles at times to control. But the general, who hopes to run for the Libyan presidency next year, sought to impress his French visitor with as much fanfare as possible.
Soldiers stood at strategic points, uniforms spotless and boots polished, in contrast to other parts of Libya, where armed groups are more informally dressed in a mixture of uniforms and civilian clothes.
Opponents accuse Haftar of high-handedness and of trying to revive a police state, something his supporters vehemently deny.
He did not leave his office during the French visit, leaving Le Drian to review air, sea and land forces as a military band struggled to play La Marseillaise.
Haftar's aides did not allow journalists to film his meeting with le Drian with their phones.
"I appreciate the frankness of our exchanges," Le Drian said after an hour-long discussion. "That's quite natural," Haftar responded loftily.
Haftar is attempting to position himself as a presidential candidate, but there is still sporadic fighting in Benghazi despite his having declared victory in July.
One diplomat recalled how Haftar was envious of Sarraj after he met US President Donald Trump in Washington last month, perhaps sensing a shift in the Libyan balance of power.
"I don't know how comfortable he (Haftar) is feeling, because I sense that this time the security was much more stringent than when we were last here (in August)," said a French official. "He may be feeling some pressure."