Last Wednesday (3 July), Fathi Bashagha, the minister of interior for the UN-backed Government of National Accord (GNA), announced that his office is looking into ending the detention of refugees and migrants in Libya and releasing all those currently detained in centres under the control of the GNA's Department for Combatting Illegal Migration (DCIM).

This announcement came the day after the horrific attack on a migrant and refugee detention centre in Tajoura, where 53 individuals lost their lives, including children.

Student or retired? Then this plan is for you.

Whether this is a serious initiative or simply another grand gesture of lip service remains to be seen. Either way, this is not nearly enough to make Libya a safe country for migrants and refugees.

The European Union has for years adopted a policy of containment, training the Libyan Coast Guard to intercept people at sea.

Those intercepted are then brought back to Libya and placed in detention centres that are run by DCIM under the GNA's Ministry of Interior.

There has been no shortage of reports that recount the violence and torture refugees and migrants face in these centres.

Yet, unfazed, EU policy continued to support the Libyan coastguard, turning a blind eye to what happens after those intercepted are returned to Libya.

Closing all DCIM detention centres in Libya is necessary and welcomed. If in fact the call by Bashagha proves to be true, this is key to taking the first steps towards ending the violence against refugees and migrants in Libya.

Nonetheless, the EU must still reform its policy on Libya; irrespective of the closure of the detention facilities, Libya remains an unsafe country for refugees and migrants.

Thus, it should not create the perception that Libya would then be safe for returns. This is far from true. It is not only detention that makes Libya an unsafe country.

The horrific conditions inside the centres have for years detracted from the atrocities faced by those in urban settings.

The protection-needs of the refugee and migrant population in Libya not held in detention, but who are also vulnerable, requires genuine support.

This is demonstrated by the 9 July release of the remaining Tajoura detainees, following the attack on 2 July.

The group of 350, with nowhere to go, exposes Libya's limited infrastructure to respond to the urban refugee and migrant population.

With a lack of a plan following the release, the group feared for their lives when the doors were opened and were told to walk out freely.

Despite large scale funding from the EU Emergency Trust Fund for Africa, organisations on the ground do not have resources nor the infrastructure to address large-scale protection needs of the urban population particularly of large groups together.

Migrants and refugees in urban settings are easy targets for all sorts of violence.

They are left undocumented and desperate. The anonymity of their situation means that they are easily 'disappeared' and commodified. In a country where kidnapping and enforced disappearances are widespread and systematic for an array of reasons, the kidnapping of migrants and refugees is largely overlooked.

The choice between slavery and drowning

With the economy in near collapse, trafficking of humans to extort large sums of money from family members is a lucrative business, one that is often ignored when the world is forced to concentrate on the loss of life at sea.

Countless numbers are held in undisclosed and unidentified locations in appalling conditions by armed groups. In these places of captivity, outside the reach and control of the authorities, refugees and migrants experience some of the worst atrocities, including, rape, torture, starvation and extortion.

Despite this, EU policy persistently continues to ignore these realities, adamant to keep people from arriving in Europe at any cost.

So much so that when the UN Refugee Agency called on the EU to halt returns to Libya following the 2 July attack, this was quickly dismissed by EU officials. This is very telling of EU policy in Libya; ultimately, they will soldier on at any cost as the training of the Libyan coastguard continues.

By sticking to its current policies, which include supporting the coastguard to return people to Libya where their life is at risk, the EU is complicit in torture and is violating the principle of 'non-refoulement'.

The EU must re-examine its positions and take immediate steps to reform these policies.

Increasing EU resettlement quota

Most importantly, the EU must work collectively towards ensuring that all those stuck in Libya have a way out, namely by increasing its resettlement quotas.

The EU should work towards the spirit of protection and offer serious and sincere resettlement numbers that reflect the actual purpose of resettlement.

The aim is to assist all refugees at risk by ensuring they are transferred to a safe third country. The EU must offer legal pathways that will provide alternative routes to Europe.

This will help protect individuals from being forced underground and into the hands of smuggling and trafficking networks, leaving them vulnerable to extortion and abuse.

Libya is not a safe country and if the EU continues to disregard this when building and implementing its policies in Libya, it will continue to play a direct role in the suffering of vulnerable individuals.

The EU must place human rights at the core of its policies moving forward. While an end to detention is necessary, particularly for those intercepted at sea and returned to these centres, this alone will not make Libya a safe country. No one should be returned to Libya.

Until the rule of law is restored, Libyan law recognises and protects refugees and asylum seekers, and institutions on the ground can exert command over the entire territory, no one should be contained in Libya.

The country is not safe for the undocumented and unprotected and the EU must acknowledge its role in this and change its policies.