Eight schoolchildren have been killed in China after a cleaver-wielding man allegedly broke into a primary school and slashed pupils on the first day of the new term.

Another two students were injured in the attack yesterday morning and were being treated in hospital, police said.

The culprit, a 40-year-old man with the surname Yu, has been detained by police.

The attack occurred in China's Chaoyangpo Primary School (pictured) on the first day of class

Footage released by Chinese outlet Passion News shows ambulances entering the school

Eight pupils have been killed in a stabbing spree in a primary school in China. The culprit slashed boys and girls with a cleaver to take revenge on society, an insider revealed

The suspect had been freed from jail and launched the stabbing spree to take revenge on society, an insider revealed.

The attack occurred about 8am in Baiyangping Town in Enshi city, Hubei province.

Yesterday was the first day of the new semester in China when pupils went back to class after a two-month-long summer break.

'The culprit was released from prison after serving his term not long ago,' a local resident told Passion News, a state-approved news outlet affiliated to the Young Pioneers of China.

The attack occurred about 8am today in Baiyangping Town in Enshi city (pictured) in Hubei

The resident added: '[He] wanted to take revenge on society so he took a cleaver and went to the Chaoyangpo Primary School in Baiyangping Town.'

Passion News also released footage of ambulances being called to the school.

A source who works at the Hubei prison system told China's Southern Weekly that Yu was released in June, 2018, after serving more than eight years in jail for attempted murder.

The authority of Enshi, Hubei Province, is expected to announce more details of the case today

The source claimed to have seen the suspect loitering in front of the school gate a day before the stabbing.

The case is under further investigation. Yu's motive is yet to be confirmed by the police.

Knife crimes are relatively rare in schools in China, but a number of high-profile cases have happened last year rocking the country.

In June last year, two children were stabbed to death by a man outside an elementary school in Shanghai.

In April last year, nine were killed and more than a dozen injured outside a middle school in north-western Shaanxi province by an attacker who allegedly was a former pupil seeking revenge for having been bullied.

In October, a woman slashed children on the playground of a kindergarten with a cleaver, leaving 14 pupils injured.