Two teenage boys have been sentenced for the murder of 14-year-old Ana Kriégel last year.
The boy referred to in court as Boy A has been sentenced to life in detention, but his sentence will be reviewed in 12 years.
His co-accused, referred to as Boy B, has been sentenced to 15 years for his part in the murder, but his sentence will be reviewed after eight years.
The boys were just 13 years old when they killed the schoolgirl in a derelict house in Lucan. The first boy also violently sexually assaulted her.
He was given an eight-year sentence for the sexual assault to run concurrently with the sentence for murder.
They are now aged 15 and were convicted in June of murdering Ana in May 2018.
Mr Justice Paul McDermott said this was a murder of the most serious, disturbing and shocking type.
Boy A had denied murder, but the court heard he now appears to have accepted that he caused the 14-year-old's death, although he still denies sexually assaulting her.
Boy B has described seeing his friend attacking Ana, but he still denies having any part in the murder himself and does not accept the jury's verdict.
The court heard the two boys disagree about many of the details and there is still no clear explanation for what happened.
The boys are the youngest people in the history of the State to be convicted of murder and there were very few precedents for the court to rely on.
A previous appeal court decision had directed that there was an onus on the court to have regard to the future rehabilitation and welfare of children convicted of such serious offences.
In his ruling, Mr Justice McDermott said that there was a considerable focus in the trial on the rights of the accused, on the evidence and on important procedural and legal issues. These were all essential to a fair trial, he said.
But he said the denial of Ana's right to life was at the core of this process and she should be remembered as the child, daughter, sister and friend she was.
She was a very healthy 14-year-old girl whose future lay before her. Her short life, the judge said, should not be defined by the crimes committed against her or by the references to her in trial or this ruling.
She was, he said, greater than that.
She had a life she was living with energy, fun, imagination, dancing and music. She was a lovely and loving child in a loving family. She had some difficulties she was dealing with but she had a life full of variety, potential and aspirations.
Her family were bereft, the judge said, and they would suffer traumatic, devastating and lifelong consequences. Their joy and security had been shattered in the most cruel and painful circumstances.
Mr Justice McDermott said Geraldine Kriégel's victim impact statement had shown the deep love and wonderful joy Ana had brought to the family.
He had listened to it and reread it he said and nothing could be added to the plain and sad truth of what she said. There was no solace for them - the death of a child, compounded by the manner of the occurrence has caused then deep misery and the destruction of their lives.
He said the two boys bore responsibility for her murder. Notwithstanding their young age they were responsible for Ana's death and must accept the consequences.
The judge set out the differences between how the court must deal with an adult and a child convicted of murder.
An adult convicted of murder was automatically sentenced to a mandatory life sentence but this was not the case in relation to a child. And there were very few precedents to which the court could refer.
The judge said it may seem unfair for the family of the deceased when the sentence did not provide comfort for their loss. It may seem as if there was less than full regard for the victims of the dreadful crimes and their families.
But he said sentences must be proportionate not only to the crime but to the offender. Children must be treated differently from adults, he said, and age was a substantial mitigating factor.
The judge said the boys were still very young and still developing mentally and physically and it was important to determine the optimum stage at which they ought to be considered for release.
He said there was no evidence that either boy was suffering from a mental disorder.
Both came from secure, loving families.
In relation to Boy A, he said the murder was planned with a very high degree of violence and terror for the victim.
There was very little to dissuade the court from a very severe sentence.
The horrific acts were deliberately planned and there was little understanding or remorse.
He was mature enough to realise what he had done.
Mr Justice McDermott said Boy B had limited insight into what he had done and had some degree of shame and regret, but he was not satisfied he had told the full story.
He told the boys they had both received lengthy sentences but both had the prospect of returning to their families.
Much, he said, depended on their behaviour and attitude.
He told Boy A he took Ana's life and Boy B actively and knowingly participated in the killing. Both of the boys had to carry the guilt and shame of their involvement and the devastation wrought on her family for the rest of their lives.
He said they would have the opportunity to reconstruct their lives in a positive way, and asked them how they would take it.
"You have the opportunity for a second chance," he told the boys, "something you so wrongfully and cruelly denied to Ana Kriégel."