China has executed a farmer who attacked several children with a knife at a kindergarten in a southern Chinese city two years ago, state media reported Monday.

Yan Pengan was executed last Friday for slashing young children at the school in the Guangxi Zhuang region, the official Xinhua news agency reported.

Knife-wielding kindergarten attacker is executed. Photo: State Media screenshot.

Yan went to the kindergarten with a kitchen knife in January 2017 and attacked 12 children, seriously injuring four of them.

A teacher fended off the attack and called for help as Yan fled the scene. He later surrendered himself to local authorities.

Knife attacks targeting schoolchildren are not uncommon in China.

”Video (disturbing images)”

Last October, a knife-wielding woman injured 14 children at a Sichuan province kindergarten.

In April 2017, a man killed nine middle school students as they were returning home in one of the country’s deadliest knife attacks in recent years.

The suspect in that case, who was later executed, had told police he was exacting revenge because he had been bullied when he attended the school.

Such events have forced authorities to increase security around classrooms.

Sichuan province in China. Photo: Wikimedia commons.

Violent crime has been on the rise in China in recent decades as the nation’s economy has boomed and the gap between rich and poor has widened rapidly.

Studies have also described a rise in the prevalence of mental disorders, some of them linked to stress as the pace of life becomes faster and support systems wither.

AFP is a global news agency delivering fast, in-depth coverage of the events shaping our world from wars and conflicts to politics, sports, entertainment and the latest breakthroughs in health, science and technology.