Giovanna Nobile, 54, had gone into the Pappalardo di Vittoria school in southern Sicily for a teachers' meeting and was confronted by Salvatore Lo Presti as she was leaving the building.
Lo Presti, known as "the poet" around school because of his passion for writing poems, shot her five times in the abdomen before another teacher tackled him and forced him to drop the gun.
The janitor, who was a few days off his retirement, fled the scene but was caught by police in a nearby street and arrested for murder.
"I've known him for nearly 30 years. Did he secretly hate her or did he have a weakness for her? How can we know," he said.