Loose-knit ethnic militias form the backbone of border control in the southern regions of Libya that the government has declared under emergency law.
On the outskirts of Ubari, a remote outpost in Libya's southwest near the Algerian border, armed militia from the Tebu tribe speed across the desert in Toyota trucks towards the sprawling Sharara oil fields.
They, along fighters from the town of Zintan further north, are spearheading efforts - under the auspices of Libya's defence ministry - to secure the oil installation's vast perimeter from sabotage.
They want to protect against attacks such as those last January at the In Amenas gas complex, just kilometres across the border in Algeria, in which militant Islamists conducted a deadly assault, purportedly as a protest against the French-armed intervention in Mali.
Some are concerned Libya's oil compounds could face a similar fate, but Ibrahim Essa, a Tebu leader of Sharara's security force, says that although some Tuareg who disappeared to Mali with heavy weapons are back, they don't pose as much of a threat since revolutionary forces now control the desert.
"Western countries think al-Qaeda is in Libya, but there are only a few", he says. "We know very well Islamic extremists won't fight us here."
A drive across the width of southern Libya is gruelling.
With no roads, the Tebu who inhabit this inhospitable terrain navigate gigantic sand dunes, sharp volcanic rocks and aging mine fields marked by empty gas canisters and makeshift stone piles, with the stars to guide their way.
Travelling the wide expanse are border guards, visiting relatives, and groups smuggling gasoline and people in Toyota four wheel-drive trucks.
People seem to know each other in the sparsely populated land - or of each other - and follow desert etiquette in helping each other out.
Since the start of the conflict in northern Mali, security fears in these areas have heightened, especially after attacks such as last month's bombing of the French embassy in downtown Tripoli.
In particular, control over Libya's long and porous desert frontier with neighbouring Egypt, Chad, Niger, Algeria and Tunisia has been a major Libyan and international security concern since Muammar Gaddafi's regime was toppled in 2011.
"There are a lot of weapons in Libya, and its geographical location makes it useful for linking countries up", a Western diplomat told Think Africa Press on condition of anonymity. "Control of the borders means the ability to move people and weapons, so they are a big prize because they are quite strategic."
Indeed, Libya's borders are a crossing point for both large commercial and subsistence smugglers ferrying subsidised gasoline, migrants, weapons and drugs.
Libya's underground terrain is also rich in oil, rare minerals and the water that feeds the thirst of the majority of the population in cities along the coast.
Closing the borders
Last December, Libya's parliament tried to tackle the lawlessness of the region by temporarily closing the country's southern borders and ruling that the southern areas - west from Ghadames, Ghat, Ubari, Sebha, Murzuq, and across 1,000 km off-road east to Kufra - would be "considered as closed military zones to be ruled under emergency law".
But in reality, the weak, under-resourced Tripoli government has little presence or power in the desert to implement the unclear mandate within this sweeping decree.
Instead, loose-knit militias form the backbone of the area's border control, under the controversial government-sanctioned auxiliary forces, the defence ministry's Libya Shield brigades, and the interior ministry's Supreme Security Committee (SSC).
The indigenous Tebu tribe - a semi-nomadic group with ties across southern Libya and into Sudan, Niger and Chad - played a significant role in the revolt against the former regime and view themselves as natural guardians of Libya's southern border.
The Tuareg - also native to the area, but on the losing side of Gaddafi's war - share cross-border relations with Niger, Mali and Algeria, and unofficially control territory along Libya's western flank.
These two groups share a history of discrimination in Libya under Gaddafi. The dictator's 'Arabisation' campaign attempted to erase indigenous culture and language, and branded those not registered under the 1954 citizenship law as 'foreigners'.
Consequently the Tebu and Tuareg were deprived of healthcare and education, as well as skilled jobs and government positions.
At the onset of the 2011 uprising, Gaddafi promised them rights if they joined his fighting forces. The Tuareg threw their support behind the regime, while the Tebu took Gaddafi's weapons and then turned them against him.
But now, despite having fought on opposing sides of the revolution, Libyan Tebu and Tuareg communities coexist in relative peace.
They do not want to fight each other, but instead showcase their desert expertise in the struggle for a place at the new Libyan table.
But the same is not necessarily true of relations with other groups.
In the power vacuum following Gaddafi's demise, there have been bloody clashes in Sebha and Kufra between the Tebu and local Arab tribes, mostly over the lucrative business of cross-border smuggling.
The elders of the fighting Tebu and Awlad Suleiman tribe in Sebha have recently engineered a reconciliation agreement.
But in the remote oasis of Kufra - surrounded by a gigantic wall and deeply segregated between an embittered Zwai and minority Tebu population - the small town is dangerously on edge.
Each tribe runs its own militias, most of which are embedded in government auxiliary forces. "At the moment there are a number of different groups on the ground", says the Western diplomat.
"But there needs to be clear official endorsement, and the weaving together of a unified national force to provide border security."
Since NATO's intervention in Libya's uprising, invested countries like the UK, France, Italy and the US have rushed to provide advisors and, unofficially, clinch arms deals with the new Libyan government's military and policing apparatus.
In neighbouring Niger, the US Africa Command (AFRICOM) has just established a military base for Predator drone surveillance, and the controversial US Joint Special Operations Command (JSOC) is working with the Pentagon and CIA on a 'kill or capture' list for Libya.
American arms manufacturers and security companies are eager to gain a foothold, but have to navigate a knot of US regulations - leftover from the Gaddafi era - for licences to do business, which is currently a deterrent.
In April, the UK moored a Navy ship in Tripoli's harbour to showcase the latest in their security equipment and services, and Prime Minister David Cameron personally visited Libya to sell British weapons systems. France and Italy are also competing to sell arms.
The European Union meanwhile, which has just arrived to spearhead an advisory border guard, is regarded as late on the scene, and potentially hamstrung by security considerations.
But amidst all this Western interest, Libya's central government remains in chaos, in a country already awash with weapons.
Officially-sanctioned militias finally lifted a siege of ministries after the 'Isolation law' - which is widely interpreted as expelling or barring anyone from office who has been affiliated with the previous regime's four-decade rule - was pushed through.
But the defence and interior ministries remain in turmoil, and there is confusion over who holds the valuable border portfolio - the Army's southern command, or the defence ministry's border control commander.
With so much strategic planning and lucrative deals on the line, foreign embassies and businesses face the vital question of who exactly to conduct business with.
Meanwhile, Libyan citizens are left in highly uncertain circumstances.
"This revolution is only two years old", says Baraka Adam, a Tebu chief, back in Ubari.
"When Gaddafi came to power for the first three years he was a good man. And then he changed. It's too early to tell the future. But I am not 100% confident to predict that it will be better than before."
Rebecca Murray is a freelance journalist who has reported extensively throughout the Middle East for publications including Al Jazeera English and Inter Press Service news agency.
Murray was based in Libya throughout 2012, where she mostly wrote about the tribes along the border.
She is a contributing author to a book about the Libyan revolution, to be published by Oxford University Press later this year.