But it will take months for the changes to take effect, which will mean little comfort for the hundreds of children who will be held in that time.

Most of those children would not have to go through this ordeal if the UK Border Agency were not breaching its own statutory guidelines under section 55 of the Borders, Citizenship and Immigration Act 2009 (pdf) and international law. At the moment, UK Border Agency policy simply restricts detention to being a short-term practice to be applied only immediately before deportation. Article 37 of the UN convention on the rights of the child states that detention of children should only be used as a last resort and only for the shortest period of time. In addition, article 8 of the European convention on human rights requires respect for private and family life, yet families are regularly detained with no consideration of a child's welfare and without any assessments of risk to the child.

All these laws and guidelines are being flouted. A recent inspection report on Yarl's Wood revealed that a baby had been detained for 100 days, 68 children held for more than a month, and half of all the children in the centre were later released back into the UK. Their detention was neither short-term, prior to deportation, nor in the interests of their welfare.

We accept that discussion is needed to find the best alternative to detention and realise that the review announced by the government will inevitably take time. Any solution should put the welfare of children first: it must not involve separating children from their families, for example. It will be important to improve the quality of legal advice available to families claiming asylum and improve decision-making by the Home Office at an earlier stage. Too many families reach the end of the line who are victims of miscarriages of justice. Investment early on would save heartache for the families and save the taxpayer vital funds.

In the meantime, we would like the UK Border Agency to take immediate action to ensure all children currently detained are held only in strict accordance with official government policy, and UK and international law. Those who are not must be immediately released with their families, returned to their homes and schools, and given information on voluntary repatriation.

It's time for the UK Border Agency, which is so rigorous in applying the law to others, to apply the law to itself.