San Jos - The UN agency for migration is trying to improve "terrible" conditions for migrants detained in Libya, and repatriate those willing and able to go home, its deputy head told AFP."I think there are somewhere around 31 or 32 detention centers, and around half are controlled by, or are in the areas controlled by, the government," Laura Thompson of the International Organisation for Migration said on Wednesday after a migration conference in Costa Rica."I don't think that anybody knows" how many people are being kept in the facilities, where "extremely bad" conditions reign, she said.Not only was there a "lack of food, lack of adequate sanitary conditions, but in addition to that a mix of women, children, men" all thrown in together, she said.Until recently, Libya had been a major launching off point for migrants, most of them from African countries, trying to cross the Mediterranean to Europe.But since July the number of attempted crossings has dropped off dramatically. Libya's coastguard has received European Union funding and training to stop smugglers taking migrants to the water in flimsy boats.But the UN human rights chief, Zeid Ra'ad Al Hussein, last week accused the EU of "turning a blind eye" to the brutality suffered by migrants the coastguard directed into the detention centers.Hundreds of thousands were being subjected to abuses including torture, slave labor and rape, he said.'Vicious circle' Thompson said the IOM was trying to convince the unity government to provide alternatives to detention for women and children. It was also encouraging the Libyan coastguard to follow international standards in order to prevent the "vicious circle of saving people and putting them in detention conditions that are terrible."At the same time, it was sending willing migrants back to their home countries, with some 7 500 repatriated so far this year, she said.Obstacles to the process included some migrants lacking identity papers and many African countries not having consular representation in Libya, she said.Thompson noted that most of the migrants in Libya were there looking for jobs, drawn to its opportunities in its oil sector and once solid tourism industry.But since the end of former dictator Muammar Gaddafi's rule under Nato intervention six years ago, instability and conflict have persisted with the internationally recognized government competing with militias and rival administrations.The IOM has been trying to stem migrant flows from some African countries to Libya. In Niger, for instance, Thompson said the agency had been distributing information about the dire conditions awaiting those still bent on traveling to Libya.