The child, Sperius Eradius, died on 27 August 27, days after the beating for allegedly stealing another teacher's handbag, according to family members.

NAIROBI, Kenya - A Tanzanian court sentenced a teacher to death Wednesday after a 13-year-old pupil died from a beating meted out by him in a case that sparked a national debate on corporal punishment in schools.

The child, Sperius Eradius, died on 27 August 27, days after the beating for allegedly stealing another teacher's handbag, according to family members.

Judge Lameck Mlacha of the court in Bukoba in the north west, found teacher Respicius Mutazangira "guilty beyond reasonable doubt of the crime of voluntary homicide" and sentenced him to death.

Mutazangira has the right to appeal.

The boy's parents, in protest, had refused to bury their son until authorities arrested the teacher and suspended the school principal.

The case triggered an uproar, with condemnations from rights organisations.

It followed another case in 2016, in which a girl was allegedly forced to remove her underwear before being caned by four teachers in succession.

The girl's alleged crime was serial absenteeism.

Corporal punishment is allowed under a 1979 law, but with restrictions.

Blows may only be administered by principals, must be focused on the hands or buttocks with the use of a light and flexible rod, and may only be dealt out in a "reasonable" manner in the case of serious offences.

In a report in 2017, Human Rights Watch (HRW) said "Widespread corporal punishment... often takes brutal and humiliating forms in Tanzanian schools," and called on the government to ban such beatings.