To use or attempt to use or offer to use force upon or toward the person of another is not unlawful if committed by a parent or the authorized agent of any parent, or by any guardian, teacher, or other school official, in the exercise of a lawful authority to restrain or correct the child, pupil, or ward and if restraint or correction has been rendered necessary by the misconduct of the child, pupil, or ward, or by the child's refusal to obey the lawful command of such parent, or authorized agent, guardian, teacher, or other school official, and the force used is reasonable in manner and moderate in degree.
SDCL 22-18-5