A Chandler high school student involved in a love triangle with his 48-year-old math teacher was stabbed to death after the older woman's 20-year-old boyfriend found them together in her bedroom, police said Tuesday.

Sixto Balbuena found his girlfriend naked and the 18-year-old student in his boxer shorts in the woman's bedroom around 2:40 a.m. Friday, according to police reports and court documents.

Balbuena told police that Samuel Valdivia apologized to him before Balbuena began kicking, punching and throwing things at him, according to a police probable cause statement.

Police said Balbuena told them he "wanted to teach the victim a lesson," and stabbed him in the lower side with a kitchen knife, according to the court document. Valdivia later died at a hospital.

He also threw his girlfriend, Tamara Hofmann, to the floor, jumped on top of her and demanded to know how long she had been cheating on him, according to the document.

Balbuena said he never meant to kill Valdivia, telling police "the blade went in like going into butter" and that he just wanted to show Valdivia how much he hurt him by sleeping with Hofmann.

Police said Hofmann taught Valdivia math at El Dorado High School in Chandler and was also Balbuena's teacher when he attended Marco de Niza High School in Tempe.

A call to both schools was not immediately returned Tuesday.

Hofmann's phone number is unlisted.

Balbuena is the one who called 911. he told officers he felt remorse for stabbing Valdivia after seeing him lying on the floor struggling to breath, police said.

Balbuena was arrested on a charge of second-degree murder after police found him covered in blood and told them about the killing. He does not yet have a lawyer.