For 18 years, the “cool teacher” preyed on his female students, first at Stamford High School and later at Fairfield Ludlowe High School, luring them with sweet words and poetry.

But on Friday, Glenn Mishuck was brought to justice for the lives he damaged, as two of his victims sobbed with their families in the back of a courtroom at state Superior Court in Bridgeport.

He was sentenced to three years in prison, 15 years of probation, and he must register as a sex offender.

“In the last year in this very courtroom I have sentenced a fencing instructor and a Trumbull police officer, and now you, Mr. Mishuck, for doing the same thing, and it has to stop,” Judge Robert Devlin said, banging his fist on the desk. “You have to leave these kids alone.”

Mishuck, 49, was arrested in the fall of 2013 after a five-month sexual relationship with a student at Fairfield Ludlowe High. That student told the judge that during her relationship with Mishuck she had suspected that there might have been others.

“When I brought this up to him he just laughed it off and said I was being paranoid and dismissed it,” she said.

But it became clear that his activities went on well before that, as a young woman dressed entirely in white came before the judge.

“From 1995 to 1996, I was a student at Stamford High School,” she began, dabbing tears from her face with a tissue. “English was my favorite subject and I enjoyed talking about English with Mr. Mishuck.”

On her 17th birthday, he gave her several poetry books and they read poetry together, she said.

“It fueled my romantic fantasies, and I admit I developed a schoolgirl crush on him,” she continued.

They would go on walks together.

“We made out during these clandestine encounters. He was sexual with me and professed his love for me,” she said, crying. “I assumed he was going to leave his wife for me, but that was not the case and I was heartbroken.”

She said Mishuck broke off their relationship when a colleague at Stamford High School warned him that other teachers were beginning to talk. The woman said she never said anything about the relationship with Mishuck until she read about his arrest in the more recent Fairfield case.

“I dearly regret not coming forward sooner, because maybe it would have prevented what he did with this other young woman,” she added.

Mishuck, a teacher for 20 years, pleaded guilty to four counts of second-degree sexual assault in connection with the Fairfield case as a jury was being selected for trial. He could not be charged in the Stamford case because it occurred beyond the statute of limitations for the crime.

But Senior Assistant State’s Attorney Ann Lawlor told the judge she intended to call the Stamford victim to the witness stand if the case had gone to trial. Mishuck’s lawyer, William Westcott, said he would have fought that.

And then, for the first time, Mishuck on Friday faced his victims across the crowded courtroom.

“First, I would like to apologize for the anguish and anxiety and the hurt my actions brought about,” he said, looking at the judge. “I am fully prepared to accept whatever punishment you deem appropriate. My hope is that with this hearing there comes some closure to my former students, and they can move forward with their lives,” he continued glancing to the back of the courtroom.”

But his older victim had already left.