An exasperated Manhattan middle-school teacher got so enraged when her students wouldn’t stop talking that she fantasized aloud about stabbing them, schools investigators said.

Former Collaborative Academy of Science Technology and Language Arts teacher Jacqueline Baffoni allegedly made the comments in class toward the end of last school year — around the time she was informed she might be jettisoned as a probationary teacher.

“I feel like stabbing some of these kids — I have a knife here,” the teacher said, a student in the eighth-grade class told probers from the Office of the Special Commissioner of Investigation (SCI).

Another student said the teacher, who kept a blade in her desk for slicing fruit, added, “I have a knife in this room, and I wish I could stab them!”

Baffoni’s remark was allegedly aimed at a group of unruly kids in the back of the Lower East Side classroom.

The alleged outburst came a day after Baffoni’s supervisors warned her in writing that they were considering “whether your services as a probationer be discontinued” at the end of the school year.

Click for more from the New York Post.