A stunning confession was made inside a Michigan courtroom as a suspect admitted to killing a high school student during an armed robbery last year.

Jordan Klee was supposed to be in the school the day he was found shot and killed.

Tuesday, Dante Wright, the accused killer, was supposed to have a pre-trial hearing for the case. Instead, he admitted he and two other friends were trying to rob the 18-year-old at gunpoint.

Prosecutor: And who were you going to rob?

Dante Wright: Jordan Klee.

It all happened back in October 2016.

During the hearing, Klee’s mother was in court, sitting just feet away from his son's admitted killer as the shocking testimony continued.

Prosecutor: And as a result of that armed robbery, what did you do with that gun to Mr. Jordan Klee?

Dante Wright: Shot him.

Prosecutor: Where did you shoot him?

Dante Wright: In the top, by his head.

Prosecutor: And did you kill him with that shot?

Dante Wright: Yes.

Police said Klee died at Pine Lake Village Apartments, just miles from his home.

The Pioneer High School senior, who did well in school and loved playing football, was found by a maintenance worker.

Wright stood casually in court answering questions and remained unalarmed learning he now faces 23 to 50 years in prison for armed robbery and murder, plus another two years for felony firearm.

The-CNN-Wire™ & © 2017 Cable News Network, Inc., a Time Warner Company. All rights reserved.