(1) Subject to subsection (5), a correctional officer may use a firearm against any inmate escaping or attempting to escape but resort shall not be had to the use of any such weapons unless the officer has reasonable grounds for believing that he or she cannot otherwise prevent the escape.
(2) Subject to subsection (5), a correctional officer may use a firearm against any inmate engaged in any group effort to break out or in any attempt to force or break open an outside door, gate or enclosure wall of a correctional facility, and may continue to use such weapons so long as such effort or attempt continues.
(3) A correctional officer may use a firearm against inmates using violence against any person if such officer has reasonable grounds to believe that such person is in danger of life or limb or that other grievous harm is likely to be caused to him or her.
(4) Before using a firearm against an inmate the correctional officer shall, if possible, give the inmate a warning that the officer is about to fire on him or her.
(5) No ungazetted officer shall, in the presence of a gazetted officer, use a firearm of any sort against an inmate in the case of an attempt to escape or of breakout except under the orders of the gazetted officer.
(6) The use of firearms under this section shall, as far as possible, be to disable and not to kill an inmate.
(7) Any police officer who is, for the time being, serving in the capacity of an escort, or of a guard in or around any correctional facility or lock-up, for the purpose of ensuring the safe custody of any inmates or persons detained in a lock-up, shall be deemed to have all the powers and privileges granted to correctional officers under this section for the purposes of his or her duties in relation to such inmates or persons detained.