(CNN) -- A Chinese court sentenced a man to death Friday for injuring 16 primary school children and a teacher with a knife, state media reported. The attack took place in late April.
Although none of the children died in the attack, Chen Kangbing was convicted of murder by Intermediary People's Court of Zhanjiang City in southeastern China's Guangdong province, according to the Xinhua news agency.
"Chen hacked at the children and teacher in a very cruel manner, causing great harm," the verdict said.
The Chinese penal code says a person can be convicted of intentional homicide for acting on an intent to kill, the news agency reported.
Chen, a teacher at another primary school, entered Leicheng No.1 Primary School in Leizhou City with a 40-centimeter (16-inch) knife and attacked children on April 28.
Since March at least four knife and cleaver attacks on school children in China have been reported.
Guns are strictly regulated in China, but until recently large knives were not. Chinese authorities have recently issued a regulation requiring people to register with their national ID cards when they buy knives longer that 15 centimeters.
Other measures have been put in place.
In April, the Ministry of Education ordered kindergartens, elementary and secondary schools to restrict strangers from entering the campuses. The ministry instructed schools across the country to hire security guards, install security facilities and ensure that pupils were escorted home. Schools were also urged to teach pupils to how to protect themselves.
In some schools, security guards have been armed with "forks," long poles with semi-circular prongs that can be used to fight assailants.