As a condition of his plea agreement, prosecutors dropped attempted murder and other felony charges against Samuel Hinds, 17.
In exchange for dropping most of the charges against him, Hinds will testify against John Mayes, 19, who has been charged with first-degree murder in the death of Dr. James Nordstrom, according to court documents.
Law enforcement and prosecutors declined to comment about what information Hinds may have pertaining to the Mayes case.
"The prosecution thought (Hinds' testimony against Mayes) was significant," said Michael Calligan, Hinds' attorney. "It's something (Hinds) is prepared to follow through with."
Hinds was arrested in September 2011 after police said he stabbed a 15-year-old student in the neck during fourth-period classes. Court records do not reveal a motive for the stabbing.
Hinds has been incarcerated at the San Juan County Juvenile Detention Center since his arrest.
Hinds' sentencing hearing will be March 15. During the hearing District Judge William Birdsall also is expected to rule on whether Hinds will be sentenced as a juvenile or an adult.
If he is sentenced as an adult, he will serve three years in prison and two years on parole.
If he is sentenced as a juvenile, he will be in the custody of the New Mexico Children Youth and Families Division for two years with the possibility of extending the custody until he is 21, according to the plea agreement.
Hinds was 16 at the time of his arrest and will turn 18 in June, according to court records.
He is still in custody at the juvenile detention center and will remain there at least until his hearing in March.
Traci Neff, the juvenile services administrator, said Hinds has served more time in the juvenile detention center waiting for his case to be adjudicated than any other person in custody there.
She said Hinds has gone to school, seen a therapist and mostly followed rules during his incarceration.
"I'm looking forward to a final outcome," she said. "It's about time this case be adjudicated."
During his incarceration, Hinds was charged with attempt to escape from the facility. The charges were dismissed.
In January 2012, Hinds, Mayes and another juvenile inmate were arrested because the sheriff's office said they plotted an escape from the detention center.
Charges in that case were dropped against Hinds and the other juvenile. Mayes is still facing conspiracy charges for the alleged plan.
Mayes, the son of Farmington City Manager Rob Mayes, was arrested in June 2011. Police said he beat Nordstrom to death with a pool cue in the doctor's home on San Marcos Drive in Farmington. He was arrested the next day, allegedly driving the doctor's car.
Mayes is scheduled to go to trial in April.
Neff said Mayes and Hinds were housed together for a while when they were both incarcerated.
"They were housed in the same unit up until the plot to escape and then they were all housed separately and have not been together since," she said.