EUGENE, Ore. (AP) — A Eugene teen who beat a man to death in 2018 has become the first to be sentenced under a new law designed to keep teens accused of serious crimes in Juvenile Court.

Jonathan Daniel Kirkpatrick, now 18, admitted during a Tuesday hearing that he killed Ovid Neal, a 56-year-old homeless man, The Oregonian/OregonLive reported. Kirkpatrick’s crimes — murder, first-degree robbery and second-degree assault — are offenses that for adults carry long mandatory minimum sentences.

Kirkpatrick was initially charged as an adult but the law underwent a significant change while his case was pending and he was returned to juvenile court because the crimes occurred when he was 16.

Lane County Circuit Judge Jay McAlpin ordered Kirkpatrick into the custody of the Oregon Youth Authority. The most he could serve is about seven years because the state cannot hold or supervise juvenile offenders past their 25th birthdays.

The case represents the first test of Oregon’s overhauled juvenile justice system. Instead of automatically being waived into adult court, juveniles between ages 15 and 17 face a court hearing where a judge decides whether they should be tried as adults.

Lane County prosecutor Erik Hasselman said Neal was asleep Oct. 3 when Kirkpatrick used a rock the size of a football to bash his head. Kirkpatrick then “stood or stomped” on Neal, he said.

Kirkpatrick grabbed Neal’s backpack and fled. He found $11, prosecutors said.

Kirkpatrick apologized to Neal’s family during the hearing.