Appeal from a judgment of the Onondaga County Court (William D. Walsh, J.), rendered August 11, 2003. The judgment convicted defendant, upon his plea of guilty, of manslaughter in the first degree.
It is hereby ordered that the judgment so appealed from is unanimously modified on the law by vacating the sentence and as modified the judgment is affirmed, and the matter is remitted to Onondaga County Court for further proceedings in accordance with the following memorandum: Defendant appeals from a judgment convicting him upon his plea of guilty of manslaughter in the first degree (Penal Law § 125.20 [1]). On a prior appeal defendant challenged, inter alia, the voluntariness of both his waiver of the right to appeal and his plea, and we affirmed the judgment of conviction (People v Griffin, 24 AD3d 1316 [2005], lv denied 6 NY3d 813 [2006]). We thereafter denied defendant’s motion to vacate the judgment of conviction pursuant to CPL 440.10, but we granted his subsequent motion for a writ of error coram nobis (People v Griffin, 59 AD3d 1106 [2009]). We agreed with defendant that he may have been denied effective assistance of appellate counsel by reason of defense counsel’s failure to challenge County Court’s failure to comply with the statutory mandates of CPL 400.21 (see generally People v Borrell, 12 NY3d 365, 369-370 [2009]), and we therefore vacated our prior order affirming the judgment of conviction and determined that we would “consider the appeal de novo” {Griffin, 59 AD3d at 1106).
On this de novo appeal, we once again reject the challenge by defendant to the voluntariness of his waiver of the right to appeal (see Griffin, 24 AD3d 1316 [2005]). Defendant further contends that his guilty plea was not voluntary, knowing or intelligent based on the court’s alleged failure to address either his complaints concerning assigned counsel or his postplea statement that he “[didn’t] even want this plea now.” Although that contention is preserved for our review because it was raised in defendant’s CPL 440.10 motion (see generally People v Bevins, 27 AD3d 572, 572-573 [2006]; People v Ballinger, 24 AD3d 792 [2005]; People v Kemp, 10 AD3d 811 [2004], lv denied 4 NY3d 765 [2005]; People v Martin, 7 AD3d 640, 641 [2004], lv denied 3 NY3d 677 [2004]), we nevertheless conclude upon our review of the record that it lacks merit.
We agree with defendant, however, that the court erred in *1497sentencing defendant as a first felony offender to a term of incarceration of 15 years plus a period of postrelease supervision of 2V2 years, which defendant contends was his understanding of the terms of the plea agreement. When it became apparent at sentencing that defendant had a prior felony conviction, the People were required to file a second felony offender statement in accordance with CPL 400.21 and, if appropriate, the court was then required to sentence defendant as a second felony offender (see People v Scarbrough, 66 NY2d 673 [1985], revg on dissenting mem of Boomer, J., 105 AD2d 1107, 1107-1109 [1984]; People v Motley [appeal No. 3], 56 AD3d 1158, 1159 [2008]; People v Ortiz, 227 AD2d 902, 902-903 [1996]). “[I]t is illegal to sentence a known predicate felon as a first offender” (People v Holley, 168 AD2d 992, 993 [1990]), and “[t]he statutory requirement that a defendant with a predicate felony conviction be sentenced as a second felony offender was not intended ‘to be circumvented by . . . the acquiescence of a sentencing Judge whenever he [or she] is inclined to extend leniency in violation of the legislative mandate’ ” (Motley, 56 AD3d at 1159, quoting Scarbrough, 105 AD2d at 1109).
Here, as defendant contends, he agreed to plead guilty based on his understanding that he would receive the agreed-upon sentence, i.e., a term of incarceration of 15 years and a period of postrelease supervision of 2V2 years. If defendant is in fact a second felony offender, that period of postrelease supervision is illegal, requiring vacatur of the sentence and, indeed, vacatur of the plea, if defendant should choose to withdraw his plea. We therefore modify the judgment by vacating the sentence, and we remit the matter to County Court for resentencing in compliance with CPL 400.21. If the court upon remittal determines that defendant is a second felony offender, the court must afford defendant the opportunity to withdraw his plea or to be resentenced as a second felony offender (see id.; Ortiz, 227 AD2d at 903). Present—Scudder, P.J., Peradotto, Carni, Green and Gorski, JJ.