In case any such person shall be confined in any county jail it shall be the duty of the sheriff or jailer to deliver him to the appropriate municipal officer whenever such prisoner is to work for such municipality but such prisoner shall be returned to such county jail each night.
NMS § 35-15-6