Tanzanian President John Magufuli has lauded a regional governor who caused outrage by caning 14 schoolchildren, saying he should have done more.
Footage of the punishment, which went viral on the internet, showed Albert Chalamila, governor of Mbeya in southern Tanzania, giving three strokes of the cane to each student, all of them stretched out on the ground.
They had violated a ban on having mobile phones in their school and are accused of burning down their dormitory in retaliation.
The punishment was administered in front of the students' schoolmates, police officers and teachers and unleashed wide criticism on social media.
"I congratulate the regional commissioner for caning the students and that was actually not enough. He could do more," the president said on Thursday during a visit to a neighbouring region.
"Some people are talking about human rights but there is no way we can afford having arrogant students like these. They can't burn a dormitory just because their phones which are not allowed in schools were taken by teachers.
"I told the regional commissioner to suspend all students in that school and their parents must pay before the students are allowed back to school. Those who were directly involved should be taken to jail."
Under a 1979 law, corporal punishment can only be administered by the school's director, and only in the event of serious breaches. The punishment is administered by a light, flexible cane on the hand or buttocks.
Corporal punishment in schools flared into a national controversy last year after a 13-year-old boy in the northern province of Kagera died of injuries inflicted by his teacher.
Human Rights Watch, in February 2017, said corporal punishment in Tanzanian schools was widespread, frequently "brutal and humiliating" and called for it to be banned.