A knife-wielding man suspected of mental illness killed two people and injured 18 in China, the official Xinhua news agency reported.

Violent crime is rare in China compared with many other countries, but there has been a series of knife and axe attacks in recent years, many targeting children.

Twenty people were hospitalized after the Sunday attack in Guizhou province in the southwest and two died, Xinhua said.

It did not give any details of the victims.

The attacker, aged 30, is being held in police custody and the case was under investigation.

Xinhua cited the suspect's father as saying his son had a history of mental illness.

In January, a man wounded 11 children with a blade at their kindergarten in the Guangxi region. Seven children were wounded in a November attack by a man with a knife outside in another area.