Beijing: A disgruntled maintenance worker at a primary school here attacked and injured 20 students with a hammer on Tuesday, according to authorities.

The attack took place at the Beijing No.1 Affiliated Elementary School of Xuanwu Normal School in Xicheng district just after 11.15 a.m., the police said on their official Weibo account.

They said the 49-year-old man, surnamed Jia, was a contract worker in charge of maintenance at the school. His employment contract was due to expire at the end of January, and the school and labour dispatch company were discussing the arrangement of Jia’s new position, Xinhua news agency reported.

In a bout of fury, Jia attacked the students using a hammer he worked with. He was caught at the scene and an investigation into the incident was underway.

The police statement added that three students were seriously injured but were in a stable condition.

“The children were attacked while they were doing exercises on the school running track. The attacker was standing nearby and used a hammer-like weapon to hit the children’s skulls one by one, before he was stopped by a teacher,” said one parent on WeChat.

The attack came after a Chinese man was executed on Friday for injuring 12 children in a knife attack at a nursery in the country.