Dozens of vulnerable EU children serving jail sentences in Britain could be stripped of their immigration rights after Brexit because the Home Office is refusing to let them apply for settled status.

Legal experts said ministers were subjecting children with EU nationality to a “double punishment” after it emerged young offenders would not be eligible to apply to the EU settlement scheme while in prison.

EU nationals living in Britain need to apply for settled status by the end of June 2021 – or by the end of 2020 if Britain crashes out of the bloc – to remain in the country legally.

Preventing children in prison from applying would mean those released after the deadline would have no legal immigration status, which campaigners said would heighten the likelihood of re-offending as it would prevent them from studying and working, as well as making them liable to deportation.

There is no aggregated data on EU national young offenders, but experts estimate that there are around 40 detained in youth custody at any given time.

The Independent has reported on widespread concerns that thousands of vulnerable EU children in the UK care system faced losing their rights after Brexit due to “woefully inadequate” Home Office support for ensuring they apply for EU settlement.

In response to a parliamentary question from Labour MP Kate Green asking whether children in secure care or detention were eligible to apply to the scheme, Home Office minister Brandon Lewis said: “They will not generally be eligible to apply to the scheme while they are serving that sentence.”

Mr Lewis also said a child’s “length of residence” in the UK – they need five years to obtain settled status – would be broken as a result of their imprisonment. That means they would be left with a precarious immigration status even if their sentence ends before the deadline.

He added: “This is consistent with EU law on free movement, as currently given effect in the UK by the Immigration Regulations 2016. This provision applies to children in detention as it does for all applicants to the EU settlement scheme.”

Kathryn Hollingsworth, a professor of law at Newcastle University, said she was “extremely concerned” by the response, warning that children could be left in a “highly precarious” position if they were released after the deadline for applying.

“Not only are EU national children being disproportionately and doubly punished for mistakes made in childhood – that is, they are experiencing secondary harms of punishment that UK citizen children will not – it also leaves them with a precarious immigration status, which may heighten the likelihood of re-offending,” she said.

Pro and anti-Brexit protesters clash outside parliament

On the decision to break a child’s “length of residence” if they are detained, Ms Hollingsworth said: “The primary aim of the youth justice system is prevention of offending and re-offending. However, by depriving EU national children of the opportunity to apply for EU settled status whilst in custody, and by ‘resetting the clock’ on the continuous residence requirement, this aim is undermined.”

Labour MP Ms Green called on the government to set out a process to ensure that children who had been in detention were able to obtain settled status whenever that is in their best interests, adding that youngsters who had served time in custody were often “highly vulnerable”.

Chai Patel, legal director at the Joint Council for the Welfare of Immigrants, said: “All EU citizens and their family members resident in the UK were promised that their rights would not be affected by Brexit. On top of that, the government has a legal duty to act in the best interests of children.

“It is simply wrong that vulnerable children, many of whom will have grown up in the UK and who are eligible for settled status, could face being removed or detained because they’re not even allowed to apply.”