Chinese police arrested a man who murdered two schoolchildren in Shanghai as his revenge on society, state media reported on Thursday.

The incident took place outside the Shanghai World Foreign Language Primary School at around 11:30 a.m. on Thursday, the state propaganda outlet Global Times said. Video footage circulated on Chinese social media platform Weibo of people restraining the man with a rope on a roadside pavement. Onlookers can be heard shouting “Beat him to death,” and “He’s a psycho,” while some adults can be seen crouched over a child’s body.

According to the Global Times, the 29-year-old man identified only as Huang confessed to committing the crime because he was unemployed and wanted to take his “revenge on society.”

The killings reportedly sparked public outrage. Online rumors surfaced, Chinese media reported, that the man’s child had been expelled from the school and therefore wanted revenge. Police have not confirmed this detail, however. The incident has also led to great concern among Chinese families for the safety of their children and triggered a call for jobless migrant workers to be expelled from the city to help “maintain law and order.”

China holds one of the world’s lowest rates of violent crime, especially in major cities where there is a considerable police presence, while laws on gun ownership are notoriously tight.

In recent years there have been a series of gruesome attacks of violence involving knives and machetes, many of which have targeted children, leading to increased safety measures such as the construction of gates and the employment of security personnel.

In April, a 28-year-old man killed nine Chinese middle school students traveling between classes in the northwestern province of Shaanxi. The man later revealed he resented children after his own experiences of being bullied at school.

“It is difficult to eradicate aimless killings,” the Global Times quoted an “expert” as saying. “However, the government could take stricter measures to ensure safety in schools, transport stations, and shopping malls to prevent loners from hurting innocent people.”

In 2014, a group of knife-wielding men slaughtered 29 people and wounded 130 others at a Kunming train station in China’s Yunnan Province. Authorities condemned the attacks as a “serious violent terrorist attack planned and organized by Xinjiang separatist forces” seeking independence from China.

Follow Ben Kew on Facebook, Twitter at @ben_kew, or email him at bkew@breitbart.com.