
    The People of the State of New York, Respondent, v Robert Kelly, Appellant.
    [645 NYS2d 376]
   —Judgment unanimously modified on the law and as modified affirmed and matter remitted to Monroe County Court for further proceedings in accordance with the following Memorandum: Pursuant to a plea and sentence agreement, defendant pleaded guilty to one count of rape in the first degree based upon County Court’s promise to sentence defendant as a second felony offender to an indeterminate term of incarceration of 41/2 to 9 years. After accepting defendant’s plea, the court conditioned its sentencing promise on defendant not being arrested before sentence (see, People v Outley, 80 NY2d 702). Thereafter, at the scheduled sentencing, the prosecutor advised the court that he had determined that defendant was a second violent felony offender, which required the People to file a second violent felony offender statement and the court to sentence defendant as a second violent felony offender (see, CPL 400.15). The prosecutor acknowledged that, because the court could not legally impose the promised sentence, defendant must be given the opportunity to withdraw his plea. The court, however, declined to permit the withdrawal of the plea, noting that defendant had been arrested on a new assault charge. Instead, the court conducted a hearing pursuant to People v Outley (supra), and thereafter concluded that there was a legitimate basis for the new arrest. The court then determined that it was no longer bound by its sentencing promise. The People filed a second violent felony offender statement and the court sentenced defendant as a second violent felony offender to an indeterminate term of incarceration of 121/2 to 25 years.

We conclude that the court erred in declining to permit defendant to withdraw his guilty plea. It is uncontroverted that defendant’s plea was induced by a sentencing promise that was illegal and invalid. The fact that defendant subsequently violated the no-arrest condition is irrelevant. Therefore, we modify the judgment by vacating the sentence and we remit the matter to Monroe County Court to provide both defendant and the People the opportunity to move to vacate the plea and set aside the conviction in its entirety or, if they decline so to move, to resentence defendant as a second violent felony offender (see, People v Ortiz, 227 AD2d 902). (Appeal from Judgment of Monroe County Court, Connell, J.—Rape, 1st Degree.) Present—Lawton, J. P., Fallon, Callahan, Doerr and Davis, JJ.  