
    The People of the State of New York, Respondent, v William D. Smith, Appellant.
    [879 NYS2d 650]
   Appeal from a judgment of the Erie County Court (Thomas P Franczyk, J.), rendered February 14, 2008. The judgment convicted defendant, upon his plea of guilty, of attempted rape in the first degree.

It is hereby ordered that the judgment so appealed from is unanimously modified on the law by reducing the period of postrelease supervision to a period of five years and as modified the judgment is affirmed.

Memorandum: Defendant appeals from a judgment convicting him upon his plea of guilty of attempted rape in the first degree (Penal Law §§ 110.00, 130.35 [1]). Defendant failed to preserve for our review his contention that his plea was not knowingly entered (see People v VanDeViver, 56 AD3d 1118 [2008], lv denied 11 NY3d 931 [2009]), and in any event that contention is without merit. Defendant also failed to preserve for our review his contention that County Court erred in imposing an enhanced sentence without affording him the opportunity to withdraw his plea (see id. at 1118-1119). We note, however, that the People correctly concede that the enhanced sentence is illegal inasmuch as it includes a 12-year period of postrelease supervision. At the time defendant committed the crime of which he was convicted, the maximum period of postrelease supervision that could be imposed for a class C violent felony conviction was five years (see Penal Law former § 70.45 [2] [f]). We therefore modify the judgment by reducing the period of postrelease supervision to a period of five years. Because the sentence as modified complies with the plea agreement, the sentence is no longer improperly enhanced. Present—Hurlbutt, J.P, Smith, Centra, Pine and Gorski, JJ.  