Updated

A 21-year-old man who broke into a high school dormitory and stabbed nine Chinese boys to death has been executed, less than two months after the attack, the government said Thursday.

Yan Yanming (search) was put to death Tuesday in the central province of Henan (search), where he was convicted of attacking the boys on Nov. 25 in the city of Ruzhou, the official Xinhua News Agency said.

The trial and execution were unusually swift for Chinese courts, and might have been expedited in an effort to reassure the public amid a series of such knife attacks at Chinese schools.

Yan's mother turned him in to police after he attempted suicide on the day following the attack, according to earlier reports. The agency said Yan confessed and said he slashed the students out of hatred.

The ordeal was the fourth knife attack reported at a Chinese school or day care center in as many months. The earlier assaults left one child dead and 42 people injured.

The earlier violence prompted Chinese President Hu Jintao (search) to issue a nationwide order in September for schools to hire guards and tighten security. It wasn't clear whether those new measures were in place at the school in Ruzhou.

The reason for the surge in knife attacks isn't clear. They have taken place in areas throughout China and involve attackers from different backgrounds.

In the November attack, police said Yan broke into the school dormitory at 11:45 p.m. on a Thursday night. The government-run China News Service cited a survivor who quoted Yan as saying, "Don't blame me."

Ruzhou, a city of 920,000 people, is located about 450 miles southwest of Beijing in Henan province, southwest of the giant industrial city of Zhengzhou.

Just before the attack there, a court executed a man who slashed 25 children with a kitchen knife in September at a grade school in eastern China. Though no one was killed, a court ruled that the penalty was justified because the violence was "especially cruel."

Police said that attacker had a grudge against the parent of a student at the school.

In August, a man with a history of schizophrenia killed a student and slashed 14 children and three teachers at a Beijing kindergarten.

In September, a man armed with a knife, gasoline and homemade explosives broke into a day-care center in the eastern city of Suzhou and slashed 28 children before police stopped him. Police haven't disclosed a possible motive.