
440 So.2d 1222 (1983)
Willie Morris SMITH
v.
STATE.
3 Div. 796.
Court of Criminal Appeals of Alabama.
November 1, 1983.
*1223 Willie Morris Smith, pro se.
Charles A. Graddick, Atty. Gen., for appellee.
JOSEPH J. MULLINS, Retired Circuit Judge.
An instrument in writing and dated the 13th day of March, 1983, was styled "Willie Morris Smith, petitioner, vs. the State of Alabama, respondent, Petition for Writ of Habeas Corpus." Under head of "statement of case" it is averred that on or about December 8, 1975, the petitioner was arrested and charged with the November 21, 1975, robbery and assault with intent to murder of a Clifford A. St. John, Sr. On February 9, 1976, the petitioner was indicted by the Grand Jury of Montgomery County, Alabama, on Cases # 76-192 and 76-193. On February 17, 1976, the petitioner was arraigned and trial was set for April 13, 1976, on Case # 76-193, and April 15 on Case # 76-192. The petitioner was tried by a jury, and convicted on both indictments. On Case # 76-193 sentenced to 20 years' imprisonment, and "life" on Case # 76-192.
Under heading of "allegations" the paper states that he was not taken before a magistrate immediately after being arrested, was held incommunicado, and was deprived of the right to counsel prior to interrogation; that he was committed by false evidence, a coerced confession, and action of a grand jury which was unconstitutionally selected and impanelled; and that he was deprived of his Miranda rights.
The paper requested that the court grant the petitioner a new trial. On March 31, 1983, the motion for a writ of habeas corpus was dismissed. On April 7, 1983, notice of appeal was given. Code of Alabama, 1975, Section 15-21-8, provides that the judge to whom the application for a "writ of habeas corpus is made must grant the same without delay, unless it appears from the petition itself or from the documents thereto annexed that the person imprisoned or restrained is not entitled to the benefits of the writ under the provisions of" chapter 21. Code of Alabama, 1975, Section 15-21-4, provides for some of the contents of the petition. The requirements of Section 15-21-4 are not met by the statements in the petition in this record. When a petition for a writ of habeas corpus shows on its face that if all the statements of fact contained in the petition were true, the petitioner would not be entitled to a writ of habeas corpus, it is not error to deny the petition. It appears from the petition in this case that the petitioner is imprisoned *1224 under sentences of the Circuit Court of Montgomery County, rendered on the 13th day of April, 1976, and on the 15th day of April, 1976.
Habeas corpus is not the correct remedy to correct errors and irregularities in a trial in a court of competent jurisdiction. We hold that under the facts shown by the record in this case the trial court did not err to the prejudice of the petitioner when it dismissed his petition. The petitioner has wholly failed to state facts entitling him to the issuance of a writ of habeas corpus, or comply with the requirements as set out in Section 15-21-4, supra. Code of Alabama, 1975, Sec. 15-21-8, 15-21-4; Collins v. State, Ala.Cr.App., 424 So.2d 693; Luker v. State, Ala.Cr.App., 424 So.2d 662; O'Such v. State, Ala.Cr.App., 423 So.2d 317; Woodard v. State, Ala.Cr.App., 426 So.2d 524.
The judgment of the trial court is due to be, and is hereby, affirmed.
The foregoing opinion was prepared by Honorable Joseph J. Mullins, a retired Circuit Judge, serving as a Judge of this Court; his opinion is hereby adopted as that of the Court.
The judgment below is hereby affirmed.
AFFIRMED.
All the Judges concur.
