URBANA, Ohio — Logan Cole remembers in graphic detail being shot at his Ohio high school, in the bathroom where he had popped in to check his hair before a mock trial competition.

He remembers the impact to his chest, the splatter of his own blood on the wall, his front teeth cracking on the floor as he fell. He remembers thinking he might die and pleading with the masked classmate with the shotgun to stop, to get help.

Cole recounted the scene in court Wednesday as he urged a Champaign County judge to give teen gunman Ely Serna the maximum possible sentence for the January 2017 shooting at West Liberty-Salem High School that critically injured Cole and slightly hurt another student.

The judge obliged, sentencing the 18-year-old Serna to more than 23 years in prison.

Defense attorney Dennis Lieberman blamed Serna’s actions on mental illness, saying the then-17-year-old believed he was following a deity’s orders when he opened fire with his own shotgun in a bathroom and at classrooms of the school in West Liberty, roughly 45 miles (72 kilometers) northwest of Columbus.

Serna told the court he didn’t have a particular motive or target.

Lieberman said he was disappointed that Serna’s mental health wasn’t given greater consideration in the sentencing, noting that psychologists have diagnosed Serna with major depressive disorder and concluded he didn’t know right from wrong at the time of the shooting.

He said Serna’s family is considering whether to appeal the judge’s decision.

County Prosecutor Kevin Talebi acknowledged mental illness was a factor but argued that Serna knew his actions were wrong and that he deserved the maximum sentence.

Lieberman sought leniency, pointing out that Serna was remorseful and pleaded guilty to charges of attempted murder, felonious assault and inducing panic because he wanted to spare others from enduring a trial and reliving what happened. Another 10 counts were dropped with that plea.

Cole, who still has hundreds of lead shotgun pellets in his body, said the shooting ravaged him physically and emotionally. He forgives Serna, he said, but “there is a difference between forgiveness and justice.”