The Home Office has paid compensation of more than £1m, plus £1m costs, in a case involving 40 child asylum seekers who were wrongly detained as adults, it has been reported.
It is thought to be the first case of its kind and the largest immigration detention payout for a single case, according to the Guardian.
Government officials accepted that the policy was unlawful and changed it as a result of this case, the newspaper said.
However, data showed children were still being detained, it added.
The case that resulted in the payout involved girls and boys, including 25 aged 14 to 16, from countries including Afghanistan, Iran, Sri Lanka, Nigeria, Eritrea, Uganda, Somalia and China, the newspaper said.
The youngest was a 14-year-old girl from Sri Lanka. Some were survivors of torture in their home countries and some of the girls were survivors of rape and other forms of sexual violence, it added.
Some of the 40 had been assessed by social services and declared to be children, it said.
A UK Border Agency spokesman said: "We take the welfare of young people exceptionally seriously.
"All of our front-line staff receive specialist training to ensure that the welfare of young people is considered at every stage."