In 2013, I interviewed a Nigerian man called Isa Muazu, who had come to the UK because he was fleeing Boko Haram. He wound up at Harmondsworth immigration detention centre, where he began a three-month hunger strike. He lost vision in both eyes, experienced chest pain and shortness of breath, and eventually became too weak to sit up unaided. At the time I thought he would die alone on a mattress on the floor of his cell. In the end, he was flown to Lagos by the British government and I never heard from him again. He told me: “I have never committed any crimes; nothing like this has ever happened to me before.”

A recent YouGov poll showed that the British public is mostly in favour of the “hostile environment” policies for immigrants, categorised as the requirement to show documents before accessing a GP, accepting a job, renting property or opening a bank account. Do the public also realise that Muazu’s experience is also a consequence of the hostile environment? That we lock up innocent people for indefinite periods of time and treat them worse than animals in a zoo?

Only today, distressing footage emerged of Zixuan Qu, a woman who was encouraged by a British college to come here and study, being raided by six immigration officers. Qu has been waiting for the Home Office to sort her visa and has tried several ways of speeding up the process. In our names, her house was raided at 5am, and she was threatened with removal from the home she shares with her fiance.

Play Video 4:03 'I thought they'd take everything away from me': immigration officers enter couple's home at dawn

This is why Diane Abbott’s announcement that Labour will end the hostile environment is so welcome: the grotesque mix of incompetence and cruelty from the Home Office has led to the most abject and degrading treatment of migrants, ostensibly for the benefit of British people. Finally, Labour would close the detention centres that have been a stain on the national conscience for so long, rightfully recognising that people often come to this country seeking asylum because they are escaping war, violence or abuse. Labour would redirect the funds used to run detention centres to the services these asylum seekers desperately need.

But the announcement should also come with political awareness. When 10 countries – including Poland, Hungary, Latvia and Lithuania – joined the EU in 2004, the Labour government made little attempt to engage with the public about what the effects might be. As a result, that vacuum was filled by the rightwing press, which responded to the change in the most aggressively xenophobic way possible.

Lessons must be learned from that, and now Labour – with the support of civil society – needs to join the dots for the public about what the reality of UK immigration policy has been.

Alongside this announcement should come a drive to reverse the frankly rabid rhetoric that habitually accompanies debates about immigration in this country. We can’t pretend descriptions of migrants as “swarms” and “cockroaches” have not set the tone on immigration, and will not have influenced the public in terms of what kinds of attitudes and behaviours are deemed permissible. This kind of rhetoric must be confronted head-on wherever possible, by all of us who want a more humane country. Labour’s announcement is fantastic, but the hostile environment extends further than policy.

• Ellie Mae O’Hagan is a freelance columnist