General Part
Section II. Crime
Chapter 8. Circumstances Excluding the Criminality of a Deed
Article 39. Extreme Necessity
1. The harming of legally protected interests in a state of extreme necessity, that is, for the purpose of removing a direct danger to a person or his rights, or to the rights of other persons, to the legally-protected interests of the society or the State, shall not be deemed to be a crime if this danger could not be removed by other means and if there was no exceeding the limits of extreme necessity.
2. The infliction of a harm that obviously does not correspond to the nature and the degree of threatened danger, nor to the circumstances under which the danger was removed, when equal or more considerable harm was caused to said interests than the harm averted, shall be deemed to be excess of extreeding necessity.
Such excess shall involve criminal responsibility only in cases of the intended infliction of harm .
Necessity - national proceedings
EDIT.