Police arrested a knife-wielding man in Shanghai on Thursday for killing two students near a primary school.
A statement published by the public security bureau of Shanghai's Xuhui district said the suspect, surnamed Huang, 29, confessed that he committed the crime because he could not make a living and wanted to take revenge on society.
Huang is jobless and came to Shanghai in June, the statement said.
The incident triggered public outrage over the suspect's cruelty toward children. Rumors quickly spread online, with some saying that the suspect was a parent who sought revenge because the school had expelled his child.
"The Shanghai government is wise to quickly disclose the motive behind the crime, as it can dispel rumors of injustice," Wang Hongwei, a professor at Renmin University's School of Public Administration and Policy, told the Global Times.
However, there is great concern on the internet on how to better protect children from such violence. Some netizens went so far as to demand that jobless migrant workers be sent back to maintain law and order.
"It is difficult to eradicate aimless killings. However, the government could take stricter measures to ensure safety in schools, transport stations and shopping malls to prevent loners from hurting innocent people," an expert told the Global Times on condition of anonymity.
Rescuers fished out bodies of four engineering students from a river Sunday in India's southern state of Andhra Pradesh