Whenever any jail is on fire or any building contiguous or near a jail is on fire and there is reason to believe that the prisoners confined in the jail may be injured or endangered, the sheriff or keeper of the jail may remove the prisoners to some safe and convenient place and confine them as long as necessary to avoid such danger, or if the jail is destroyed, until some other place is provided by the county commissioners for their safekeeping.
W.S. 18-6-307