BEIJING (Reuters) - China executed a man on Thursday for killing nine students and injuring 11 others in a knife attack at a middle school in central China’s Shaanxi province in April, according to a post on a Chinese court’s official social media account.

Zhao Zewei was sentenced to death in July after being charged with homicide for attacking 19 students near a middle school in Mizhi county in China’s northwestern province of Shaanxi on April 27.

After receiving approval from China’s supreme court, the death sentence was carried out in Mizhi county of Shaanxi on Thursday, according to the statement from the Yulin City Intermediate Court.

Zhao had said he had taken knives into his former school in order to vent frustration and anger over his misfortunes in life and the bullying he was subjected to while attending the school, the statement said.

But the motives for depriving others of life were “despicable” and the methods were especially cruel, and so the supreme court agreed to the use of the death penalty, it cited the supreme court as ruling.

Violent crime is rarer in China than many other countries, due in part to strict gun controls and tight security in major cities. Recent years have seen a series of knife and axe attacks, however, including one this year in Beijing.

China does not release official figures for the number of people it executes every year, but rights groups estimate that more people are executed annually in the country than in all other countries combined.