A teenager accused of stabbing a classmate to death at their high school for rejecting his invitation to the junior prom pleaded no contest to murder Monday, and prosecutors said they will seek a 25-year prison sentence.

Christopher Plaskon, 18, accepted a plea bargain during a brief appearance in Milford Superior Court. Sentencing is set for June 6.

Plaskon was charged with killing 16-year-old Maren Sanchez at Jonathan Law High School in Milford on April 25, 2014, after his family and friends said he became upset that Sanchez turned down his prom invitation.

Plaskon was held at a psychiatric hospital after the stabbing. His attorneys said he showed signs of psychosis and they were considering an insanity defense.

The attack happened in a first-floor hallway at about 7:15 a.m. on April 25, 2014, the day of the junior prom. Students described an emotional scene where people were crying as police and paramedics swarmed the school.

A witness tried to pull Plaskon off Sanchez during the attack, and another saw Plaskon discard a bloody knife, according to an arrest warrant affidavit. Plaskon was taken to the principal's office in bloody clothing and told police, "I did it. Just arrest me," according to the affidavit.

Staff members and paramedics performed life-saving measures on Sanchez, but she was pronounced dead at a hospital shortly afterward. The medical examiner's office said she was stabbed in the torso and neck.

Sanchez, a member of the National Honor Society who was active in drama and other school activities, had been focused on prom in the days before she was killed. She had posted on Facebook a photograph of herself wearing a blue prom dress and was looking forward to attending with a new boyfriend.

At school on the day before the stabbing, Sanchez and a friend talked excitedly about their plans for the upcoming dance.

A friend of Plaskon's told police that Plaskon thought about hurting Sanchez because he wanted to be more than friends with her. The friend said Plaskon said he wouldn't mind if Sanchez "was dead or hit by a bus."