Image copyright Getty Images Image caption Diane Abbott, pictured at a Windrush protest last month

Labour has pledged to close the UK's two main immigration detention centres, in the wake of the Windrush scandal.

The move is part of a package of measures to reverse the government's so-called hostile environment policy.

Labour says the money saved from closing the Yarl's Wood and Brook House centres would help provide £20m to support survivors of modern slavery, trafficking and domestic violence.

Ministers say detention is a "vital tool" for tackling illegal migration.

But the Home Office stressed that all detainees must be treated with "dignity and respect" and the law did not allow for indefinite incarceration, with 90% of people held in 2017 for less than four months.

In a speech at the IPPR think tank in London, shadow home secretary Diane Abbott said the closures would happen if Labour got into power.

It comes the day after Home Secretary Sajid Javid revealed that checks were being made on whether mistakes had been made in the case of 63 Windrush citizens who had been deported since 2002.

The Windrush migrants arrived between the late 1940s and 1973, mainly from the Caribbean, but some have been threatened with deportation in recent years if they have been unable to supply a range of different documents to prove they have been in the UK each year.

Changes to immigration laws to create a "hostile environment" for illegal immigrants have also meant that although they have the right to live in the UK, some people have also been refused jobs, healthcare and benefits.

Ms Abbott said: "People are being kept in detention for months, even years on end. They include the Windrush generation, victims of torture, refugees and victims of sexual exploitation.

"The government announced the Modern Slavery Bill with great fanfare but no resources. They are gearing up to do exactly the same with the upcoming Domestic Violence Bill. It is simply not good enough."

She added: "Yarl's Wood in particular has caused so much pain to vulnerable women that we should have been protecting."

'Shoddy service'

Ms Abbott also announced that Labour would ban private contractors from running other detention centres.

"This government and its predecessors have long had an obsession with enriching the private sector from the public purse," she said.

"This is despite the costs, either financially, in shoddy service or in human misery."

Conservative Immigration minister Caroline Nokes said Windrush families had been let down by the immigration system but the rules on who had the right to be in the UK still needed to be enforced.

"Immigration detention is a vital tool in helping ensure those with no right to remain in the UK are returned to their home country," she said.

"And, if this led to the release of serious offenders this could put communities at risk."

In a subsequent statement, the Home Office said it would "always demand the highest standards from those we entrust with the safety and welfare of those in detention".

Officials stressed that people were only detained if there was a "realistic prospect" of removal within a reasonable timeframe and there were other safeguards such as regular reviews.

Meanwhile the Labour MP David Lammy, who has been at the centre of raising concerns over Windrush families, has called for an independent inquiry into the deportations.

He also called for the Home Office to be broken up, with a separate department for immigration.