Hundreds of migrants left on a bare floor after being transferred to a detention centre by Libyan authorities.
A few hours earlier, they had left a previous centre, Tarek el-Matar near Tripoli airport, after fighting erupted between rival militias.
According to Libyan media sources, the building they lived in was hit by a bomb during the violence.
The government denied these allegations. But the Libyan illegal immigration control agency has confirmed this.
According to a humanitarian official, up to 1,800 migrants may have evacuated the detention centre to an unknown destination.
Hundreds of African migrants who fled the violence in Tripoli to a farm land south-west of the capital have been relocated to a detention centre on Tuesday.
“Today a number of migrants were released who had escaped from the Hamza camp due to the clashes in Matar road. They are currently in a farm in Krimiya district and will be transferred to another detention centre for migration (in Tripoli)”, said Libyan security official, Ahmad Kamoon.
The migrants escaped from a detention centre on Tuesday morning as fighting between rival groups raged nearby.
Some narrate the ordeal.
“There were shootings at night and five people got shot. This morning another one got injured,” said Omar Abdullah, an Eritrean migrant. “There was no bathroom, they were dirty, we did not have a shower for three, four, five days, and when we asked about the manager no one answered us. That’s why we escaped and came here, one was shot when we were coming here.”
Libya is a major departure point in North Africa for migrants crossing the Mediterranean Sea to Europe, mainly from other parts of Africa.
Most of these migrants were jailed after the Libyan coast guard intercepted their makeshift boats bound for Italy.
With fighting entering its second week, the UN said earlier on Tuesday that a ceasefire between armed factions had been reached.
It was not clear how the ceasefire would be implemented as militias have ignored previous calls to lay down arms by the U.N.-backed government.