A Chinese court sentenced a man to death today for an attack on a school that left 29 children and three kindergarten teachers hurt last month.


The attack on 29 April was one of five major assaults against schoolchildren in the last two months that have left 17 dead and more than 50 wounded.


The Taizhou Intermediate Court in the eastern province of Jiangsu found Xu Yuyuan guilty of attempted murder, the official state Xinhua News Agency reported.


The 47-year-old unemployed Xu told the court he was venting his anger against society, the report said.


China has ordered tighter security at schools following another school attack on Wednesday, the deadliest so far. In that attack, a man broke into a pre-school with a cleaver and killed seven children and two adults. The man was reportedly depressed and suicidal.


The rampages have focused attention on the consequences of ignoring mental illness in modern China, as huge economic inequalities stoke social tensions.


"We are making serious efforts in tackling social tensions, settling disputes and improving local governments' ability to smooth things out," prime minister Wen Jiabao told Hong Kong's Phoenix TV in the first comments from the country's communist leadership on the attacks.


His apparently unscripted comments on the sidelines of a meeting were played down in official media. China's state-controlled press has avoided discussing the attacks' underlying issues, focusing instead on security measures.


An official said on Friday that in the future police would open fire on any school attackers.


"If criminals dare to do this kind of thing again, we will act according to criminal law and firearms regulations, and without mercy. Because being tolerant of this kind of crazy criminal behaviour is a crime and is irresponsible to millions of people," a spokesman for the public security ministry, Wu Heping, told a news briefing.


The man convicted for the first of the five school attacks, Zheng Minsheng, has been executed already. Zheng killed eight children in a knife attack in the southern province of Fujian on 23 March.