(1) Whosoever, by force or threat of force, offers resistance to or attacks a public official or soldier of the Armed Forces charged with the enforcement of laws, ordinances, judgments, judicial decisions or orders acting in the execution of such official duty shall be liable to imprisonment not exceeding three years or a fine.
(2) In especially serious cases the penalty shall be imprisonment from six months to five years. An especially serious case typically occurs if
1. the principal or another accomplice carries a weapon or another dangerous instrument for the purpose of using them during the commission of the offence; or
2. the offender through violence places the person assaulted in danger of death or serious injury.
(3) The offence shall not be punishable under this provision if the official act is unlawful. This shall also apply if the offender mistakenly assumes that the official act is lawful.
(4) If the offender during the commission of the offence mistakenly assumes that the official act is unlawful and if he could have avoided the mistake the court may mitigate the sentence in its discretion (section 49(2)) or order a discharge under this provision if the offender’s guilt is of a minor nature. If the offender could not have avoided the mistake and under the circumstances known to him he could not have been expected to use legal remedies to defend himself against the presumed unlawful official act, the offence shall not be punishable under this provision; if the use of remedies could have been expected the court may mitigate the sentence in its discretion (section 49(2)) or order a discharge under this provision.