
    The People of the State of New York, Respondent, v Andrew J. Johnson, Appellant.
    [1 NYS3d 647]—
   ■Appeal from a judgment of the Niagara County Court (Sara S. Farkas, J), rendered September 5, 2013. The judgment convicted defendant, upon his plea of guilty, of burglary in the third 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 Niagara County Court for further proceedings in accordance with the following memorandum: Defendant appeals from a judgment convicting him upon his plea of guilty of burglary in the third degree (Penal Law § 140.20). Defendant’s sole contention on appeal is that the sentence is unduly harsh and severe, and that contention is encompassed by defendant’s valid waiver of the right to appeal (see People v Lopez, 6 NY3d 248, 256 [2006]). We note, however, that the proper sentencing procedures pursuant to CPL 400.21 were not followed and thus that the sentence may be illegal. County Court sentenced defendant as a first felony offender, but, “ ‘[w]hen 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’ ” (People v Stubbs, 96 AD3d 1448, 1450 [2012], lv denied 19 NY3d 1001 [2012]). “[I]t is illegal to sentence a known predicate felon as a first offender” (id. [internal quotation marks omitted]) and, inasmuch as we cannot allow an illegal sentence to stand, we modify the judgment by vacating the sentence imposed and we remit the matter to County Court for the filing of a predicate felony offender statement and resentencing in accordance with the law (see id.).

Present — Scudder, PJ., Centra, Fahey, Lindley and DeJoseph, JJ.  