127A-54. Pretrial confinement; sentences; where executed.
(a) A defendant may be arrested and placed under pretrial confinement in a local government confinement facility, but a determination shall be made under subsection (b) of this section whether he or she shall remain confined pending the court-martial. If the defendant is not released from confinement, he or she shall be transferred into the custody of the Sheriff of Wake County and confined in the Wake County confinement facility pending trial. All costs of transportation and confinement are to be paid from funds appropriated to the Department of Public Safety as reimbursements to the local government or agency providing the transportation and confinement.
(b) The provisions of Article 26 of Chapter 15A of the General Statutes shall apply to any defendant who has been placed into pretrial confinement, in the same manner as if the defendant had been placed into confinement for an alleged violation of the criminal laws of this State. Nothing in this section is intended to abridge the right of habeas corpus.
(c) Any defendant whose sentence by a military court includes confinement shall be placed into the custody of the Division of Adult Correction and Juvenile Justice of the Department of Public Safety. The Division of Adult Correction of the Department of Public Safety is authorized to transfer physical custody of the defendant to a local confinement facility.