A man has stabbed 10 children outside the gates of a school in China before killing himself.

Six boys and four girls were attacked outside Yang Fan Primary School in the city of Haikou, on the southern island province of Hainan, state media reported.

They were taken to hospital. None of them suffered life threatening injuries, but two were seriously injured, media reports said.

Police described it as a "vicious" attack "brought on by extreme actions".

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

In April 2010, a man stabbed 29 school children and three teachers at a kindergarten in Taixing city, in eastern Jiangsu province.

The attacks were mostly carried out by disaffected perpetrators with mental illnesses.

They sparked outrage among Chinese parents, who demanded enhanced security at schools, and prompted nationwide discussion of what caused them.

Although Chinese leaders made public acknowledgements that underlying social tensions contributed to the crimes, several were censored by state media for fear of copycat attacks, while online discussions were also blocked.