Nine students have been stabbed to death and 10 injured in a knife attack outside a school in northern China.

A man suspected of carrying out the attack is alleged to be a former student taking revenge for having been bullied at the school.

According to reports, the assault took place near Mizhi County Number Three Secondary School in Shaanxi Province as the students were heading home for the day.

The suspect remains in custody.

Chinese police have given his surname as Zhao and say he is 28.

Their preliminary assessment is that he was motivated to take revenge because he was bullied in his third year where students are typically aged 13-14.

Police say the dead are seven girls and two boys.

The injured children are receiving treatment in hospital.

Their exact ages have not been given but reports suggest they may be middle school children, which would make them aged 12 to 15.

Knife attacks have made the headlines in China in recent years.