The Scottish Executive has insisted that responsibility for the Dungavel asylum centre lies with Westminster despite SNP claims to the contrary.
Dungavel has been the focus of a long campaign
Nationalists claim research at the House of Commons library revealed that there was no apparent legal basis for the executive's belief that the matter should be dealt with by the Home Office.
The UK Government is currently in charge of immigration and asylum, however education in Scotland is a devolved matter.
The SNP said the education of children held in the Dungavel asylum centre does not appear to be formally reserved to Westminster and it wants the executive to intervene.
Campaigners argue that the executive and South Lanarkshire Council should take over the education of children held in Dungavel.
But an executive spokeswoman insisted that any action over the centre would have to come from south of the border.
She said: "The children are lawfully detained by the Home Secretary, who is therefore responsible for all aspects of their care and welfare."
She added that local authorities have no general power to ensure that
children had access to mainstream education.
She said the power being referred to by the executive's critics referred to powers councils had relating to children with special educational needs, like those who were deaf or visually impaired.
Communities Minister Margaret Curran insisted the issue of the detention and education of children was a reserved matter back in June.
But the Scottish National Party had asked the House of Commons library to look into the claim.
It found nothing in law giving the Home Secretary those powers or denying them from Scottish education authorities, although in practice Westminster assumes charge.
SNP MP Annabel Ewing accused Westminster of being incompetent in barring children from going to school.
Speaking on BBC Radio Scotland, Mrs Ewing said: "It does seem to be somewhat of a grey area but there is no specific
statutory obligation that gives the Home Office powers in this respect.
"I think this all shows the UK Government policy on the detention of children
in Dungavel is very much make it up as you go along."
However, Liberal Democrat MSP Robert Brown, convener of the Scottish Parliament's education committee, was not a clear ruling on who was responsible for children at Dungavel.
He said: "It seems to me that the SNP have actually got a non-answer [from the Home Office] and produced a two plus two equals 27 sort of response."