Mingsheng stands as he is sentenced in Nanping, south-eastern China
A former community doctor has been sentenced to death for stabbing and killing eight school children in southern China last month.
At the trial, Zheng Mingsheng said he killed the children at the gates of their primary school in Naping, Fujian province, Chinese media said.
He said he carried out the attack after being rejected by a woman.
Police said he had no history of mental illness - contradicting reports at the time of the murders.
At the trial, which lasted four hours, prosecutors played several video clips of Zheng stabbing children with a knife, China's official Xinhua news agency reported.
"Zheng, appearing agitated, repeatedly told the court he had been turned down by a girl and suffered unfair treatment from the girl's wealthy family, which prompted him to carry out the attack," Xinhua said.
Five children survived the attack at the school. One remains under observation in intensive care.
The families of the eight students killed have received more than 260,000 yuan ($38,000) each from the government in compensation, local officials said.