'I blew my money on drugs and gambling'
The government is paying more than £4m each year in compensation to people who were held unlawfully in immigration detention centres, figures released to the BBC's Victoria Derbyshire programme show.
Hamid, from Iran, served six months in prison for stabbing a security guard and was then sent to immigration detention for automatic deportation as a foreign national criminal.
But Iran would not accept him back, as the UK government could not prove he was Iranian.
He was detained under immigration laws for three and a half years and later awarded £33,000 compensation for unlawful detention.
The Home Office said detention was part of a firm but fair immigration system.
Watch the Victoria Derbyshire programme on weekdays between 09:00 and 11:00 on BBC Two and the BBC News channel.