URBANA, Ohio (AP) — A teen accused of shooting two students at an Ohio high school changed his mind about a trial and pleaded guilty.

Champaign County Prosecutor Kevin Talebi says 18-year-old Ely Serna was convicted Friday of attempted murder, felonious assault and inducing panic.

Serna faces up to 23½ years in prison at sentencing on May 2.

Serna had pleaded not guilty by reason of insanity in the January 2017 shooting at West Liberty-Salem High School in West Liberty, roughly 55 miles (89 kilometers) northwest of Columbus.

One teen survived critical injuries. Another suffered minor injuries.

Defense attorney Dennis Lieberman says Serna didn't want to put the victims, their families and the school through a trial.

Lieberman says Serna's severe mental illness contributed to the shooting.