(Adds details, background)
By Ahmed Elumami
TRIPOLI, April 24 (Reuters) - Libyan officials have opened the doors of a detention centre for illegal migrants in Tripoli, but frightened Somalis and other sub-Saharan Africans told Reuters they had decided to stay there for fear of getting caught up in fighting engulfing the capital.
"We don't want to leave... We have no place to go," said a 20-year-old migrant who gave his name as Daoud, sitting on a mattress in a packed warehouse where 550 migrants have been held.
His pregnant wife sat with other women in a different room also lacking air conditioning, trying to endure the sweltering heat.
More than 3,600 jailed migrants have been trapped in the capital since forces from the east of the country started an advance to capture it, the United Nations says.
On Tuesday, some 12 migrants were wounded when unknown gunmen opened fire on them in a detention centre in a suburb fought over by both sides, a spokesman for the U.N. refugee agency UNHCR said.
Details remain unclear. The injured migrants are being treated in a hospital. Amnesty International called for the incident to be investigated as a war crime.
In the quieter eastern Tajoura suburb, the manager opened the gate of his detention centre housing migrants from sub-Saharan countries such as Eritrea, Somalia, South Sudan and some Arab countries. Everyone stayed, surviving on one meal of pasta a day. On a good day they get two.
Large parts of Libya have been lawless since the overthrow of Muammar Gaddafi in 2011, and the country has become the main transit point for hundreds of thousands of migrants from sub-Saharan Africa and the Middle East attempting the dangerous voyage across the Mediterranean Sea to Europe.
Officials have been accused in the past of mistreating detainees who are held by the thousands as part of European-backed efforts to curb smuggling.
At the Tajoura detention centre, authorities have not supplied any food or water since before fighting started last week, said Nour Eldine Qarilti, the director.
"We have not received any assistance from all international organisations," he told Reuters. "Some local NGOs still support us with simple needs but it's not enough."
Hundreds of migrants lay on mattresses, their few belongings packed in plastic bags or wrapped in towels. Laundry was hanging from the ceiling. Others were using a kitchen to cook lunch for others for a small fee.
According the United Nations, Libya is now hosting more than 700,000 people who have fled their homelands, often trekking through the desert in pursuit of their dream of crossing to a better life in Europe.
They then try to find smugglers to put them on boats. But with Italy and France helping to beef up the Libyan Coast Guard, most now get caught before reaching Europe.
According to one U.N. report last December, migrants and refugees in Libya suffer a "terrible litany of violations" by a combination of state officials, armed groups and traffickers. "These include unlawful killings, torture, arbitrary detention, gang rape, slavery, forced labour and extortion," it said.
A study last month by the Women's Refugee Commission, a U.S.-based charity, said refugees and migrants trying to reach Italy through Libya were victims of horrific sexual violence. (Writing by Ahmed Elumami and Ulf Laessing; Editing by Peter Graff)
Our Standards: The Thomson Reuters Trust Principles.