In cases in which any party is held under illegal restraint or custody, and any other person is entitled to the custody or restraint of such party, the court may order such party to be committed to the custody or restraint of such person as by law is entitled thereto.
N.D. Cent. Code § 32-22-22
Prisoner may be ordered to custody of proper officer
Official source: North Dakota Legislative Branch. Reproduced from public-domain North Dakota statutes; confirm against the official source for the current text. Not legal advice.