One more student was injured when he fell trying to escape the scene, police said.

The incident has again raised concerns over school safety.

The injured were rushed to hospital for treatment and were all in stable condition, Qin Zhucai, director of the general affairs office of Leizhou public security bureau, told China Daily on Wednesday night.

The suspect, Chen Kangbing, in his 30s, was brought under control by police about 4 pm, about an hour after the stabbings in the Leicheng No 1 Primary School.

The suspect, a teacher in a village in Baisha town of Leizhou, entered the school by following other teachers for an open class, police said.

"Students in four classrooms were targeted by Chen," Qin said.

Chen attempted to jump from the school building to kill himself before he was grabbed, Qin said.

The school authorities used the loud speaker to urge the rest of the students to evacuate after the incident broke out about 3 pm.

The case again exposed the problem of school safety.

On March 23, Zheng Minsheng, a former community doctor, stabbed eight children to death and seriously injured five others at the gate of the Nanping Experimental Elementary School in East China's Fujian province.

Zheng, 42, was executed on Wednesday in Nanping after his death sentence was approved by the Supreme People's Court.

The top court reviewed Zheng's case and ratified the sentence handed down by the local court, said a statement released by the Intermediate People's Court of Nanping City.

An investigation found Zheng stabbed the children out of frustration at failures in his romantic life, the statement said.

In another recent case, a man around 40 years old stabbed an 8-year-old boy and a 70-year-old woman to death 400 meters from the Xizhen Primary School in Xichang town of South China's Guangxi Zhuang autonomous region on April 12.

He also injured two boys, aged 7 and 12, a 7-year-old girl and a couple in their 30s.

The Education Ministry earlier this month instructed kindergartens, primary and high schools to upgrade security.

It ordered schools to integrate safety awareness into the curriculum, teach children self-protection, hire security guards, install security facilities and make sure young students were escorted home.