The child later spoke about the incident with his parents, who immediately took contact with the school, TV4 reports.
“It is clearly inappropriate to act in this way, even if it was meant as a joke,” local education department manager Rolf Brunell told the station.
“We have not yet decided whether there will be any consequences for the teacher,” he added.
The incident took place at a school in Eskilstuna in central Sweden earlier this week. The teacher has continued working as normal since spanking the young pupil.