As part of a deal with Duval County prosecutors, 14-year-old Cristian Fernandez pleaded guilty as a juvenile to manslaughter and aggravated battery. The Florida Times-Union reports that he will remain at a juvenile facility until he turns 19 in January 2018. After that, he'll serve eight years of probation. Fernandez had been charged as an adult with first-degree murder and faced a possible life sentence.

The Associated Press does not typically identify youths who are charged with crimes unless they are charged as adults. But Fernandez was charged as an adult, in a case that was highly publicized.

State Attorney Angela Corey said during a news conference that she never intended to send Fernandez to prison for life and hopes he will receive treatment, counseling and other help that will keep him from offending again.

"We believe this was the best way to resolve this case and to reach the middle ground we were striving for from the inception," Corey said after Friday's hearing. "A middle ground that would both punish and rehabilitate Cristian Fernandez."

A then-12-year-old Fernandez was initially arrested following the March 2011 death of his 2-year-old half-brother, David Galarraga. Authorities say Fernandez had been home alone with the toddler when he suffered a fractured skull, bruising to his left eye and a bleeding brain.

The boys' mother, Biannela Susana, waited more than eight hours to take the injured child to the hospital, where he died. The mother pleaded guilty to manslaughter last year. She awaits sentencing.

Hank Coxe, one of Fernandez's attorneys, said he has no doubt Fernandez won't cause any future trouble. He said the boy has maintained good grades and made plenty of friends while in custody. He said the final decision on accepting the plea agreement was left to Fernandez.

"He balanced everything and said 'I want to move on with my life,'" Coxe said.

The plea agreement came less than a month before Fernandez's trial was set to begin.

An unrelated sexual battery case against Fernandez involving another half-brother was dropped by prosecutors in November. They cited a lack of physical evidence and witnesses as factors.