
549 So.2d 95 (1989)
Ex Parte Calvin THOMAS.
(Re Calvin Thomas v. State of Alabama).
88-420.
Supreme Court of Alabama.
August 25, 1989.
*96 Calvin Thomas, pro se.
Don Siegelman, Atty. Gen., and Cecil G. Brendle, Jr., Asst. Atty. Gen., for respondent.
ADAMS, Justice.
Petitioner, Calvin Thomas, pleaded guilty to a charge of third degree burglary in 1986 and was sentenced to serve 15 years in the state penitentiary. He did not appeal, but later filed a Temp. Rule 20, A.R. Crim.Ap. petition for post-judgment relief. The trial court denied that petition, without a hearing, and the Court of Criminal Appeals affirmed that denial, without opinion. 541 So.2d 88. We issued the writ of certiorari to review that denial of the petition.
We summarize the facts as follows:
On March 30, 1972, Calvin Thomas entered guilty pleas to several charges, including burglary, rape, and burglary of an inhabited dwelling at night. Thomas was at the time 18 years of age. During those proceedings, Thomas was not informed of his right to seek treatment as a youthful offender under § 15-19-1, Ala.Code 1975; that statutory provision had become effective February 10, 1972. He was sentenced to serve 30 years in the state penitentiary. Thomas was paroled on November 16, 1982.
Thomas, on July 17, 1986, pleaded guilty to a charge of burglary in the third degree (this is the conviction to which the present petition relates). His 1982 convictions were used to enhance his sentence, under the Habitual Felony Offender Act, § 13A-5-9 et seq. Thomas was sentenced to serve a term of 15 years in the state penitentiary. On April 14, 1988, Thomas filed the Temp. Rule 20, A.R.Crim.P., petition involved here; he petitioned for post-conviction relief in the Jefferson County Circuit Court, alleging that his guilty plea had not been made knowingly and intelligently and that the sentence had been improperly enhanced.
Thomas first argues that any infirmity in a prior conviction used for enhancement of a sentence pursuant to § 13A-5-9 et seq. is properly attacked in a Temp. Rule 20 petition. He argues that trial judges have an affirmative duty to inform an eligible defendant of his right to apply for treatment as a youthful offender, and he cites Robinson v. State, 429 So.2d 682 (Ala.Cr.App. 1983); Clemmons v. State, 56 Ala.App. 275, 321 So.2d 237 (1974), aff'd, 294 Ala. 746, 321 So.2d 238 (1975).
The state defends the denial of this petition first on procedural grounds, arguing that the petitioner had filed an earlier Temp. Rule 20 petition on February 12, 1987, in which this ground was not raised. Because Thomas did not include this ground in his first Temp. Rule 20 petition, the state argues that this petition was properly denied pursuant to Temp. Rule 20.2(b), which reads as follows:
"Successive Petitions. The court shall not grant relief on a second or successive petition on the same or similar grounds on behalf of the same petitioner. A second or successive petition on different grounds shall be denied unless the petitioner shows both that good cause exists why the new ground or grounds were not known or could not have been ascertained through reasonable diligence when the first petition was heard, and that failure to entertain the petition will result in a miscarriage of justice."
The state contends that the petition was due to be denied because petitioner failed to show good cause for the delay in presenting this issue and good cause why this issue was not known or could not have been ascertained through reasonable diligence when the first Temp. Rule 20 petition was filed. The state is correct in that contention.
In the alternative, the state argues that a collateral attack of petitioner's 1986 sentence based on a flaw in a prior conviction is improper, citing Jones v. State, 431 So.2d 1367 (Ala.Crim.App.1983).
As we held in Ex parte Lockett, 548 So.2d 1045 (Ala.1989), the analysis of a *97 Temp. Rule 20 petition begins with the face of the petition, that is, the petition must state a meritorious claim. Our review of the record and of Thomas's petition reveals that his petition does not state a meritorious claim, because an assertion of improper enhancement of a sentence pursuant to § 13A-5-9 et seq. is properly raised in a direct appeal to the Court of Criminal Appeals, rather than in a Temp. Rule 20, A.R.Crim.P., petition. Thomas failed to appeal from his 1986 conviction, and by not appealing, he waived his right to raise this issue; see Temp. Rule 20.2.
The judgment of the Court of Criminal Appeals is affirmed.
AFFIRMED.
MADDOX, ALMON and STEAGALL, JJ., concur.
HORNSBY, C.J., concurs in the result.
