*1553Appeal from a judgment of the Onondaga County Court (William D. Walsh, J.), rendered October 6, 2009. The judgment convicted defendant, upon his plea of guilty, of criminal sexual act 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: On appeal from a judgment convicting him, upon his guilty plea, of criminal sexual act in the first degree (Penal Law § 130.50 [4]), defendant contends that his agreed upon sentence is illegal and that he must therefore be afforded the opportunity to withdraw his plea. We agree. Pursuant to the plea agreement, County Court sentenced defendant as a second violent felony offender to a determinate term of imprisonment of 12 years to be followed by a period of five years of postrelease supervision (PRS). As the People correctly concede, that sentence is illegal because the minimum period of PRS that could be imposed on defendant, as a second violent felony offender, is 10 years (see Penal Law § 70.45 [2-a] [i]). Thus, under the circumstances presented here, we modify the judgment by vacating the sentence, and we remit the matter to County Court to afford defendant the opportunity to withdraw his plea or be resentenced to a legal period of PRS (see People v Lee, 64 AD3d 1236, 1237 [2009]; see also People v Griffin, 72 AD3d 1496, 1497 [2010]; People v Motley [appeal No. 3], 56 AD3d 1158, 1159 [2008]). Present — Centra, J.P., Fahey, Lindley, Sconiers and Valentino, JJ.