Section 18. Self-defence

An act which would otherwise be punishable, is lawful when it
  1. a.
    is committed to avert an unlawful attack,
  2. b.
    does not exceed what is necessary, and
  3. c.
    does not clearly go beyond what is justifiable, taking into account the dangerousness of the attack, the type of interest the attack violates, and the culpability of the assailant.
The rule in the first paragraph applies correspondingly to any person who effects a lawful arrest or attempts to prevent a person from evading being remanded in custody or serving a custodial sentence.
The exercise of public authority may only be met with an act of self-defence if the exercise of authority is unlawful and the person who exercises it acts with intent or gross negligence.