
566 N.W.2d 42 (1997)
223 Mich. App. 337
PEOPLE of the State of Michigan, Plaintiff-Appellee,
v.
Dwight E. CHAPPELL, Defendant-Appellant.
Docket No. 191026.
Court of Appeals of Michigan.
Submitted March 4, 1997, at Lansing.
Decided May 2, 1997, at 9:05 a.m.
Released for Publication July 16, 1997.
Frank J. Kelley, Attorney General, Thomas L. Casey, Solicitor General, Richard Thompson, Prosecuting Attorney, Joyce F. Todd, Chief, Appellate Division, and Janice A. Kabodian, Assistant Prosecuting Attorney, for People.
*43 Robin M. Lerg, Troy, for defendant-appellant on appeal.
Before FITZGERALD, P.J., and MacKENZIE and TAYLOR, JJ.
PER CURIAM.
This appeal involves four cases that were consolidated in the circuit court for plea-taking purposes and sentencing. In Case No. 88-087278-FH, defendant pleaded guilty of violating his probation. In an amended judgment of sentence, he was sentenced to two to twenty years' imprisonment, to run consecutively to all the other sentences. In Case No. 94-134412-FH, defendant pleaded guilty of possession of less than twenty-five grams of cocaine, M.C.L. § 333.7403(2)(a)(v); M.S.A. § 14.15(7403)(2)(a)(v), and carrying a concealed weapon, M.C.L. § 750.227; M.S.A. § 28.424, and was subject to sentence enhancement as a second-time drug offender, M.C.L. § 333.7413(2); M.S.A. § 14.15(7413)(2). He was sentenced to one to eight years' imprisonment for the drug offense and one to five years' imprisonment for the concealed weapon conviction, to run consecutively to the sentence in Case No. 88-087278-FH and concurrently with each other and all the other sentences. In Case No. 94-136668-FH, defendant pleaded guilty to another count of possession of less than twenty-five grams of cocaine. He was sentenced to two to four years' imprisonment, to run consecutively to the sentence in Case No. 88-087278-FH and concurrently with the remaining sentences. Finally, in Case No. 95-141109-FH, defendant pleaded guilty to another count of carrying a concealed weapon and to being a felon in possession of a firearm, M.C.L. § 750.224f; M.S.A. § 28.421(6). At the time of sentencing, the trial court also found that defendant was an habitual offender, second offense, M.C.L. § 769.10; M.S.A. § 28.1082. His initial sentence of 1 to 5 years' imprisonment for the felony-firearm and concealed weapon conviction was vacated for terms of 1 to 7½ years, to run consecutively to the sentence in Case No. 88-087278-FH and concurrently with each other and all the other sentences. Defendant appeals as of right.[1] We affirm in part and remand in part for further proceedings.
Defendant's pleas were entered pursuant to a Cobbs agreement, People v. Cobbs, 443 Mich. 276, 505 N.W.2d 208 (1993). At the plea-taking proceeding, the court summarized the terms of the Cobbs agreement as follows:

The Court: Okay. Mr. Chappell, as a result of the discussions that began yesterday and have led to your being brought back to Court here today, I have indicated to your attorney and to Mr. Roe, the Prosecutor, and to you now on the record that if I accept your pleas of guilty to the offenses to which Mr. Roe enumerated and I'll proceed shortly enumerating, that the actual sentence of the Court would be as follows:
On the violation of probation, the 1988 case, you would receive a sentence of a one year minimum with a 20-year maximum.
On the first of the `94 possession cases of possession of cocaine under 25 grams, second offense, you would receive a minimum sentence of one year. The maximum is set by law at eight years. That would be consecutive to the one to 20 for the violation of probation.
On the second possession of under 25 from the `94 docket, also carrying a second offense maximum penalty of eight years, the Court would impose a minimum of one year consecutive to the previous one to eight and the previous one to 20.
On the ... carrying a concealed weapon and felon in possession of a firearm [charges in Case No. 95-141109-FH], the Court would impose concurrent one to five-year terms for each of those counts.
Those concurrent one to five-year terms would be consecutive to the previous sentences, meaning that as a minimum your grand total would be four years.

*44 Is that your understanding of the agreement?

