At least 6,000 migrants from Eritrea, Ethiopia, Somalia, Sudan and other nations are locked in dozens of detention facilities in Libya, run by militias that have been accused of torture and other abuses. Most of the migrants were apprehended by Libyan coast guards, trained and funded by the European Union, while trying to cross the Mediterranean Sea into Europe.

The detention centers have limited food and other supplies for the migrants, who made often-arduous journeys at the mercy of abusive traffickers. The United Nations refugee agency has said that more than 3,000 migrants are in danger because they are held in detention centers close to the front lines between General Hifter’s forces and the militias allied with the Tripoli government.

The general’s forces began an offensive against the weak Tripoli-based government in April. They control much of the country’s east and south, but they were dealt a significant blow last week when militias allied with the Tripoli government reclaimed the strategic town of Gheryan.

The fighting for Tripoli has threatened to plunge Libya into another bout of violence on the scale of the 2011 conflict that ousted the longtime dictator Col. Muammar el-Qaddafi and led to his death.