
747 So.2d 358 (1999)
Donald CAPPS
v.
STATE.
CR-97-1969.
Court of Criminal Appeals of Alabama.
April 30, 1999.
Donald Capps, appellant, pro se.
Bill Pryor, atty. gen., and Jack W. Willis, asst. atty. gen., for appellee.
FRY, Judge.
The appellant, Donald Capps, appeals from the circuit court's dismissal of his petition for post-conviction relief filed pursuant to Rule 32, Ala.R.Crim.P., in which he attacked his 1994 sentence of 20 years' imprisonment under the Habitual Felony Offender Act. His sentence was imposed as a result of his conviction for assault in the second degree. (R. 3.) Capps's conviction and sentence were affirmed on direct appeal by unpublished memorandum. Capps v. State, 668 So.2d 938 (Ala.Cr.App. 1995)(table).
Capps's only allegation in his petition was that a second degree theft-of-property charge had been improperly used to enhance his sentence pursuant to the Habitual Felony Offender Act ("HFOA"). The record indicates that Capps's sentence for assault in the second degree was enhanced based on the state's proof that Capps had had two prior felony convictions. During the hearing on his petition, Capps argued that the use of the conviction for second-degree theft-of-property to enhance his sentence was improper because, he says, the charge was dismissed. The state did not refute this allegation. Capps, however, admitted that at the time he was sentenced for his conviction for assault in the second degree, he had one prior conviction for receiving stolen property; he further admitted that the use of the receiving-stolen-property conviction to enhance his sentence was proper. After the hearing, the trial court entered an order dismissing Capps's petition, which stated that even though Capps's conviction for second-degree theft of property may have been improperly used to enhance Capps's sentence, the sentence was within the range for a conviction of second-degree assault enhanced by one prior felony conviction.
Capps essentially challenges the legality of his sentence. "[A]n allegedly *359 illegal sentence may be challenged at any time because if the sentence is illegal, the sentence exceeds the jurisdiction of the trial court and is void." Rogers v. State, 728 So.2d 690 (Ala.Cr.App.1998). We are unable to determine from the record whether the state proved both of Capps's prior felony convictions that were used to enhance his sentence for assault in the second degree. Assault in the second degree is a Class C felony. Under the HFOA, if upon conviction of a Class C felony a defendant has been convicted of a prior felony, the defendant is punished for a Class B felony (not more than 20 years or less than 2 years). If the defendant has been convicted of two prior felonies, the defendant is punished for a Class A felony (life or not more than 99 years or less than 10 years).
The trial court's finding at the Rule 32 hearing that Capps's sentence of 20 years' imprisonment was within the statutory range for a habitual felon convicted of a Class C felony who has one prior felony conviction was accurate. However, we find it necessary, in the interest of fundamental fairness both to Capps and the trial court, to remand this cause for the trial court to address Capps's argument that he was improperly sentenced by the use of a conviction that was dismissed. Crenshaw v. State, 740 So.2d 478 (Ala.Cr.App.1998); Kaska v. State, 709 So.2d 500 (Ala.Cr.App. 1997). Cf. Humphrey v. State, 686 So.2d 490 (Ala.Cr.App.1996).
This case is remanded with directions to the trial court to determine whether the prior felony conviction for second-degree theft of property was improperly used to enhance Capps's sentence. If the trial court determines that the prior felony conviction was properly proven and that it relied on both prior felony convictions in enhancing Capps's sentence, then it should make specific written findings of fact to that effect in compliance with Rule 32.9, Ala.R.Crim.P. If the trial court, however, determines that the prior felony conviction for second-degree theft of properly was improperly used to enhance Capps's sentence and that the trial court at the time of Capps's sentencing enhanced his sentence based on two prior felony convictions, the trial court should set aside Capps's sentence and resentence Capps, applying the one prior conviction. The state should provide Capps with prior notice of the felony conviction it intends to rely on at resentencing, and at resentencing, Capps and his counsel should be present. On remand, the trial court may conduct such further proceedings or take such evidence as it deems necessary to make a determination and a specific finding of fact as to which prior felony convictions were used to enhance Capps's sentence. A return to remand shall be filed with this court within 42 days of the date of this opinion. The return to remand shall include a transcript of the remand proceedings conducted by the trial court and the evidence submitted, as well as, the trial court's findings of fact.
REMANDED WITH DIRECTIONS.[*]
LONG, P.J., and McMILLAN, COBB, and BASCHAB, JJ., concur.
NOTES
[*]  Note from the reporter of decisions: On September 10, 1999, on return to remand, the Court of Criminal Appeals affirmed, without opinion.
