An immigration detention centre which has seen high levels of self-harm and violence is to close.
Morton Hall, near Swinderby, Lincolnshire, will revert to being a prison, the Home Office has said.
Those in detention will be transferred to other centres before the change comes in next year.
Earlier this year, inspectors raised concerns about how long people were being held on the site and the impact this had on their mental health.
In one case, a man with "severe mental health conditions" was held for 70 days before being transferred to a specialist unit.
There were also concerns around self-harm and violence at the centre, which has seen four deaths in the past five years.
One involved a man from Sierra Leone who collapsed and died after complaining of headaches.
An inquest heard he should have been sent for assessment earlier.
The centre is operated by the Prison Service on behalf of the Home Office, and holds 241 men subject to immigration control.
In a statement, the Home Office said: "Following the decision by HM Prison Service, Morton Hall will return to its use as a prison in 2021.
"Those in detention at Morton Hall will be transferred to other immigration removal centres."
A Prison Service spokesman said almost 400 extra prison places would be created at the site over the next 12 months.
Janahan Sivanathan, who is now studying law, was detained at Morton Hall for five months in 2014.
He said: "What people don't realise is the long-lasting effect of being detained at an immigration centre."
"[It was] full of razor wire, with massive fences and guards walking around."
Campaign group These Walls Must Fall, which aims to end immigration detention, welcomed the announcement.
Posting on social media, the group said it was "a big win".