Homicide is justifiable if committed by a law enforcement officer or by any person acting by command of a law enforcement officer in the aid and assistance of that officer: (1) If necessarily committed in overcoming actual resistance to the execution of some legal process, or to the discharge of any other legal duty; or (2) If necessarily committed in retaking felons who have been rescued or who have escaped; or (3) If necessarily committed in arresting felons fleeing from justice. Source: SDC 1939, § 13.2004; SL 1976, ch 158 , § 16-9 ; SL 1977, ch 189 , § 43; SL 2005, ch 120 , § 163.