The Minister for Children and Youth Affairs has confirmed that seven children currently detained in the Oberstown young offenders centre are to be released as a result of a judgment issued by the High Court.
Two of the children have already been released and five more are to be released imminently.
Frances Fitzgerald said arrangements are being made for their release from the centre in Lusk, Co Dublin.
The High Court ruling found that young offenders detained at Oberstown are entitled to remission of their sentences in the same way as all other prisoners.
The decision means all young offenders who have served three-quarters of their sentences and are of good behaviour can be released.
Lawyers for the school asked Mr Justice Gerard Hogan if his ruling meant all those in Oberstown who had reached three quarters of their sentence would be released.
The judge said that was the case. He said he realised his judgment would have significant implications for Oberstown and for the wider juvenile justice system.
The judge immediately ordered the release of a 17-year-old boy from Oberstown.
He said the boy was entitled to have been released at the end of last month, under remission rules, instead of the end of February as had been argued by the school.
The boy was serving a 15-month sentence for attempted robbery.
He had brought an application to court arguing that his continued detention was unconstitutional.
His lawyers claimed prison rules, allowing for remission, which are applicable in all prisons including St Patrick's Institution for young offenders, also applied to Oberstown.
The action was opposed by the director of Oberstown.
The judge said the language and structure of the 2001 Children Act "entirely negatives" the argument that a detention in Oberstown is different in law to detention at any other juvenile centre.
He said any objective justification for the markedly different treatment of those in Oberstown by denying them the benefit of remission rules such as apply in St Patrick's "simply falls away".
Failure to afford offenders in Oberstown with such a benefit amounted to "a plain breach" of the constitutional guarantee of equality before the law, he said.
The boy, who was in court today, was immediately released.
The court was also told the decision would also mean "the release of all children in like positions".
The decision is not going to be appealed to the Supreme Court.
A spokesperson for Ms Fitzgerald this evening said the minister will examine the judgment to assess whether any other legal steps are necessary, including any required amendments to the Children Act 2001.
Ms Fitzgerald said: " I welcome the fact that management in the Children Detention Schools have already put the necessary arrangements in place for the release of those children affected, in terms of the individual family, educational and health needs of each child in the community.
"Contingency planning in relation to this case has seen arrangements for their planned release accelerated in recent days."