
703 So.2d 1023 (1997)
Hiram Lester THACKER
v.
STATE.
CR-96-0152.
Court of Criminal Appeals of Alabama.
August 22, 1997.
*1024 William R. Willard, Gadsden, for appellant.
Bill Pryor, atty. gen., and James B. Prude, asst. atty. gen., for appellee.
BROWN, Judge.
The appellant, Hiram Lester Thacker, was charged with theft of property in the first degree, a violation of § 13A-8-3, Code of Alabama 1975. On January 12, 1996, he entered a plea of not guilty. On August 16, 1996, he withdrew his plea of not guilty and pleaded guilty to, and was convicted of, the lesser included offense of theft of property in the second degree, a violation of § 13A-8-4, Code of Alabama 1975. Theft of property in the second degree is a Class C felony. He was sentenced as a habitual felony offender with three prior felony convictions to life imprisonment.
The following occurred at the guilty plea colloquy:
"THE COURT: Okay. Now, theft of property, first degree, is a Class B felony with a range of punishment of a minimum of two years up to a maximum of 20 years.... Do you understand that?
"THE DEFENDANT: Yes, sir.
"....
"THE COURT: Now, in this case  Is he going to plead to a lesser included?
"DEPUTY DISTRICT ATTORNEY HARP: Yes, sir. Judge, there is evidence of three more priors. The minimum would have been life. He is going to plead to theft of property in the second degree which would be a Class C felony, and he has been offered 20 years.
"THE COURT: Okay. You know, that was shown to you on this document and then it was circled `Class C.' If it is Class C, then that drops it down from `B' to `C,' of course, and the range would go from a year and a day minimum up to 10 years maximum and up to a $5,000 fine, assuming there are no prior felonies. Right?
"DEPUTY DISTRICT ATTORNEY HARP: That's right, judge.
"THE COURT: Do we have any prior felonies in this case?
"DEPUTY DISTRICT ATTORNEY HARP: Yes, it is my understanding we have three or more. Is that right, Shaun?
"....
"THE COURT: You know, I am familiar with Mr. Thacker and I know that he has got those priors. Anyway, that being the case and the charge shown here  and I'm sure your lawyer went over it with you, but I will again. With a Class C felony if you read this chart where it says if you commit a Class C felony and you have three prior felonies, the range of punishment is 15 years to life or 99, and if it were a `B' ... then you are looking at life imprisonment.... So, anyway, they have agreed to reduce that and the minimum is 15 and the maximum is 99 years or life.... Do you understand that?
"THE DEFENDANT: Yes, sir.
"....
"THE COURT: Okay. As I understand it, today we are going to enter up the proposed plea and carry those over until Wednesday. Is that right?

*1025 "DEPUTY DISTRICT ATTORNEY HARP: Judge, what we have proposed to do is Mr. Thacker as a part and parcel of this and in consideration of this plea agreement, that he is to pay to the victim the entire amount of restitution, which is $1,800 to the victim, and that needs to be done tomorrow. He has informed his attorney that the money is going to be wired from Memphis from his daughter. In order to give that enough time to get to him and get to his attorney and for me to have Ms. Edwards come pick it up tomorrow what we had proposed to do is take the plea today and sentence him on Wednesday after the monies have been paid, and if they have been paid and everybody is happy, we would enter the agreement as it was. If not, I think all parties would agree that the plea bargain agreement  the plea would be withdrawn and we would be back to square one. But as far as I understand, everything should be done and sentencing should take place Wednesday.
"THE COURT: Y'all have heard what the Deputy D.A. has said. Is that y'all's agreement?
"MR. MALONE: Yes, sir. That is our understanding.

"THE COURT: Is that right?
"THE DEFENDANT: Yes, sir.

