The director of the department of corrections and rehabilitation may transfer an offender to any facility under the department's control or contract to transfer an offender to another correctional facility for purposes of safety, security, discipline, medical care, or when the director determines it may be in the best interests of the public, the offender, or the department.
N.D.C.C. § 12-47-18.1