have been employed to effect the arrest under which the person is in custody, except that a guard or other person authorized to act as a peace officer is justified in using any force, including deadly force, which he believes to be immediately necessary to prevent the escape of a person from a jail, prison, or other institution for the detention of persons charged with or convicted of a crime.