Lawyers for an Indiana youth sentenced at age 12 in adult court for a murder conspiracy are asking a state appeals court to send the case back to juvenile court for a new hearing.

Paul Henry Gingerich was a sixth-grader when he was accused of helping kill a friend’s stepfather in 2010, report the Associated Press, the Indiana Star and the Journal Gazette. Gingerich pleaded guilty to conspiracy to commit murder in adult court and was sentenced to 25 years in prison.

In oral arguments on Tuesday before the Indiana Court of Appeals, Gingerich’s lawyer, Monica Foster, said a psychologist who examined her client was concerned about his competence to understand the adult proceedings. Yet the lower court failed to take Gingerich’s maturity into account, she argued, before waiving him into adult court.

Deputy Attorney General Angela Sanchez said Gingerich’s trial lawyers and parents approved of the plea deal, which waived his right to appeal. She noted that Indiana law allows adult trials for children as young as 10.

With educational and good-time credits, Gingerich could be released by age 24. Currently 14 years old, he is incarcerated in a juvenile facility, but he could be moved to an adult prison at any time, the Indiana Star says. Some appeals judges noted that sending the case back to juvenile court could still result in a waiver to adult court, with the possibility of a longer sentence.