
925 So.2d 1005 (2005)
Bruce Dewayne CASEY
v.
STATE.
CR-04-1518.
Court of Criminal Appeals of Alabama.
September 30, 2005.
*1006 Bruce Dewayne Casey, pro se.
Troy King, atty. gen., and James B. Prude, asst. atty. gen., for appellee.
McMILLAN, Presiding Judge.
Bruce Dewayne Casey appeals from the summary dismissal of his Rule 32, Ala. R.Crim. P., postconviction petition attacking his 1983 guilty-plea conviction for attempted robbery in the first degree and the resulting sentence of life imprisonment, as a habitual offender.
Casey was originally indicted for robbery in the first degree, and on February 28, 1983, he pleaded guilty to attempted robbery in the first degree. He claims that the trial court had no jurisdiction to accept the plea because, he argues, the offense he was charged with and to which he pleaded guilty did not exist under Alabama law. In Petty v. State, 414 So.2d 182, 183 (Ala.Crim.App.1982), this Court said:
"Because the definition of robbery has been enlarged and expanded by the new criminal code, `the former offense of assault with intent to rob has been merged into the present offense of robbery.' [Marvin v. State, 407 So.2d 576, 579 (Ala.Crim.App.1981).] For this same reason the former crime of attempted robbery now constitutes robbery. Section 13A-8-43(a) adds a definition that extends robbery to include conduct which occurs in an attempt to commit a theft or in flight after the attempt or commission. Section 13A-8-40(b)."
The State concedes that because Casey pleaded guilty to an offense that does not exist, his conviction is void and should be set aside. In Ex parte Wesley, 481 So.2d 1162, 1163 (Ala.1985), the Alabama Supreme Court held that the State may reindict an appellant for the appropriate offense of robbery; in Ex parte Wesley, the appellant had previously been charged with robbery in the first degree, but that charge had been amended pursuant to a guilty-plea agreement to charge the non-existent offense of attempted robbery. Thus, while the first indictment was improper and void, the State could properly charge an offense established by the evidence.
The judgment of the circuit court dismissing Casey's Rule 32 petition is reversed, and the cause is remanded for further proceedings consistent with this opinion.
REVERSED AND REMANDED.
COBB, BASCHAB, SHAW, and WISE, JJ., concur.
