13-4075. Removal of prisoner to attend as witness; procedure; duty of sheriff
A. When the testimony of a material witness for the state or for defendant is required in a criminal action before a court of record, and the witness is a prisoner in the state prison, or a jail, an order for his temporary removal from such prison or jail, and for his production before the court, may be made by the court in which the action is pending, or by the judge thereof. If the prison or jail is without the county in which the application is made, the order shall be made only upon the affidavit of the attorney for the state or for defendant, showing that the testimony is material and necessary. The granting of the order is in the discretion of the court or judge.
B. The order provided in subsection A of this section shall be executed by the sheriff of the county in which it is made, who shall bring the prisoner before the court, safely keep him and, when he is no longer required as a witness, return him to the prison or jail from which he was taken.