"I saw him swinging the wrench around madly so I told the children to duck down and rushed him again and kicked him in the groin."
After being scared off by the teacher, the assailant fled on his motorbike, the newspaper said.
He was later found by police with a self-inflicted wound to his stomach in an apparent suicide attempt, the paper said.
Investigators found that the man, who was taken to hospital, had a history of mental illness, the paper said.
All 18 children and the teacher have been hospitalised, with 16 of the pupils suffering from severe concussion, it said.
The incident occurred just before the end of the school for the day, as parents were arriving to collect their children.