The Defendant: Yes, your Honor.
The court then advised defendant that he would receive the sentences as indicated or else he would be allowed to withdraw the pleas. The prosecutor stated on the record that he was not in agreement with the court's proposed Cobbs sentences.
About a week after the pleas were entered, the prosecution filed a notice of intent to seek sentence enhancement in Case No. 95-141109-FH under the portion of the habitual offender law that provides:
The prosecuting attorney may file notice of intent to seek an enhanced sentence after the defendant has been convicted of the underlying offense or a lesser offense upon his or her plea of guilty or nolo contendere if the defendant pleads guilty or nolo contendere at the arraignment on the information charging the underlying offense, or within the time allowed for filing of the notice under subsection (1). [M.C.L. § 769.13(3); M.S.A. § 28.1085(3).]
There was no mention at the arraignment and the Cobbs plea-taking proceeding that the prosecution intended to seek the enhancement of defendant's sentences in Case No. 95-141109-FH as a second-felony offender. At sentencing, the court increased defendant's sentences in that case from 1 to 5 years' imprisonment to 1 to 7½ years, contrary to the Cobbs agreement.[2]
On appeal, defendant argues that the trial court erred in not following the Cobbs agreement in Case No. 95-141109-FH and sentencing him without the opportunity to withdraw his plea. We agree.
In Cobbs, supra, our Supreme Court recognized that trial judges may participate in the plea negotiation process by indicating the length of sentence that the judge, on the basis of a preliminary evaluation of the case, believes is appropriate for the charged offense. The Cobbs Court explained:
The judge's preliminary evaluation of the case does not bind the judge's sentencing discretion, since additional facts may emerge during later proceedings, in the presentence report, through the allocution afforded to the prosecutor and the victim, or from other sources. However, a defendant who pleads guilty or nolo contendere in reliance upon a judge's preliminary evaluation with regard to an appropriate sentence has an absolute right to withdraw the plea if the judge later determines that the sentence must exceed the preliminary evaluation. [443 Mich. at 283, 505 N.W.2d 208 (emphasis added).]
In this case, at the time the trial court made its preliminary Cobbs evaluation, there was nothing to suggest that the prosecutor intended to seek sentence enhancement under M.C.L. § 769.13(3); M.S.A. § 28.1085(3). When the court at sentencing acceded to the prosecutor's request for sentence enhancement as a second-felony offender in Case No. 95-141109-FH, it clearly deviated from the Cobbs agreement. Although, under the statute, the prosecutor had the procedural right to file a notice seeking sentencing enhancement after defendant entered his Cobbs plea, under Cobbs, defendant had the correlative, absolute right to withdraw his plea once the judge agreed to increase his sentence as an habitual offender. Because the Cobbs agreement was not followed in Case No. 95-141109-FH and defendant was not given the opportunity to withdraw his plea in that case, we must remand to the circuit court.
Enhancing defendant's sentence to reflect his status as an habitual offender was discretionary, not mandatory. See M.C.L. § 769.10(1)(a); M.S.A. § 28.1082(1)(a) ("If a person ... commits a subsequent felony ... the court ... may ... sentence the person to imprisonment for a maximum term which is not more than 1½ times the longest term prescribed for a first conviction ..." [emphasis added]). On remand, therefore, the trial *45 court should first decide if it intends to abide by the terms of the Cobbs agreement as originally entered. If the court believes that the original Cobbs evaluation should be followed, then defendant should be resentenced to one to five years' imprisonment consistent with that evaluation. If, on the other hand, the court decides it can no longer abide by the Cobbs agreement because defendant's sentence should be enhanced because he is an habitual offender, then defendant must be given the opportunity to withdraw his plea in Case No. 95-141109-FH.
Defendant also argues that there was an inadequate factual basis for his plea of violating his probation because the only thing he admitted on the record was that he was arrested for a new offense. This claim is without merit. The court was advised that the probation violation was based on the conduct that led to defendant's convictions in Case No. 94-134412-FH, and defendant stated that he was aware that his possession of cocaine and a firearm violated the terms of his probation. The court therefore had an adequate factual basis to conclude that defendant was not only arrested, but also convicted, of a new offense and hence had violated probation.
Affirmed in part and remanded in part for further proceedings consistent with this opinion. We do not retain jurisdiction.
NOTES
[1]  To the extent that the people argue, without cross appealing, that defendant's appeal in Case No. 95-141109-FH should not be as of right because it involves a guilty plea to offenses that occurred after the amendment of Michigan's Constitution, Const. 1963, art. 1, § 20, we will review that plea as if on leave to appeal granted. MCR 7.216(A)(7).
[2]  Defendant was resentenced after it was agreed that the parties erred in believing that all the sentences should run consecutively to each other for a combined minimum term of four years. On the basis of that portion of the Cobbs agreement providing for an overall four-year minimum sentence, he was resentenced as indicated at the outset of this opinion, with the court increasing two of defendant's minimum sentences to two years, while eliminating consecutive sentencing in all the cases but the probation violation case.
