21-27-16. Causes for discharge of applicant committed on judicial process.
If it appears on the return of a writ of habeas corpus that the applicant is in custody by virtue of process from any court legally constituted, he can be discharged only for one or more of the following causes:
(1)When the court has exceeded the limit of its jurisdiction, either as to the matter, place, sum, or person;
(2)Where, though the original imprisonment was lawful, yet by some act, omission, or event, which has subsequently taken place, the party has become entitled to his discharge;
(3)Where the process is defective in some substantial form required by law;
(4)Where the process, though in proper form, has been issued in a case or under circumstances where the laws do not allow process or orders for imprisonment or arrest to issue;
(5)When, although in proper form, the process has been issued or executed by a person either unauthorized to issue or execute the same, or where the person having the custody of the applicant, under the process, is not the person empowered by law to detain him;
(6)Where the process appears to have been obtained by fraud, false pretense, or bribery;
(7)Where there is no general law nor any judgment, order, or decree of a court to authorize the process, if in a civil suit, nor any conviction, if in a criminal proceeding.
Source: CCrimP 1877, §673; CL 1887, §7841; RCCrimP 1903, §773; SL 1915, ch 145; RC 1919, §4980; SDC 1939 & Supp 1960, §37.5504.