The Home Office has rejected calls to end the detention of asylum seekers' children at Dungavel in Lanarkshire.
Children held at Dungavel is a contentious issue
But a series of measures has been announced to ensure their welfare.
It is part of the UK Government's response to a report by a committee of MPs - which backs key measures in new asylum legislation.
Opposition politicians have condemned the decision repeating their argument that Dungavel is not a suitable place for children.
Nine children are currently being held with their families at the Dungavel centre, which houses failed asylum seekers and their families before they are deported.
The new measures being put in place by the Home Office include the need for a government minister to give express authority before a child can be detained for longer than 28 days.
The educational and welfare needs of any child being kept at Dungavel for more than three weeks will also be assessed to make sure they are being met.
Home Office minister Beverley Hughes said: "There is concern about children
being detained which I hope the measures we are announcing will go some
way to alleviating.
"It is only in the very, very tiny minority of cases where, either for reasons of their immigration history or because people have served a prison sentence, that we cannot put the parents into the community.
"In that situation we have to make a decision as to what is in the best interests of the children, and I think it is in the interest of the children to be with their parents, albeit that in that small minority of cases that parent has to be detained."
But Scottish National Party (SNP) leader John Swinney has insisted that children should not be put in Dungavel.
Ms Hughes defended the need to detain children
Mr Swinney said: "The government said that children would only be detained there for a couple of days, we now have ministers saying that they will only become involved in these issues if a child has been there for 28 days.
"Now I don't think a child should be there for a single day, that's my basic position, and I'm horrified that ministers are now entrenching their position as a result of the decisions made yesterday.
"I think it is immoral in principle for children to be detained in the prison that is Dungavel, there are alternatives available in our community to deal with people fairly and squarely."