SINGAPORE - A High Court judge on Wednesday (July 19) said it was ironic that a hawker who intruded into a primary school classroom and slapped a nine-year-old boy for allegedly bullying his daughter, proceeded "self-righteously" to lecture the entire class on how it was wrong to bully others or behave like gangsters.

Justice See Kee Oon noted this as he sentenced the 47-year-old father to two weeks' jail, following an appeal by the prosecutors that the initial sentence of a $3,500 fine was too lenient.

The man, who cannot be named to protect the identities of the children involved, had pleaded guilty to causing hurt to the boy, who was so traumatised that he wet his pants after being slapped and berated.

Justice See agreed with prosecutors that a jail term was warranted to address the need for deterrence, the harm caused and the man's culpability.

He disagreed with the district judge's conclusion that a fine was sufficient because the man had acted on the spur of the moment and that the injuries were slight.

"What is especially aggravating is the respondent's deplorable violation of the sanctity of the school environment and the distress and disquiet caused to the children and their teacher," said Justice See.

He noted that the district judge viewed this as a case of the man trying to protect his daughter, albeit in the wrong way.

"With respect, this cannot possibly be a relevant factor in mitigation when the "protection" took the form of striking a vulnerable and defenceless nine year-old child," he said.

The judge allowed the man to start serving his jail term on Aug 10, after he told the court he needed to earn more money for his children's school fees. The fine he has paid will be refunded.

On the morning of Oct 7, 2015, the man's daughter said she did not want to go to school because of the schoolmate, who liked to "disturb" her. Her father drove her to school and was allowed onto the compound after he told the security guard he wanted to see the principal.

Instead, he went to a classroom on the third floor and interruped a music lesson. The girl pointed out the classmate and the man told the boy to come forward.

He confronted the boy for bullying his daughter and slapped his left cheek when the child denied the accusation.

The teacher then pulled the boy behind her to shield him but the man continued hurling accusations at the victim. He also stopped another pupil from leaving the classroom to seek help.

On Wednesday, Deputy Public Prosecutor Christina Koh argued that the man's "brazen excuses" for his conduct showed a disturbing lack of remorse on his part.

The man had contended in court that security at the school could have been tighter and that the incident had served as a life lesson to the children.

He also blamed the boy's injuries - red finger marks which were still visible seven hours later - on "sensitive skin".

Ms Koh argued there was a clear public interest in deterring people from intruding into schools to commit acts of violence against vulnerable victims.