If a convict sentenced to the penitentiary resist the authority of any officer, or refuse to obey his lawful commands, it shall be the duty of such officer immediately to enforce obedience by the use of such weapons or other aid as may be effectual, and if in so doing, any convict thus resisting be wounded or killed by any such officer or his assistant, or any guard or other employe [employee], they shall be justified and shall be held guiltless; but such officer, assistant, guard or other employe [employee] shall not be excusable for using greater force than the emergency of the case demands.
NMS § 33-2-30