The director of the department of corrections and rehabilitation shall be responsible for offenders committed to the legal and physical custody of the department. The director shall retain, confine, and imprison each offender committed to the department until the expiration of the offender's sentence or until the offender is lawfully entitled to release. The director shall care for, govern, and make an effort to employ all offenders in conformity with their sentences and in the manner prescribed by law and the rules and regulations lawfully adopted for the conduct of the penitentiary and the department.
N.D.C.C. § 12-47-18