The lovesick Connecticut teen who stabbed a classmate to death in a high school hallway after she spurned his invite to their junior prom got a lenient plea deal today that will land him behind bars for just 13 years.

Christopher Plaskon, 18, pleaded no contest in Milford Superior Court to murdering popular Maren Sanchez on April 25, 2014 — a heinous crime that shocked the waterfront community for its sudden brutality.

Plaskon, wearing thick black glasses and a yellow prison jumpsuit, stood impassively as his lawyers entered the plea before Judge John Ronan before a packed courtroom.

State’s Attorney Kevin Lawlor recommended that Plaskon get a 25-year prison term when he is sentenced on June 6.

But because he was just 16 when he killed the 16-year-old Sanchez, he will be sentenced under Connecticut’s lenient Juvenile Justice Act, which lets him off the hook after serving just 60 percent of his sentence.

Since he’s already served two years in a cushy juvenile facility in Cheshire, he could walk free at the age of 31.

Edward Gavin, Plaskon’s lawyer, negotiated the deal with Lawlor, with Ronan overseeing the details.

And while the victim’s family apparently signed off on the plea, Sanchez’s prom date, who was a friend of both Sanchez and Plaskon since childhood, slammed the light sentence.

“I don’t believe the sentence fits the crime at all,” Jarrod Butts, 18, told The Post.

“I would have liked it to be for at least 40 years. The pain he caused is not justified by 25 years. I could never see this coming.”

Plaskon, an acne-scarred nerd with long, slicked black hair, was obsessed with Sanchez, a pretty athlete and National Honor Society member who was also active in the Jonathan Law High School drama club.

He asked her to be his prom date, and was crushed when she turned him down and told him she was going with Butts.

Plaskon pounced about 7 a.m. in a first-floor hallway after the snub, viciously slashing her neck and torso.

A teacher tried to pull the raging Plaskon off Sanchez during the attack, and another witness saw Plaskon drop a bloody knife, authorities said.

The nutjob — whose lawyers had said earlier they would mount an insanity defense — was hustled to the principal’s office, his clothes drenched in blood, and told cops, “I did it. Just arrest me,” they said.

Plaskon, who was overheard muttering to himself a day or so before the attack, also told cops that “demons” had been instructing him before the killing.

Sanchez had been focused on her prom in the days before she was killed, posting a photo on Facebook of herself wearing a blue prom dress.

At school on the day before she was killed, she and a friend talked excitedly about their plans for the big dance.

A pal of Plaskon’s later told cops that Plaskon thought about hurting Sanchez after she turned him down, saying he didn’t care if she “was dead or hit by a bus.”