"....
"THE COURT: All right. Mr. Thacker, according to the indictment, it states that you did knowingly obtain or exercise unauthorized control over $1,800, ... the property of Kay Evers, with the intent to deprive the owner of said property, in violation of § 13A-8-3 of the Code. Now, that is a charge of theft, first degree, but as to that charge to the lesser included offense of theft, second degree, as we have described earlier, how do you plead?
"THE DEFENDANT: I plead guilty.
"....
"THE COURT: All right. I am going to carry this over then and we have got the agreement on the record, subject to the money being paid in, and we will reconvene on Wednesday as soon as you notify me and we will wrap this thing up. Anything else?"
(R. 18-23.) (Emphasis added.)
On October 8, 1996, the appellant filed a motion to withdraw the guilty plea on grounds that he did not fully understand the charge against him and he did not understand the constitutional rights that he had waived by pleading guilty. The trial court denied the motion.
On October 9, 1996, a sentencing hearing was conducted. The state was represented by the district attorney, who had not been present at the guilty plea hearing. After the state introduced certified copies of the appellant's prior convictions, the following occurred:
"THE COURT: Okay. What is the range of punishment based on these priors, Mr. D.A.?
"DISTRICT ATTORNEY HEDGESPETH: Based on the three priors with the plea to a Class B felony, your Honor, the sentence is life imprisonment with a fine up to $20,000....
"THE COURT: The agreement, if the conditions were met, was going to be 20 years concurrent?

"MR. MALONE: That's correct.
"THE COURT: So now since the District Attorney tells me that the conditions weren't met, that is out the window. So I guess it is up to the Court 
"....
"THE COURT: Well, all right. As I understand it, based on the situation we have now, the range of punishment is life minimum to  that's it.... That's with these three other cases which was the initial agreement that you had with them before. The only difference is the 20 years to life. Is there anything you would like to say to the Court now before 
"....
"THE DEFENDANT: Mr. Cardwell, what I would like to say is I would like to have a trial on this, take it to Court. When I came over for the plea bargain, I had a misunderstanding on that. I was gave 48 hours to come up with the money. I had 48 hours to pay Ms. Evers' money *1026 back. I did not make that decision. And also at that time that was the first time I talked with my attorney, the day before, within, I would say, since he had the case close to six months or so. Okay. And I was kind of pressed into that decision to make.
"....
"DISTRICT ATTORNEY HEDGSPETH: Your Honor, he has entered his plea and your Honor has already ruled on his motion this morning. We are ready to be sentenced now, I think.
"THE DEFENDANT: I would like to have a jury trial.

"THE COURT: At this time then the Court is prepared to enter the sentence. I'm not going to stack them. I'm going to run this concurrent, a life sentence concurrent. You understand that before I enter this up that the minimum is life and the maximum, I guess you would say, would be 99 years.... But I guess the minimum would be life and the maximum would be 99 years. So I am giving you the minimum and I am going to run them concurrent with all your other cases."
(R. 28-38.) (Emphasis added.)
The appellant contends that the trial court erred in denying the motion to withdraw his guilty plea. Specifically, he argues that because the state had allegedly agreed to allow him to withdraw his plea if he were unable to perform the conditions of his plea agreement, the trial court should have granted the motion. We agree.
The record clearly indicates that the deputy district attorney told the appellant specifically that in the event the appellant was unable to make restitution, "the plea would be withdrawn and we would be back to square one." (R. 21.) Defense counsel confirmed that this was the appellant's understanding. (R. 21-22.) Moreover, the trial court indicated its acceptance of the terms of the plea agreement, stating "[W]e have got the agreement on the record, subject to the money being paid in." (R. 23.)
The record additionally reflects that as soon as the appellant was apprised by the trial court that the plea agreement "was out the window," he objected, saying that it had been his understanding when he pleaded guilty that he had 48 hours to make restitution; and that in the event he was unable to pay restitution, he would be allowed to withdraw the plea.
Furthermore, although it is not abundantly clear, it appears that both the state and the trial court had the mistaken impression that if the appellant failed to meet the terms of his plea agreement, then he was due to be sentenced for a Class B felony, as opposed to a Class C felony. Although the appellant did not object to this apparent sentencing mistake, the error serves to magnify the parties' confusion regarding what would happen if the appellant failed to meet the terms of the plea agreement.
Whether to allow a defendant to withdraw his guilty plea rests within the sound discretion of the trial court, and this Court will not overrule that decision on appeal absent an abuse of discretion. Alford v. State, 651 So.2d 1109 (Ala.Cr.App.1994). From our review of the record, it is clear that the appellant was told that the plea agreement would be withdrawn if restitution was not made within a specified time. Therefore, the trial court erred in denying the appellant's motion to withdraw his guilty plea.
The judgment of the trial court is reversed and the case remanded to allow the appellant the opportunity to withdraw his guilty plea to the charge of theft of property in the second degree. If the appellant withdraws his guilty plea, the charges against him shall automatically be reinstated, pursuant to Rule 14.4(e), Ala.R.Crim.P.
REVERSED AND REMANDED.
All the Judges concur.
