A judge has ruled a teenager who pleaded guilty to killing his parents and three young siblings will remain in state custody until he is 21.

Nehemiah Griego was sentenced Wednesday after a children's court judge ruled last month that he should be sentenced as a juvenile. That decision followed a hearing to decide whether Griego had shown he was responsive to treatment.

He was 15 when he opened fire at his family's home in 2013.

The Children, Youth and Families Department will determine where Griego will be treated or held for the remainder of his sentence, which authorities say leaves open the possibility for an early supervised release.

Wednesday's sentencing decision was largely expected given the judge already decided Griego would be sentenced as a juvenile. The district attorney says she plans to appeal that ruling.