A Connecticut teen pleaded "no contest" to murder on Monday in the stabbing death of a female classmate in a school hallway hours before their 2014 junior prom.

Christopher Plaskon, 18, faces a 25-year prison sentence as part of the plea deal, State's Attorney Kevin Lawlor of Milford city said.

At the time of his arrest, Plaskon admitted to killing 16-year-old Maren Sanchez, the junior class president and a National Honor Society student, at Milford's Jonathan Law High School in April 2014.

"We took into consideration his age at the time of the crime and that it avoided a trial that the victim's family wanted to avoid," Lawlor said of the plea deal.

RELATED: Michael Skakel murder case goes to Connecticut Supreme Court

Plaskon is set to be sentenced on June 6 in Superior Court in Milford.

His lawyer, Richard Meehan, did not immediately respond to a request for comment.

Police said Plaskon attacked Sanchez in a hallway on the Friday morning of the prom, fatally stabbing her in the neck and torso. Police believe that he killed her after she rejected his invitation to the annual formal dance.

A knife was recovered near the crime scene, a police report stated. A witness saw Plaskon discard the bloody knife onto a hallway floor, according to the report.

As he was taken into custody, covered in blood, Plaskon told the arresting officer: "I did it. Just arrest me," according to court documents.