
219 S.W.3d 123 (2005)
Bobby Michael FRIEND, Appellant,
v.
Larry NORRIS, Director, Arkansas Department of Correction, Appellee.
No. 05-03.
Supreme Court of Arkansas.
December 1, 2005.
*124 Appellant, pro se.
No response.
PER CURIAM.
Bobby Michael Friend is incarcerated in the Arkansas Department of Correction and brings this appeal of an order denying his pro se petition for writ of habeas corpus entered in Jefferson County Circuit Court. A judgment and commitment order entered in Sevier County Circuit Court July 28, 1994, reflects that appellant Friend entered a negotiated plea of guilty to each of two counts of capital murder and was sentenced to life imprisonment without parole. This court had previously reversed appellant's convictions and death sentence on those charges, which arise from the beating deaths of appellant's parents, and had remanded for a new trial. Friend v. State, 315 Ark. 143, 865 S.W.2d 275 (1993). Appellant has twice previously filed pleadings alleging grounds for post-conviction relief that would have been cognizable under a petition pursuant to Ark. R.Crim. P. 37.1. In each instance, this court found in separate unpublished opinions that the pleadings requesting postconviction relief were not timely filed. Friend v. State, CR 96-2, 1996 WL 144127 (Ark. March 18, 1996); Friend v. State, CR 98-55, 1998 WL 293986 (Ark. June 4, 1998).
Appellant's sole point on appeal is that the trial court erred in finding appellant had failed to demonstrate the commitment was invalid or that the trial court lacked jurisdiction to sentence appellant to life without parole. He asserts that his plea was invalid because the trial court did not make sufficient inquiry to establish the factual basis for his plea, alleging that the factual basis stated did not sustain a basis for more than second-degree murder and the trial court therefore lacked authority to sentence him to life without parole. The circuit court found in the order dismissing the habeas corpus petition that the petitioner had failed to state a claim upon which habeas relief could issue. We agree.
*125 A writ of habeas corpus is proper when a judgment of conviction is invalid on its face or when a circuit court lacked jurisdiction over the cause. Davis v. Reed, 316 Ark. 575, 577, 873 S.W.2d 524, 525 (1994). Unless a petitioner can show that the trial court lacked jurisdiction or that the commitment was invalid on its face, there is no basis for a finding that a writ of habeas corpus should issue. Birchett v. State, 303 Ark. 220, 795 S.W.2d 53 (1990) (per curiam). The petitioner must plead either the facial invalidity or the lack of jurisdiction and make a "showing, by affidavit or other evidence, [of] probable cause to believe" he is illegally detained. Ark. Code Ann. 16-112-103 (1987). See Wallace v. Willock, 301 Ark. 69, 781 S.W.2d 484 (1989); see also Mackey v. Lockhart, 307 Ark. 321, 819 S.W.2d 702 (1991).
It is true that we will treat allegations of void or illegal sentences similar to the way that we treat problems of subject-matter jurisdiction. Taylor v. State, 354 Ark. 450, 125 S.W.3d 174 (2003). Detention for an illegal period of time is precisely what a writ of habeas corpus is designed to correct. Id. at 455, 125 S.W.3d at 178. However, a habeas corpus proceeding does not afford a prisoner an opportunity to retry his case, and is not a substitute for direct appeal or postconviction relief. Meny v. Norris, 340 Ark. 418, 420, 13 S.W.3d 143, 144 (2000). In the case at hand, the type of issue raised by appellant is precisely that which should be limited to relief pursuant to a timely petition for postconviction relief under Ark. R.Crim. P. 37.1.
Rule 24.6 of the Arkansas Rules of Criminal Procedure provides that the trial court shall not enter a plea of guilty without making such inquiry as will establish that there is a factual basis for the plea. The rule is mandatory. Reed v. State, 276 Ark. 318, 635 S.W.2d 472 (1982). Substantial compliance, however, is sufficient. Id. at 321, 635 S.W.2d at 474. Reversal is not mandated where deficiencies in the proceeding are supplied at a postconviction hearing. Id. The question posed here is not similar to a jurisdictional question, but requires the kind of factual inquiry that goes well beyond the facial validity of the commitment and is therefore best left to a postconviction proceeding. We cannot say that the allegations in appellant's petition raise a question of a void or illegal sentence such as may be addressed in a habeas corpus proceeding.
Since appellant has failed to show the judgment of conviction was invalid on its face or that the circuit court lacked jurisdiction, the circuit court appropriately determined the writ should not issue. We accordingly affirm the denial of appellant's petition by the court.
Affirmed.
