Sweeping raids in Libya targeting mostly irregular migrants left at least one person dead, 15 wounded and 4,000 in detention, the UN said, stressing that authorities must respect human rights.
Libyan authorities had labelled as an anti-drug operation the raids on houses and makeshift shelters in Gargaresh, a poor suburb of the capital Tripoli, on Friday and Saturday.
The UN Support Mission in Libya (UNSMIL) said Libyan security forces had opened fire during the raids and that "one migrant was killed and at least 15 others injured, six seriously".
"Unarmed migrants were harassed in their homes, beaten and shot," it said in a statement late Saturday, adding that six migrants had reportedly sustained gunshot wounds.
The North African country, in chaos since its 2011 revolution, is one of the main departure points for tens of thousands of migrants, mainly from sub-Saharan Africa, hoping to reach Europe.
Official centres for migrants detained in war-battered Libya are riddled with corruption and violence, including sexual assault, according to the United Nations and rights groups.
The UN mission said that, while the state must maintain law and order, it also urged it to respect "the human rights and dignity of all people, including migrants and asylum-seekers".
Citing officials of Libya's Directorate of Combatting Illegal Migration, it said that "at least 4,000 people, including women and children, have been arrested" - vastly more than the several hundred initially reported - and that most of those "are now being arbitrarily detained".
The UN mission recalled that it had "repeatedly condemned the inhumane conditions in Libya's detention centres, where migrants and refugees are held in overcrowded facilities with restricted access to vital humanitarian assistance".