
376 P.2d 704 (1962)
Douglas C. JOHNSON, Petitioner-Appellant,
v.
STATE of Idaho, Defendant-Respondent.
In the Matter of the Application of Douglas C. Johnson for a Writ of Habeas Corpus.
No. 9179.
Supreme Court of Idaho.
December 3, 1962.
Ralph H. Jones, Jr., of Jones, Pomeroy & Jones, Pocatello, for appellant.
Frank L. Benson, Atty. Gen., William E. Swope, Asst. Atty. Gen., Boise, Hugh C. Maguire, Jr., Pros. Atty., Bannock County, Vern E. Herzog, Jr., Asst. Atty. Gen., Pocatello, for respondent.
McFADDEN, Justice.
Appellant applied to the District Court for a writ of habeas corpus by an instrument, entitled "Writ of Habeas Corpus", but considered by all parties as a petition for such writ. In this first petition, dated December 1, 1961, appellant set out the fact of his arrest and of his being taken before a Justice of the Peace and of having read to him a complaint charging him with forgery and being a persistent violator; he further states he asked for a preliminary hearing and that counsel be appointed for him which latter request was denied; that he was placed in custody of the Bannock County Sheriff and that he has a widowed mother living in Alameda, Idaho.
The petition continues:
"VI.
"Petitioner has not been able to contact his mother by phone since his arrest Oct. 17, 1961.

*705 "VII.
"Petitioner was taken from his cell during the first week Nov. by Deputy Sherrif Carl Croft to the interrogation room and was there confronted with Det. H. J. Moldenhower. He told me at that time that he had came from the District Attorney's Office, and after talking with him that they would drop the Persistent Violators charge if I would plead guilty to the forgery charge. In the presence of Deputy Croft I refused such a deal with disgust, and ask when I was to be given my preliminary hearing. I was informed by Det. Moldenhower that it would be soon.
"VIII.
"Petitioner received Notice of hearing Nov. 15, 1961. Hearing set for Nov. 22, 1961 at 10:00 A.M. Was not allowed to make phone call until Nov. 20, 1961 two days before my hearing. This was Petitioner's first access to the phone. I contacted John Long, Attorney at Law. He was unable at that time to come over to see me.
"IX.
"Petitioner was taken before Justice of the Peace Charles W. Hyde on Nov. 22, 1961 for hearing. Petitioner made a motion before the court that council be appointed him. Motion denied.
"X.
"Petitioner had no opportunity to contact witnesses in his behalf and was bound over to District Court.
"ARGUMENT
"Petitioner is an indigent person without funds to engage compitent counsil. That he is an American citizen and that under the bill of rights of the Constitution of the United States he is entiteled to the full protection of the Bill of Rights, the 14th Amendment of the constitution guarantees the petitioner due process of law. Petitioner contends that his rights under due process of law has been denied him in all procedures and prays that Your Honorable Court will free him of his illegale charge placed against him by the City Police Dept.
          "/s/ Douglas C. Johnson,
                   "Petitioner."
