After wasting their youth in the shadow of Sudan’s brutal civil wars, Ado Adem and his wife Eqbal took their two children and decided to make a run for it. They picked up and left their country more than two years ago. Kids in tow, they headed through Chad to Libya in the hope of finding a more peaceful land.

Instead, trapped inside Tripoli amid a two-month conflict pitting Libyans against each other, they find themselves caught up in yet another of Africa’s wars.

“I left Sudan with the aim of staying in Libya, at least for a little while,” says the 25-year-old labourer, the father of a five-year-old boy and four-year-old girl. “But my aim now is to go to Europe, where there’s security and safety, and where I can maybe find a better life for my children.”

Thousands of migrants seeking to pass through Libya have been caught up in the ongoing battle on Tripoli’s outskirts between the forces of Khalifa Haftar and those militias and armed groups loyal to the UN-backed authority in the capital.

Some 75,000 people have been displaced by the conflict, including migrants who lack family networks, resources or access to government aid. The UN has voiced concern for refugees stuck at detention centres in or near the war zone.

“Nearly 3,400 refugees and migrants are trapped in detention centres exposed to, or in close proximity to, the fighting,” Ghassan Salame, UN envoy to Libya, told the Security Council on 21 May.

Battle for Tripoli: In Pictures Show all 10 1 /10 Battle for Tripoli: In Pictures Battle for Tripoli: In Pictures Screengrab from a video published on the LNA’s War Information Division’s Facebook page on 16 April shows a fighter running while firing a machine gun reportedly in a southern suburb of Tripoli AFP/Getty Battle for Tripoli: In Pictures Smoke rising from an airstrike behind a tank belonging to forces loyal to Libya’s Government of National Accord during clashes in the Tripoli suburb of Wadi Rabie AFP/Getty Battle for Tripoli: In Pictures Fighters loyal to the government run for cover during clashes with forces loyal to Khalifa Haftarsouth of the capital Tripoli's suburb of Ain Zara, on 25 April 2019 AFP/Getty Battle for Tripoli: In Pictures Forces loyal to the internationally recognised Government of National Accord (GNA) take aim during clashes with forces loyal to strongman Khalifa Haftar south of the capital Tripoli's suburb of Ain Zara on 23 April 2019 AFP/Getty Battle for Tripoli: In Pictures A displaced Libyan family, who fled their house because of the fighting in Tripoli, sits at the industrial complex, which is used as a shelter, in the capital on 16 April 2019 Reuters Battle for Tripoli: In Pictures A technical (pickup truck mounted with a turret) firing reportedly during clashes with forces loyal to Libya's UN-recognised Government of National Accord (GNA) on the outskirts of the capital Tripoli on 24 April 2019 AFP/Getty Battle for Tripoli: In Pictures Government forces look out from a destroyed building in the Khallat Farjan area of Tripoli on 20 April 2019 Reuters Battle for Tripoli: In Pictures A Libyan fighter loyal to the Government of National Accord (GNA) fires a machine gun during clashes with forces loyal to strongman Khalifa Haftar south of the capital Tripoli's suburb of Ain Zara, on 10 April 2019 AFP/Getty Battle for Tripoli: In Pictures Two men stand at the scene of an overnight rocket attack, which no group claimed responsibility for so far, in the Libyan capital of Tripoli on April 17 Photos AFP/Getty Battle for Tripoli: In Pictures Libyan National Army members, commanded by Khalifa Haftar, head out of Benghazi to reinforce the troops advancing to Tripoli on April 7 2019 Reuters

“The UN humanitarian agencies have been working around the clock to transfer the most vulnerable from the conflict-affected areas to safer locations.”

Migrants from Africa and other countries as far afield as Iraq or Bangladesh make their way to Libya by paying unscrupulous smugglers, who then place them on rickety rafts and point them in the direction of the Italian island of Lampedusa, about 180 miles away. Many drown when their boats capsize, their bodies washing up along Libya’s coastline. Other migrants from neighbouring Mali, Chad, and Niger come to Libya to work, earning cash to take back home.

The latest conflict in Tripoli has upended their lives, but also reinforced their determination to leave what they describe as the hellish environment of Africa for better lives on the other side of the sea.

Mr Adem and his family made their way from their homeland in Sudan’s war-torn Kordofan district through Chad and across Libya. They paid smugglers along the way to take them to the Mediterranean coast.

Migrants from sub-Saharan Africa seek refuge but find war in Libya’s capital, Tripoli (Borzou Daragahi)

It was the first time any of them had seen the sea, and they were full of hope. But the boat they boarded to head to Europe was intercepted by the Libyan coast guard, and they were pulled back to Tripoli and placed into a detention centre in the city’s Wadi Rabiya district.

The fighting began 4 April. For days Mr Adem, his kids and his now-pregnant wife huddled in the shelter, terrified that a stray rocket might hit the building.

“There were heavy clashes, and I was scared,” he says.

After seven days a volunteer from the Red Crescent Society came to guide them to safety. They left on foot heading towards a main street, where a car was waiting to take them and another family away. They were placed in the schoolhouse in central Tripoli where they are now being held.

The UN High Commission on Refugees has bluntly stated that “Libya is not a safe port” for migrants and refugees, and urged authorities not to place them inside the country. But the Libyan coast guard continues to capture passengers at sea and bring them back to shore as part of a series of deals forged with Italy and other European countries.

Some of the travellers who have found their way to Tripoli have suffered immensely along the way or back home. One woman describes how her four-year-old son was so traumatised by the experience of travelling through the desert and the recent fighting that he refused to play with any of the other children, and was in need of trauma counselling.

Other appear to have bona fide claims to political exile status. Jihan al-Ahmed, 27, left Sudan with her two daughters eight months ago, escaping incessant war in the Darfur region. During the weeks-long journey, she says her husband, Alawiya Darfala, 32, went missing. He was offered a day of work, and never came back.

“I have no idea where he is,” she says. “He was kidnapped by a gang.”

Jihan Ahmed fled war in Sudan to Libya with her two daughters and husband, whom she lost along the way. She is now seeking refuge in Libya (Borzou Daragahi)

Once she got to Tripoli, she says she was sexually assaulted, but was murky on details. She was housed for months in a multi-storey building along the Swani district of eastern Tripoli, when the conflict began.

“We were stranded with nowhere to go for days,” she says. “There were snipers on the roof firing at the other side, so we got scared and that the building would be targeted.”

With her daughters, she made her way towards the centre of the city and the schoolhouse, which is run by the Libyan Red Crescent society and depends on donations, volunteers and UN aid to function.

The school is modest but well-kept, and volunteers work with residents to clean the floors and prepare meals. Despite the generosity she’s been given, Ms Ahmed said she has no plans to remain in Libya.

Support free-thinking journalism and attend Independent events

“I’m only using Libya to get to Europe,” she says. “Europe is stable, secure, There are human rights. I will get a better education for my daughters.”

The current conflict has even enticed migrants who work in Libya and had no previous plans to head to Europe to consider the option. As Libya collapses, so do their hopes.

“There are some people I know are saying they want to leave, because of the rate of the dollar and the insecurity here,” says Daniel Oluwafemi, a 35-year-old Nigerian working at a job in a central Tripoli cafe. “My advice to them is don’t risk life your life in the sea.”

France has given tacit backing to Mr Haftar in the hope that he can restore stability to lawless Libya and put a stop the migrants trying to make it to Europe. But others warn that a Haftar victory could generate even more chaos and weaken the ability of western Libyan security forces to maintain control, and could result in even more migration.