Image caption Nabil has lived with a curfew for three years

The Home Office has been forced to review curfews imposed on people after they leave immigration detention centres, a BBC investigation has found.

It comes after the Court of Appeal ruled in May that it had imposed the curfews unlawfully.

The law firm that took the Home Office to court says potentially thousands of people may be entitled to compensation.

Those subject to curfews cannot leave their home for up to 12 hours at a time.

The curfews are not directly linked to time served in prison, but some immigration detainees have committed a crime. Others have overstayed their visas or are seeking asylum.

What it's like living with a curfew

Lisa Matthews, from human rights organisation Right To Remain, told the BBC's Victoria Derbyshire programme that immigration curfews are "highly damaging" to people's lives.

"The policy was unjustifiable, unnecessary, punitive and unlawful. We believe that if the Home Office believes it is above the law, this is a danger for us all."

Nabil Abdullah, 30, has been subject to an immigration curfew for three years. He lives with his partner Claire Cummings and their baby Sydney in Middlesbrough, having moved to the UK as a child.

Eleven years ago, he served a year in prison for street robbery and was eligible for deportation as a foreign national, but Sudan - where he was born - refused to accept him back on four occasions, leaving him stuck in the British immigration system.

He is currently on bail from immigration detention. The curfew was imposed by the Home Office.

Mr Abdullah has been ordered to stay inside his home during the curfew hours of 20:00 to 08:00 every day. If he breaks his curfew, it is a criminal offence.

Image caption Nabil's is monitored via electronic tag to ensure he meets the curfew

Because of the curfew, Mr Abdullah recently missed his grandmother's funeral and had to get written permission to attend the birth of his baby.

He does not know if, or when, the curfew will be removed. Currently, he is not allowed to work or study and is not entitled to benefits.

"The way I look at it," he said, "it's like I'm dead. I can't do anything. All I'm hoping for is all these things will disappear, put a full stop to it."

'Normal rules don't apply'

Ravi Naik of ITN solicitors, the law firm that took the Home Office to court, said the curfews suggested an alarming disregard for the rule of law by the government - whether or not people have sympathy for those subject to them.

"The fact the Home Office [admitted in court] it had 'assumed' there was legal authority for these curfews until this challenge was brought, really underlines how the Home Office has treated these individuals."

Image caption Diane Abbott says it is important to stand up for the rule of law

Shadow home secretary Diane Abbott said the immigration curfews "are in some cases more severe" than those handed out as part of bail from prison, which she found "quite extraordinary".

"It shows that once you get lost in the immigration system, people think that the normal rules of natural justice don't apply to you.

She says the Home Office must "review each and every one of these cases".

Compensation claims

The Home Office told the BBC it was "reviewing all cases in which a curfew is in place as part of electronic monitoring to ensure the validity of the curfew".

It added: "We have taken action to simplify bail powers as part of the Immigration Act 2016."

But in cases where curfews have been historically imposed unlawfully, the government could be facing a large compensation bill. Mr Abdullah, for example, is considering taking legal action.

The Victoria Derbyshire programme is broadcast on weekdays between 09:00 and 11:00 on BBC Two and the BBC News Channel.