
597 So.2d 761 (1992)
Gissiander Clifford WRIGHT
v.
STATE.
CR 90-1915.
Court of Criminal Appeals of Alabama.
March 27, 1992.
Gissiander Clifford Wright, pro se.
James H. Evans, Atty. Gen., and Jean A. Therkelsen, Asst. Atty. Gen., for appellee.
MONTIEL, Judge.
Gissiander Clifford Wright filed a petition for writ of habeas corpus, attacking his 1984 conviction for robbery in the third degree. The petition was filed in the Mobile Circuit Court, which was the court of *762 original conviction and not the court of the county where he was imprisoned. In the petition, the appellant alleged that he was improperly sentenced under the Habitual Felony Offender Act. This allegation is cognizable under Rule 20, A.R.Crim.P.Temp., and this petition should have been treated as a Rule 20 petition. See Rule 20.4, A.R.Crim.P.Temp. While both the State's response to the petition and the court's order denying the petition acknowledged that this petition was actually a Rule 20 petition filed incorrectly as a habeas corpus petition, the court did not order the petition to be returned to the appellant to allow him to amend his petition to comply with the proper form of a Rule 20 petition as required by Rule 20.6(a), A.R.Crim.P.Temp.
Recently, this court in Graham v. State, 599 So.2d 82 (Ala.Crim.App.1992), held that when a petition for writ of habeas corpus, which is in reality a Rule 20, A.R.Crim.P.Temp., or Rule 32, A.R.Crim.P., petition, is filed, the cause should be transferred to the court of original conviction and the petitioner should be given the opportunity to file a proper Rule 20 or Rule 32 petition. See also Matkins v. State, 597 So.2d 760 (Ala.Crim.App.1992). In the case at bar, even though the petition was properly entertained in the court of original conviction, the appellant was not given the opportunity to file a proper Rule 20 petition. Therefore, this case is remanded to the circuit court with directions that the petition for writ of habeas corpus be returned to the appellant so that he can have the opportunity to file a proper Rule 20 petition.
REVERSED AND REMANDED.
All the Judges concur.