This first petition, was filed on December 5, 1961, and denied by order of the trial court the same date. Subsequently, appellant submitted to the trial court an instrument entitled "Writ of Habeas Corpus Redress to Original", again considered as an application on petition for such writ. In this instrument he stated he had to wait 36 days for his preliminary examination and that he was not given an opportunity to have witnesses appear on his behalf, denying him his constitutional rights under the 14th Amendment of the Constitution of the United States. He points to I.C. § 19-812 to the effect that the preliminary hearing cannot be unreasonably delayed. He contends that after the lapse of 36 days it may be impossible to contact witnesses; he asserts that at the preliminary examination he was not told of his legal rights and was not allowed to examine exhibits and documents presented against him. This second application was returned by letter from the District Judge to the appellant and not filed. By stipulation this second application and covering letter were incorporated into the record on appeal.
The denial of the first application was for the reason that it contained no specifications or grounds for the issuance of the writ. The second application was rejected for the reason that the second petition contained the same grounds as the first.
Whether the respective petitions, or either of them, were sufficient, and whether there was an abuse of discretion on the part of the trial court in denying them are the questions to be resolved on this appeal.
The petitions were submitted by appellant prior to the time that counsel was appointed for him. It is to be pointed out that appellant cannot complain of the fact that counsel was not appointed for him at *706 the expense of the state for his representation in the preliminary hearing. I.C. § 19-801. State v. Calkins, 63 Idaho 314, 120 P.2d 253.
The purpose of a Writ of Habeas Corpus is expressed by statute as follows:
"Every person unlawfully committed, detained, confined or restrained of his liberty, under any pretense whatever, may prosecute a writ of habeas corpus, to inquire into the cause of such imprisonment or restraint." I.C. § 19-4201.
The applications claim unlawful confinement and restraint and set out facts which we consider substantiate such claims; in particular it is charged that appellant was held over 30 days without being allowed to contact his mother or without being allowed to contact an attorney. It is also charged that appellant was denied the right to contact his witnesses. It must be kept in mind in examining the sufficiency of the application, all allegations must be accepted as being true.
Even though the issuance of a writ of habeas corpus is generally considered discretionary with the court, it should be liberally granted. The following statement from 24 Cal.Jur.2d, p. 543, Habeas Corpus § 77, is explanatory of the test to be applied:
"As an extraordinary remedy, the writ of habeas corpus is not subject to the rules of technical pleading nor its swift relief hindered by captious objections or fine spun theories of procedure, and a petition therefore will not be scrutinized with technical nicety. And with respect to the numerous applications made in propria persona, a court cannot impose on prisoners unlearned in the law the same high standards of the legal art that might be imposed on members of the legal profession." See also: Sisquock Ranch Co., v. Roth (C.C.A. 9th), 153 F.2d 437; Jung Woon Kay v. Carr (C.C.A.9th) 88 F.2d 297; Holiday v. Johnston, 313 U.S. 342, 350, 61 S.Ct. 1015, 1017, 85 L.Ed. 1392. Price v. Johnston. 334 U.S. 266, 68 S.Ct. 1049, 92 L.Ed. 1356, also announced the rule that in dealing with petitions for habeas corpus submitted by persons on their own behalf without the advice, aid and assistance of counsel, a court cannot require the same high standards that might be imposed on members of the legal profession. In general, liberality rather than strictness should control in considering an application for a writ of habeas corpus. Harrod v. Whaley, (Ky.) 239 S.W.2d 480; Birchfield v. U. S., 296 F.2d 120, (5th Cir.); Crebs v. Hudspeth, 160 Kan. 650, 164 P.2d 338; Porter v. Raines, (Okl.Cr.) 359 P.2d 1085.
Art. 1, Sec. 13, Idaho Constitution guarantees an accused the right to speedy and public trial and the process of the court to compel attendance of witnesses and to appear and defend in person and with counsel. This application is sufficient to raise a question as to whether appellant has been deprived of rights under this constitutional provision, and thus the allegations in appellant's petitions are sufficient to raise grave doubts as to the legality of his incarceration. Under such circumstances it was incumbent on the trial court to have issued a writ of habeas corpus, to inquire into the cause of such imprisonment or restraint (I.C. § 19-4201), for full determination of the legality of his imprisonment or restraint. The writ of habeas corpus is the time honored process of testing authority of one who deprives another of his liberty. Eisentrager v. Forrestal, 84 U.S.App.D.C. 396, 174 F.2d 961. See also: 25 Am.Jur. 179, Habeas Corpus § 49.
Apropos of the reasoning followed in resolution of the issues here is the following statement from Council v. Clemmen, 85 U.S.App.D.C. 74, 165 F.2d 249.
"Generally speaking, the function of the writ of habeas corpus, which is of ancient origin in the common law and is given high sanction by our Constitution, is to afford a petitioner therefor a speedy and effective method of securing release when illegally restrained of his liberty. When directed to an inquiry *707 into the cause of imprisonment in judicial proceedings, the scope of review extends only to questions affecting the jurisdiction of the court and the sufficiency in point of law of the proceedings. It is well established that petition for the writ may not be used as a substitute for an appeal or a writ of error. Bowen v. Johnson, 306 U.S. 19, 59 S.Ct. 442, 83 L.Ed. 455; McNamara v. Henkel, 226 U.S. 520, 33 S.Ct. 146, 57 L.Ed. 330; Kaizo v. Henry, 211 U.S. 146, 29 S.Ct. 41, 53 L.Ed. 125. However, the limitations upon the remedy afforded by habeas corpus should be flexible and readily available to prevent manifest injustice, for, as Mr. Justice Black has expressed it, the principles judicially established for the delimitation of habeas corpus action `must be construed and applied so as to preserve  not destroy  constitutional safeguards of human life and liberty.' Johnson v. Zerbst, 304 U.S. 458, 465, 58 S.Ct. 1019, 1023, 82 L.Ed. 1461, 146 A.L.R. 357.
"This court appointed a distinguished member of the local Bar to present the case on behalf of appellant. His candid appraisal of the case and his learned discussion provided much beneficial assistance for the court. It was his frank opinion that the petition alone was not clearly sufficient to warrant a finding that the lower court abused discretion in summarily dismissing it. He strongly contended, however, that the fuller explanation of the basis for the petition found in the brief filed on appeal amplified the allegations in the petition to an extent that a hearing on the merits was justified. We agree with that contention. Bearing our obligation to look through the form and into the very heart and substance of the matter it is our opinion that the rudimentary demands of justice can only be served by remanding this case to the lower court for further proceedings. The petition may be amended in the interest of justice, and power to allow or require amendment lies with the lower court, particularly where, as here, the petition is incomplete by reason of petitioner's own inexpert draftsmanship. Holiday v. Johnston, 313 U.S. 342, 61 S.Ct. 1015, 85 L.Ed. 1392."
The order of the trial court in denying the petition for writ of habeas corpus is reversed and the cause is remanded for further proceedings by the trial court.
SMITH, C. J., KNUDSON and McQUADE, JJ., and MARTIN, District Judge, concur.
