The UN Refugee Agency UNHCR said Tuesday it had relocated more than 150 refugees from the Ain Zara detention center in south Tripoli to a gathering and departure facility in a nearby safe zone.
Heavy clashes had impacted the Ain Zara detention center for the past few days, UNHCR said in a statement.
Refugees told the agency they were frightened and worried about their safety, given ongoing fighting near them, saying they had minimal supplies.
In the statement, UNHCR quoted its Libya deputy chief Matthew Brook as saying: "Many refugees and migrants in Libya endure terrible depravations. They are now at grave additional risk."
Earlier on Tuesday, UN High Commissioner for Human Rights Michelle Bachelet reminded all parties to the conflict in Libya that under international law they must ensure the protection of civilians and civilian infrastructure.
In a statement, she urged those involved in the conflict to take measures to ensure civilians do not again bear the brunt of the fighting.
"The people of Libya have long been caught between numerous warring parties, with some of the most vulnerable suffering some of the gravest violations of their human rights," Bachelet said.