One of two Iowa teens who battered their Spanish teacher to death over a bad grade was sentenced to life in prison Wednesday — with blood pouring out of his nose in court as he tearfully apologized to her family.

Jeremy Goodale, 18, was sentenced to life with the possibility of parole in 25 years for his role in killing Nohema Graber, 66, with a baseball bat on Nov. 2, 2021.

Goodale and Willard Miller, 17, pleaded guilty earlier this year to first-degree murder of their teacher, whom they first stalked at a park in Fairfield and then beat to death when they were both still just 16.

Goodale had blood running from his nose during Wednesday’s hearing as he sobbed during an apology to the dead educator’s loved ones.

“I’m sorry, truly sorry. What I’ve taken can never be replaced,” Goodale said, at times through sobs.