As Libyans set about rebuilding their nation one year after the outbreak of a revolt that toppled Moamer Kadhafi, thousands of immigrants are trapped in makeshift detention centres, denied the chance to work, but with no way home.
In the mountainous city of Gheryan southwest of Tripoli, 950 migrants -- some originally bound for Europe, others seeking a better life in Libya -- are held at one such site, overstretched like so many others across the country.
"We need to start deporting them -- we are simply full," said Imad Saqir, an English teacher who acts as coordinator for the handful of wardens overseeing the Italian-built complex, where each block is designed for 52 people, but holds more than 60.
"Some of them are innocent, people who heard in the local news that Libya needs a lot of labour," Saqir said, while others are victims of trafficking, sent from their home country to a recipient in Libya without a penny on them.
Those held in Gheryan mostly hail from Chad or Nigeria, but the complex houses other sub-saharan Africans chasing higher income opportunities -- from Burkina Faso, Ghana, Ivory Coast and Niger -- as well as Egyptians.
Militias detained the majority of them at checkpoints in and around the area, on the basis that they had no entry stamps on their passports. Some were relocated from camps further afield, in Sabha and Sabrata.
With its vast desert borders and lax monitoring policy, Libya has for years served as a destination and a transit country to European shores for hundreds of thousands of African immigrants.
But there are no official figures, and it is hard to draw the line between legal and illegal migration.
"There is no clear framework on migrants in Libya," said Laurent Grosbois of the UN refugee agency, who says the country hosted more than three million foreign workers before the war last year that ousted Moamer Kadhafi.
"The line is blurred because the information is not always very clear, both for the people moving -- the migrants -- and those who are enforcing the law," Andria Kenney of the International Organisation for Migration (IOM) told AFP.
Many of those detained in Gheryan are newcomers who travelled in groups, lured by the promise of work rebuilding Libya, of starting afresh and making a quick buck in the oil-rich nation.
"The new arrivals have the idea that because the borders are so lax this is their chance," Kenney said, adding that once they arrive, the reality is much tougher than what they anticipated.
Racism and the belief that Kadhafi heavily recruited sub-Saharan mercenaries during the war have made dark-skinned Libyans and black Africans a recurring target of theft, and abuse by armed brigades, according to rights groups.
"A lot of them are in hiding and are afraid of coming outside," Kenney said.
Some male detainees pointed to nicks and cuts on their heads and bodies as evidence of beatings at the hands of their captors, who claim they are keen to transfer their responsibilities to the interim government or aid agencies.
Women, some of them pregnant, bemoaned being separated from their spouses.
Signup to our newsletter and follow us on Facebook and Twitter!
"My husband had been working in Zawarah for more than a year, then he came to get me in Nigeria," said a subdued and pregnant Precious Oyumayu, age 23.
"We came here to find money but they tell us they don't need blacks in their country. Now we have to go back but we have no money," she said.
Many of the detainees openly admit to not having an entry stamp but argue that they are not at fault.
"I spent two years living in Libya working as a farmer in Zawiya," Walid Abdelaty, 27, told AFP. "Twelve of us came in across the border but no one stamped our passports, we just passed."
Arun Kulwali, a 23-year-old mason from Mali, entered from Algeria.
"They have no (entry) stamps, even if you present a passport," he charged.
A Nigerian minor, 17-year-old Abdullah Issa Salam, summed up the situation: "Sure, there are people manning the border outposts but as long as you give them money, you are sure to pass, passport or not."
Kenney agrees that much of the confusion stems from a lack of clear information.
"On paper they broke the law but so many of them are not informed or were given the impression that they are following the right rules. They are just unaware so it is a shame that they are getting punished for it."
Citing "enormous problems" caused by the influx of thousands of migrants, Libya's interior minister in January urged Europe and neighbouring countries to help deal with the flow, by rehabilitating 19 detention centres and setting up better border surveillance.
Fawzi Abdelali also warned Libya would not be the "border guard" of Europe although in reality brigades have been deployed with the specific mission of monitoring borders to the south, according to sources familiar with the issue.
Kadhafi used immigration as a means to pressure the West, and one year ago he asked the European Union for billion of euros annually, to stop illegal trafficking.
But the issue was swept aside in the tumultuous events of 2011, and today resources are severely lacking at the Gheryan detention centre.
"We have a shortage in everything," said Saqir, complaining that despite community donations and some help from aid agencies, at least 300 people still lacked blankets.
From behind barred, padlocked doors, a chorus of tightly confined detainees complain of hunger pangs and the spread of disease in the absence of ventilation and sufficient water to address hygiene needs.
"They say they cannot feed us. So they should let us free to work," said one.