Five people, mostly students, were killed and about 20 others injured after a man intentionally drove a truck into a crowd outside a high school in southern China.

The male driver was shot dead by police, the official Xinhua news agency said, and at least two of the injured were in a critical condition.

The death toll rose from four after one critically injured victim died early today despite emergency treatment, according to Xinhua.

The report cited witnesses saying the truck ploughed at high speed into crowds of students leaving the school in Baijiao Township in Guangdong province as classes ended yesterday afternoon.

Xinhua also reported residents saying the driver, from central Hubei province, had been involved in a dispute over traffic violations with local police some days ago and had vowed revenge.

Their accounts have not been confirmed by officials, the report said.

"It all happened so fast. I even saw a person hanging on the moving truck,'' the report quoted one student as saying.

Click here to read more from News.com.au.