
56 Ill. App.3d 14 (1977)
371 N.E.2d 873
JAMES LONG, Petitioner-Appellant,
v.
T.R. ISRAEL et al., Respondents-Appellees.
No. 76-257.
Illinois Appellate Court  Fifth District.
Opinion filed December 9, 1977.
Rehearing denied January 10, 1978.
*15 Richard J. Habiger and Dennis S. Waks, both of Prison Legal Aid, of Carbondale, for appellant.
Bruce D. Irish, of Illinois State's Attorneys Association, of Mt. Vernon, for appellees.
Judgment affirmed.
Mr. PRESIDING JUSTICE EBERSPACHER delivered the opinion of the court:
This is an appeal by petitioner, James Long, from the denial of a petition for writ of habeas corpus by the circuit court of Jefferson County.
Petitioner had originally been charged in the circuit court of Jefferson County with the offense of burglary. On July 12, 1974, following negotiations petitioner pleaded guilty to one count of the charged offense and was sentenced to four years probation. On August 5, 1974, a petition to revoke probation was filed and on August 20, 1974, pursuant to negotiations, petitioner admitted the allegations in the petition to revoke probation in return for a State recommended sentence of one year to one year and one day which sentence was imposed by the court as recommended. Subsequently, having completed his term of imprisonment with "good time" credit, petitioner was released on February 27, 1975, on parole for a mandatory parole term of three years. While on parole, during June, 1975, petitioner was convicted of an unrelated offense and consequently, following a hearing, petitioner's parole was revoked on August 12, 1975. Thereafter, petitioner filed the instant petition for a writ of habeas corpus seeking release from incarceration.
Petitioner's claim for relief is based on the trial court's failure to admonish him of the mandatory parole term immediately prior to his original guilty plea to the underlying offense and the court's failure to similarly admonish him at the time he admitted the allegations in the petition to revoke his probation. While petitioner concedes that People v. Wills, 61 Ill.2d 105, 330 N.E.2d 505, cert. denied, 423 U.S. 999, 46 L.Ed.2d 374, 96 S.Ct. 430, requiring such an admonishment, is inapplicable to *16 the instant case which antedated Wills, petitioner contends on appeal the denial of certain constitutional rights of petitioner by the imposition of a mandatory parole term without a prior admonition thereof. The State responds inter alia by arguing that at an arraignment on April 9, 1974, on the original charge, petitioner was in fact admonished of the mandatory parole term and that such an admonishment was sufficient to carry over and be effective in all the subsequent proceedings.
 1-3 We find that we need not and should not consider what merit, if any, exists to the claimed denial of petitioner's constitutional rights. The instant case is not before us on direct review but on review of a denial of a petition for a writ of habeas corpus. The distinction is crucial. A petition for a writ of habeas corpus may not be used as a substitute for a direct review of a judgment which may be erroneous but is not void even though the error involves a denial of constitutional rights. (People ex rel. St. George v. Woods, 47 Ill.2d 261, 265 N.E.2d 164; Hughes v. Kiley, 67 Ill.2d 261, 367 N.E.2d 700.) Rather, the statutory office of the writ of habeas corpus in Illinois is to obtain the release of persons illegally restrained of their liberty and is authorized only where the judgment is void because the trial court which entered the judgment lacked jurisdiction of the person or subject matter or where a post-conviction occurrence entitles a prisoner to release. (Hughes v. Kiley; People ex rel. Harper v. Brantley, 34 Ill. App.3d 807, 341 N.E.2d 126.) It is undisputed that a mandatory parole term of three years was imposed on petitioner by operation of statute (Ill. Rev. Stat. 1973, ch. 38, par. 1005-8-1(e)), and that petitioner is currently imprisoned due to a parole violation (Ill. Rev. Stat. 1975, ch. 38, par. 1003-3-9). Petitioner only alleges error in the original judgment of conviction and subsequent revocation of probation. Such is not within the scope of habeas corpus. Accordingly, we affirm the denial by the circuit court of Jefferson County of the petition for a writ of habeas corpus.
Affirmed.
G.J. MORAN and KARNS, JJ., concur.
