
123 Ariz. 399 (1979)
599 P.2d 852
STATE of Arizona, Appellee,
v.
Martin Hale DRAPER, Appellant.
No. 1 CA-CR 3849.
Court of Appeals of Arizona, Division 1, Department B.
July 5, 1979.
Rehearing Denied August 16, 1979.
Review Denied September 18, 1979.
*400 Robert K. Corbin, Atty. Gen. by William J. Schafer III, Chief Counsel, Crim. Div., Jessica L. Gifford, Asst. Attys. Gen., Phoenix, for appellee.
Ross P. Lee, Maricopa County Public Defender by Garth V. Smith, Deputy Public Defender, Phoenix, for appellant.
OPINION
JACOBSON, Judge.
The appellant, Martin Hale Draper, entered into a plea agreement by which he agreed to plead guilty to shoplifting goods valued at less than one hundred dollars "with a prior conviction," described as a class 6 felony pursuant to A.R.S. §§ 13-1805(F) and 13-604(E) of the Criminal Code of 1978. These two statutes read as follows:
"§ 13-1805:
* * * * * *
"F. Shoplifting property with a value of more than one thousand dollars is a class 5 felony. Shoplifting property with a value of more than one hundred dollars but not more than one thousand dollars is a class 6 felony. Shoplifting property valued at one hundred dollars or less is a class 1 misdemeanor, unless such property is a firearm in which case the shoplifting is a class 6 felony.
* * * * * *
"§ 13-604:
* * * * * *
"E. A person who is at least eighteen years of age or who has been tried as an adult and who stands convicted of any misdemeanor or petty offense, other than for a traffic offense, and has been convicted of one or more of the same misdemeanors or petty offenses within two years next preceding the date of the present offense shall be sentenced for the next higher class of offense than that for which such person currently stands convicted." (Emphasis added.)
A class 6 felony is the "next higher class of offense" relative to a class 1 misdemeanor.
*401 The shoplifting charge arose out of the removal of four cans of sardines from a Safeway store in Wickenburg on October 29, 1978. The plea agreement was entered into on November 2, 1978, prior to the filing of an information and in conjunction with a waiver of preliminary hearing. The agreement did not specify the prior conviction but did contain a provision to the effect that if a plea pursuant to the agreement was accepted, the state would not file any further allegations of prior convictions. The county attorney subsequently filed an information charging the present shoplifting and in addition a prior conviction for shoplifting on March 27, 1976  too early by several months to activate the enhancement provisions of § 13-604(E). This anomaly was overlooked in the trial court and appellant, having been convicted as a class 6 felony offender pursuant to his plea admitting the alleged prior conviction and having been sentenced accordingly, brings this appeal contending that he may only be sentenced for a class 1 misdemeanor.
Very clearly there is merit in appellant's position that on the present record he could not be validly sentenced for a class 6 felony. Appellee argues that appellant has, by his plea, waived his objection to use of the remote prior conviction as a basis for enhancement of punishment. Such an argument cannot prevail because there must be a factual basis for the plea of guilty. See Rule 17.3, Arizona Rules of Criminal Procedure; State v. Norris, 113 Ariz. 558, 558 P.2d 903 (1976); State v. Carr, 112 Ariz. 453, 543 P.2d 441 (1975). This rule applies to prior convictions for enhancement of punishment as well as to elements of the substantive offense. Rule 17.6, Arizona Rules of Criminal Procedure.
Appellee also contends, however, that if the present conviction and sentence cannot stand, the plea should be vacated and the cause remanded with an opportunity afforded to the state to present a motion to amend the information to allege a more recent prior conviction, which would be valid for enhancement purposes under § 13-604(E). As a factual predicate for its contention, appellee points to the presentence report which indicates two sentences for shoplifting in Phoenix in 1978. Appellee points out, in effect, that if the anomaly of the March, 1976 prior conviction had been called to the attention of the trial court, it would have, under the circumstances and in view of the plea agreement, rejected the plea and permitted the state to amend its information to allege a timely prior conviction. Appellee argues that appellant should not be permitted to improve his position by raising the issue for the first time on appeal.
We agree with appellee. The usual disposition where there is no factual basis for a plea is vacation of the plea and remand with reinstatement of charges. See State v. Norris, supra; State v. Carr, supra. Appellant agreed to plead guilty to shoplifting with an unspecified prior conviction, punishable as a class 6 felony. We think the plea agreement, reasonably construed, contemplates an integrated plea to both the substantive offense and a valid enhancing conviction, if one exists. So viewed, there is no factual basis for appellant's present plea and inasmuch as the record suggests the existence of valid enhancing prior convictions, we believe vacation of the plea and remand in accordance with cases such as Norris and Carr is appropriate. Cf. State v. Lopez, 120 Ariz. 607, 587 P.2d 1184 (1978).[1] In any subsequent conviction and resentencing, the principles of North Carolina v. Pearce, 395 U.S. 711, 89 S.Ct. 2072, 23 L.Ed.2d 656 (1969) will apply. See A.R.S. § 13-709(C) and Rule 26.14 of the Arizona Rules of Criminal Procedure.
Appellant's conviction is vacated and the cause is remanded for further proceedings.
OGG, C.J., Division 1, and SCHROEDER, P.J., Department B, concur.
NOTES
[1]  In Lopez, the Arizona Supreme Court held a conviction formally entered later than the subsequent offense invalid for enhancement purposes and remanded the cause for entry of judgment for the subsequent offense only and resentencing. There is no suggestion in Lopez as there is here that other prior convictions valid for enhancement purposes might exist.
