Libya has plunged into chaos since the overthrow of longtime dictator Moamer Kadhafi in 2011, with dozens of armed factions filling the power vacuum. Things are so bad that Libya now has two competing governments, and migrants by the thousands have been fleeing to Europe.
"Migrants continued to be subjected by smugglers, traffickers, members of armed groups and security forces to extreme violence," UN Secretary General Antonio Guterres said in a report, which also said migrants in Libya are subjected to torture, forced labor and rape. The report covered the period April to August.
Representatives of the small UN mission in Libya visited detention centers for unauthorized migrants in Gharyan, Tripoli, Misrata and Surman.
At these centers, the report said, thousands of migrants have been held arbitrarily for prolonged periods of time with no possibility to challenge the legality of their detention.
Signup to our newsletter and follow us on Facebook and Twitter!
"The fundamental rights of migrants must be upheld at all times," Guterres said.
"I call on the Libyan authorities to immediately release the most vulnerable, in particular women at risk, pregnant women, families with children, unaccompanied or separated children and persons with disabilities," he added.
The report was released as the UN Security Council was due to meet later in the day for a meeting on Libya, and as seven African and European leaders met in Paris to talk about how to stem the flow of migrants into Europe from northern Africa in return for aid.
European countries have long sought to cut off clandestine immigration routes across the Mediterranean into the continent, especially from Libya.
In his report Guterres also said that during the period under study, all parties to the fighting in Libya committed human rights violations and violations of international law.
"Armed groups on all sides continued to take hostages, to carry out unlawful killings and to use torture and forced disappearances, including of civilians, in particular women and other persons not involved in the fighting," the report said.