An inspection report on Yarl's Wood immigration removal centre has sharply criticised the detention of children.
Chief prisons inspector Dame Anne Owers said some children were held at the Bedfordshire centre unnecessarily, with little consideration for their welfare.
And the report revealed that half were later released rather than deported.
Immigration Minister Phil Woolas said the alternative to detention was putting children into care and separating them from their families.
The report comes as lawyers prepare a legal challenge to detention, following weeks of protests at the centre.
Yarl's Wood is the main removal centre holding women and families who are facing deportation.
There have been almost two months of protests at the centre, including occupations of corridors while some women have refused food.
The UK Border Agency (UKBA) has launched an investigation into how the incidents have been handled - but the Home Office has ruled out an inquiry by the chief inspector of prisons.
In her report on the state of the centre last November, Dame Anne said that over the previous six months, there had been some 420 children detained in the family unit.
But half of these were later released because they were either no longer facing removal or had been allowed to live normally while their legal appeal is considered by the courts.
The chief inspector said 68 of the children had been held in the centre for more than a month and one, a baby, had been held for 100 days. The average length of stay was 16 days.
"What was particularly troubling was that decisions to detain, and to maintain detention of, children and families did not appear to be fully informed by considerations of the welfare of children, nor could their detention be said to be either exceptional or necessary," said Dame Anne in the report.
"Our children's interviews illustrated the distress that children felt about their own and their families' detention, which increased over time, and all those we interviewed were temporarily released."
There were some positives in the report, which found that Yarl's Wood was safer than before and that conditions for children has improved.
And the Home Office said it welcomed the news that both schooling and healthcare had improved at the centre.
In the report, Dame Anne called on the UKBA to change its rules so that officials reassess the detention of families where there is no immediate prospect of a detainee being removed.
She said the agency should also explain to its own "Children's Champion", an in-house adviser on welfare, each decision to detain where the child is later temporarily released or allowed to stay permanently in the UK.
Seven Yarl's Wood detainees, three of them children, have now launched a legal action against the Home Office and Serco, the firm that runs the centre.
They allege that they have been subjected to inhuman treatment and arbitrary detention, including inadequate medical and mental health assessments.
Serco has described the allegations as unfounded and untrue.
Immigration minister Phil Woolas said: "The sad fact is that some illegal immigrants refuse to comply with the decision of the independent courts and return home voluntarily.
"The alternatives to centres like Yarl's Wood include putting children into care - which would mean separating them from their parents and risking increased child trafficking and further illegal immigration.
But Caroline Slocock of Refugee and Migrant Justice, a legal group that represents many asylum seekers, said there was an alternative.
"Families generally do not abscond, and as the Home Affairs Select Committee recommended last November, alternatives such as tough reporting requirements could be considered," she said.
"If detention has to be used, it should only be as a last resort. The fact so many children are released without being removed from the country shows there is no need to detain them in the first place."