Updated

BEIJING (AP) — China executed Wednesday a man who stabbed eight schoolchildren to death last month in attacks that shocked the country, state media reported.

Zhang Minsheng, 41, was put to death in eastern Fujian province for the March 23 murders of eight children outside their elementary school as they waited with their parents for classes to start, the official Xinhua News Agency reported.

During his trial earlier this month, Zhang admitted to killing the children because he had been upset after being jilted by a woman and treated badly by her wealthy family.

On the morning of the attacks, Zhang, a medical worker, went to the Nanping City Experimental Elementary School armed with a dagger. He stabbed the children as they arrived with their parents for classes, leaving bloodstained bodies, before he was overpowered and arrested. Five other children were wounded.

China has witnessed a series of school attacks in recent years, most blamed on people with personal grudges or suffering from mental illness, leading to calls for improved security.

The most recent attack occurred two weeks ago when a mentally ill man hacked to death a second grader and an elderly woman with a meat cleaver in southern Guangxi, and injured five other people.