A man using a kitchen knife has attacked three boys and a mother near a school in Shanghai, killing two of the children.
A 29-year-old suspect was caught by police with the help of passers-by following the attack at around 11.30am local time, the Xuhui district public security office said.
Two of the boys died in hospital, while another boy and the woman survived and did not have life-threatening injuries.
Police said the arrested man, surnamed Huang, had arrived in Shanghai earlier this month and was unemployed.
It said he carried out the attack “to take revenge on society”.
Because Chinese law tightly restricts the sale and possession of firearms, mass attacks are generally carried out with knives or homemade explosives.
Perpetrators of similar attacks in the past have been described as mentally ill or bearing grudges against society.
Many of those incidents have occurred at schools, including several in 2010 in which nearly 20 children were killed, prompting a response from top government officials and leading many schools to beef up security.