Article 8. 
Habeas Corpus Ad Testificandum. 
§ 17‑41.  Authority to issue the writ.
Every court of record has power, upon the application of any party to any suit or proceeding, civil or criminal, pending in such court, to issue a writ of habeas corpus, for the purpose of bringing before the said court any prisoner who may be detained in any jail or prison within the State, for any cause, except a prisoner under sentence for a capital felony, to be examined as a witness in such suit or proceeding in behalf of the party making the application.
Such writ of habeas corpus may be issued by any magistrate or clerk of the superior court, upon application as provided in this section, to bring any person confined in the jail or prison of the same county where such magistrate or clerk may reside, to be examined as a witness before such magistrate or clerk.
In cases where the testimony of any prisoner is needed in a proceeding before a magistrate, or a clerk, and such person is confined in a county in which such magistrate or clerk does not reside, application for habeas corpus to testify may be made to any justice or judge of the General Court of Justice. (1868‑9, c. 116, ss. 37, 38; Code, ss. 1663, 1664; Rev., ss. 1855, 1856; C.S., s. 2243; 1969, c. 44, s. 43; 1971, c. 528, s. 3.)

§ 17‑42.  Contents of application.
The application for the writ shall be made by the party to the suit or proceeding in which the writ is required, or by his agent or attorney. It must be verified by the applicant; and shall state–
(1)	The title and nature of the suit or proceeding in regard to which the testimony of such prisoner is desired.
(2)	That the testimony of such prisoner is material and necessary to such party on the trial or hearing of such suit or proceeding, as he is advised by counsel and verily believes.  (1868‑9, c. 116, s. 39; Code, s. 1665; Rev., s. 1857; C.S., s. 2244.)

§ 17‑43.  Service of writ.
The writ of habeas corpus to testify shall be served by the same person, and in like manner in all respects, and enforced by the court or officer issuing the same as prescribed in this Chapter for the service and enforcement of the writ of habeas corpus cum causa. (1868‑9, c. 116, s. 40; Code, s. 1666; Rev., s. 1858; C.S., s. 2245.)

§ 17‑44.  Applicant to pay expenses and give bond to return.
The service of the writ shall not be complete, however, unless the applicant for the same tenders to the person in whose custody the prisoner may be, if such person is a sheriff, coroner, or marshal, the fees and expenses allowed by law for bringing such prisoner, nor unless he also gives bond, with sufficient security, to such sheriff, coroner, or marshal, as the case may be, conditioned that such applicant will pay the charges of carrying back such prisoner. (1868‑9, c. 116, s. 41; Code, s. 1667; Rev., s. 1859; C.S., s. 2246; 1971, c. 528, s. 4.)

§ 17‑45.  Duty of officer to whom writ delivered or on whom served.
It is the duty of the officer to whom the writ is delivered or upon whom it is served, whether such writ is directed to him or not, upon payment or tender of the charges allowed by law, and the delivery or tender of the bond herein prescribed, to obey and return such writ according to the exigency thereof upon pain, on refusal or neglect, to forfeit to the party on whose application the same has been issued the sum of five hundred dollars ($500.00). (1868‑9, c. 116, s. 42; Code, s. 1668; Rev., s. 1860; C.S., s. 2247.)

§ 17‑46.  Prisoner to be remanded.
After having testified, the prisoner shall be remanded to the prison from which he was taken. (1868‑9, c. 116, s. 43; Code, s. 1669; Rev., s. 1861; C.S., s. 2248.)