Three students have been arrested in connection with the murder of a teacher after he reportedly confiscated at least one mobile phone.
Peter Omari, a Kenyan Physics teacher at Hopewell High school in Nakuru, was attacked on Thursday.
Students are prohibited from taking mobile phones to many schools Kenya as they are blamed for exam cheating and indiscipline.
Officials told the BBC that Mr Omari had been supervising evening studies.
The area’s deputy county commissioner, Elim Shafi, said that Mr Omari was walking back to his home inside the school compound in Nakuru, 150km (95 miles) north-west of the capital, Nairobi, when he was struck on the head.
Attacks on teachers and schools are a growing concern for the authorities, says the BBC’s Mercy Juma in Nairobi.
Last year, a teacher was murdered with a machete by students in Kisume, western Kenya, reportedly after a heated exchange at a bar.
In 2016, students at a boarding school in Kisii burnt down the dormitories allegedly after they were banned from watching a live broadcast of a Euro 2016 football match.