Mitsuaki Kamozaki, a 52-year-old teacher, died from stab wounds to his back on Monday at the school in Neyagawa City, just outside Osaka in western Japan. Two other staff - a female teacher and a school nutritionist - were also stabbed and seriously injured. No students were hurt.
The attack was the latest high-profile spasm of violence at Japanese schools. Following a deadly attack in 2001 at another school near Osaka, schools have locked gates, posted guards and set up round-the-clock surveillance.
Chief Cabinet Secretary Hiroyuki Hosoda said the Cabinet was looking at ways to thwart intruders. "Schools have been taking security precautions by closing their gates, but we will further consider what should be done," Mr Hosoda told reporters.
Police found the 17-year-old boy in the faculty room after the assault smoking a cigarette with one hand and holding a bloody sashimi knife - usually used for slicing up raw fish- in the other. The boy's name was not released because he is a minor.
The attack panicked the school's 600 pupils and 30 teachers. Television footage showed small children, guided by adults, running out to an athletic field. The school didn't have a guard at its entrance. Its gates were open when the attack occurred as younger pupils were about to head home.
Monday's killing wasn't far from the elementary school where, in 2001, a man with a history of mental illness used a knife to kill eight children and injure more than a dozen others. The killer, Mamoru Takuma, was executed in September. Though such violence is rare in Japan, last June, an 11-year-old schoolgirl stunned the country when she murdered her 12-year-old classmate by slashing her with a box-cutter at lunchtime. The girl later said a row over the Internet provoked her to kill her 12-year-old friend.