Appeal from a judgment of the Ontario County Court (Craig J. Doran, J.), rendered January 16, 2007. The judgment convicted defendant, upon his plea of guilty, of criminal sale of a controlled substance in the third degree (two counts), criminal possession of a controlled substance in the third degree, criminal possession of a controlled substance in the fifth degree and criminal possession of a controlled substance in the seventh degree (two counts).
It is hereby ordered that the judgment so appealed from is unanimously modified as a matter of discretion in the interest of justice and on the law by providing that the order of protection shall expire on March 24, 2024 and as modified the judgment is affirmed.
Memorandum: Defendant appeals from a judgment convicting him upon his plea of guilty of, inter alia, two counts of criminal sale of a controlled substance in the third degree (Penal Law § 220.39 [1]) and one count of criminal possession of a controlled substance in the third degree (§ 220.16 [1]). Contrary to defendant’s contention, the bargained-for sentence is not unduly harsh or severe. Defendant failed to preserve for our review his contention that the imposition of an order of protection for a duration longer than that permitted by CPL 530.13 (former [4]), effective at the time of the commission of the crimes, violates the ex post facto prohibition in article I (§ 10, cl 1) of the US Constitution, and we decline to address that contention as a matter of discretion in the interest of justice (see People v Ruz, 70 NY2d 942 [1988]; People v Lyday, 241 AD2d 950 [1997]).
Defendant also failed to preserve for our review his contention that County Court erred in fixing the duration of the order of protection based on all of the counts of which defendant was convicted, rather than on only those counts involving the subject *1581of the order of protection, i.e., the two counts of criminal sale of a controlled substance in the third degree. We exercise our power to review that contention as a matter of discretion in the interest of justice (see CPL 470.15 [6] [a]), and we conclude that the eight-year duration of the order of protection must commence upon the expiration of the consecutive five-year terms of imprisonment imposed on those counts (see People v Harris, 285 AD2d 980 [2001]; People v Nunez, 267 AD2d 1050 [1999], lv denied 94 NY2d 905 [2000]). We therefore modify the judgment by providing that the order of protection shall expire on March 24, 2024. Present—Scudder, P.J., Hurlbutt, Centra, Green and Gorski, JJ.