BEIJING — The suspect in a Chinese elementary school stabbing that left eight children dead and five wounded said he felt life was meaningless after romantic failures and a fruitless job search, reports said Wednesday.

Former medical worker Zheng Minsheng is accused in Tuesday morning’s knife attack in the Fujian province city of Nanping — one of China’s most shocking crimes in years.

Zheng, 41, carried out the minute-long rampage as dozens of students and their parents stood outside the gates of the Nanping Experimental Elementary School waiting for it to open,

The dead included four boys and four girls, ages 6 to 11, while four of the wounded were in intensive care at a hospital after being stabbed in the chest, local media in Fujian province reported.

The suspect told investigators his girlfriend did not want to marry him and that he felt his peers looked down on him, according to a news release on the Nanping city government Web site. He also could not find a job and felt life was “meaningless.”

Reports identified Zheng as a doctor, although his official government-issued identity card said he only had a technical school education.