First group expected to leave dire detention centres in days, as UN denies reports that plan is part of EU strategy to keep refugees from Europe

Hundreds of African refugees and asylum seekers trapped in Libyan detention centres will be evacuated to Rwanda under a “life-saving” agreement reached with Kigali and the African Union, the UN refugee agency said on Tuesday.

The first group of 500 people, including children and young people from Somalia, Eritrea and Sudan, are expected to arrive in Rwanda over the coming days, out of 4,700 now estimated to be in custody in Libya, where conflict is raging. The measure is part of an “emergency transit mechanism”, to evacuate people at risk of harm in detention centres inside the county.

Babar Baloch, UNHCR spokesman in Geneva, said the agreement was “a life-line” mechanism to allow those in danger to get to a place of safety.

“This is an expansion of the humanitarian evacuation to save lives,” said Baloch. “The focus is on those trapped inside Libya. We’ve seen how horrible the conditions are and we want to get them out of harm’s way.”

More than 50,000 people fleeing war and poverty in Africa remain in Libya, where a network of militias run overcrowded detention centres, and where there are reports that people have been sold as slaves or into prostitution.

The UN denied reports the European Union were behind the agreement, as part of a strategy to keep migrants away from Europe. Vincent Cochetel, the special envoy for the UNHCR for the central Mediterranean, told Reuters the funding would mainly come from the EU, but also from the African Union which has received $20m (£16m) from Qatar to support the reintegration of African migrants. But he later said on Twitter that no funding had yet been received and that he was working on it “with partners”.

vincent cochetel (@cochetel) African refugees held captive in #Libya to go to #Rwanda in coming weeks. Just to clarify, we are approaching several donors to assist us & Rwanda. No funding has been received so far, but we are working on it with partners. We are grateful for any support https://t.co/zQaZlFXHYm

Baloch said: “We are asking for support from all of our donors, including the EU. The arrangement is between UNHCR, the African Union and Rwanda.”

The EU has been criticised for funding the Libyan coastguard, who pick up escaped migrants from boats in the Mediterranean and send them back to centres where they face beatings, sexual violence and forced labour according to rights groups.

In July, the bombing of a migrant detention centre in Tripoli left 44 people dead, leading to international pressure to find a safe haven for refugees.

Fear and despair engulf refugees in Libya's 'market of human beings' Read more

Under the agreement, the government of Rwanda will receive and provide protection to refugees and asylum seekers in groups of about 50, who will be put up in a transit facility outside the capital of Kigali. After their arrival, the UNHCR will continue to pursue solutions for them. Some will be resettled to third countries, others helped to return to countries where asylum had previously been granted and others will stay in Rwanda. They will return to their homes if it is safe to do so.

Cochetel said: “The government has said, ‘If you [UNHCR] think the people should stay long-term in Rwanda, no problem. If you think they should be reunited with their family, they should be resettled, no problem. You [UNHCR] decide on the solution.’”

“Rwanda has said, ‘We’ll give them the space, we’ll give them the status, we’ll give them the residence permit. They will be legally residing in Rwanda as refugees.’”

Rwanda, a country of 12 million, is the second African country to provide temporary refuge to migrants in Libya. It already supports around 150,000 refugees from neighbouring Democratic Republic of the Congo and Burundi.

UNHCR has evacuated more than 2,900 refugees and asylum seekers out of Libya to Niger through an existing emergency transit mechanism. Almost 2,000 of them have been resettled, to countries in Europe, the US and Canada, the agency said, with the rest remaining in Niger.