A Chinese man attacked at least 20 young children at a Beijing primary school with a hammer on Tuesday, state television reported, in a rare act of violence in the capital.
A 49-year-old man, a former maintenance worker at the school, was detained after venting his anger on the children after his work contract was not renewed, state television cited police as saying.
Twenty were taken to the hospital, the government in the Xicheng district of the capital said in a post on its social media account.
Three suffered heavy injuries but their condition was stable, it said.
Police cars lined the main road close to the school when Reuters arrived at the scene.
Several police officers were seen coming from the school carrying items including sealed paper bags marked "physical evidence" and silver cases before driving off.
Parents waited outside for their children as the school day ended. Almost all of the parents Reuters approached declined to be interviewed.
"I heard that children were attacked (by someone) with a knife, so I'm very anxious," said a woman surnamed Zhou as she waited for her child to finish school.
Another parent, surnamed Jia, said she was concerned about her child's psychological wellbeing.
"Even though they were on the same floor as the one where this took place, they didn't know anything about this. So I really don't want this information to be spread widely so that he starts to feel scared," she said.
The attacker, originally from northeastern Heilongjiang province, had been detained by police and an investigation was under way, state television said.
The primary school, Beijing No. 1 Affiliated Elementary School of Xuanwu Normal School, was founded in 1908. According to the school's website, it has 2,537 students and 199 teaching personnel.
Violent crime is rare in China but there has been a series of knife and ax attacks in recent years, many targeting children. Many schools in China have beefed up security following violence against students and family members.
Last April, nine people were killed outside a middle school in northwestern China, allegedly by a former student seeking revenge for having been bullied. In November, five people were killed when a car plowed into a crowd of children outside a northeastern Chinese kindergarten.
In January 2017, a man in southern China stabbed and wounded 12 children with a vegetable knife. He was executed this month.
In 2010, nearly 20 children were killed in knife attacks outside school gates.