§ 17-3. Who may prosecute writ.
Every person imprisoned or restrained of his liberty within this State, for any criminal or supposed criminal matter, or on any pretense whatsoever, except in cases specified in G.S. 17-4, may prosecute a writ of habeas corpus, according to the provisions of this Chapter, to inquire into the cause of such imprisonment or restraint, and, if illegal, to be delivered therefrom. (1868-9, c. 116, s. 1; Code, s. 1623; Rev., s. 1821; C.S., s. 2205.)
§ 17-4. When application denied.
Application to prosecute the writ shall be denied in the following cases:
(1) Where the persons are committed or detained by virtue of process issued by a court of the United States, or a judge thereof, in cases where such courts or judges have exclusive jurisdiction under the laws of the United States, or have acquired exclusive jurisdiction by the commencement of suits in such courts.
(2) Where persons are committed or detained by virtue of the final order, judgment or decree of a competent tribunal of civil or criminal jurisdiction, or by virtue of an execution issued upon such final order, judgment or decree.
(3) Where any person has willfully neglected, for the space of two whole sessions after his imprisonment, to apply for the writ to the superior court of the county in which he may be imprisoned, such person shall not have a habeas corpus in vacation time for his enlargement.
(4) Where no probable ground for relief is shown in the application. (1868-9, c. 116, s. 2; Code, s. 1624; Rev., s. 1822; C.S., s. 2206; 1971, c. 528, s. 1.)
§ 17-5. By whom application is made.
Application for the writ may be made either by the party for whose relief it is intended or by any person in his behalf. (1868-9, c. 116, s. 3; Code, s. 1625; Rev., s. 1823; C.S., s. 2207.)
§ 17-6. To judge of appellate division or superior court in writing.
Application for the writ shall be made in writing, signed by the applicant -
(1) To any one of the justices or judges of the appellate division.
(2) To any one of the superior court judges, either during a session or in vacation. (1868-9, c. 116, s. 4; Code, s. 1626; Rev., s. 1824; C.S., s. 2208; 1969, c. 44, s. 41; 1971, c. 528, s. 2.)
§ 17-7. Contents of application.
The application must state, in substance, as follows:
(1) That the party, in whose behalf the writ is applied for, is imprisoned or restrained of his liberty, the place where, and the officer or person by whom he is imprisoned or restrained, naming both parties, if their names are known, or describing them if they are not known.
(2) The cause or pretense of such imprisonment or restraint, according to the knowledge or belief of the applicant.
(3) If the imprisonment is by virtue of any warrant or other process, a copy thereof shall be annexed, or it shall be made to appear that a copy thereof has been demanded and refused, or that for some sufficient reason a demand for such copy could not be made.
(4) If the imprisonment or restraint is alleged to be illegal, the application must state in what the alleged illegality consists; and that the legality of the imprisonment or restraint has not been already adjudged, upon a prior writ of habeas corpus, to the knowledge or belief of the applicant.
(5) The facts set forth in the application must be verified by the oath of the applicant, or by that of some other credible witness, which oath may be administered by any person authorized by law to take affidavits. (1868-9, c. 116, s. 5; Code, s. 1627; Rev., s. 1825; C.S., s. 2209.)
§ 17-8. Issuance of writ without application.
When the appellate division or superior court division, or any judge of either division, has evidence from any judicial proceeding before such court or judge that any person within this State is illegally imprisoned or restrained of his liberty, it is the duty of said court or judge to issue a writ of habeas corpus for his relief, although no application be made for such writ. (1868-9, c. 116, s. 10; Code, s. 1632; Rev., s. 1826; C.S., s. 2210; 1969, c. 44, s. 42.)