OPINION OF THE COURT
Memorandum.
*3Amended judgment reversed on the law and resentence vacated.
Judgment of conviction modified on the law by vacating the sentence imposed and remitting the $500 fine, if paid; as so modified, judgment affirmed, and matter remanded to the court below for further proceedings in accordance with the decision herein.
Pursuant to a negotiated plea and sentencing agreement, defendant entered a guilty plea to a land use violation (Code of Town of Southampton § 330-177 [A]) and was sentenced to a four-month conditional discharge, the sole conditions thereof being that within that period he cure the use violation or obtain a certificate of occupancy for the new use. Defendant failed to fulfill either condition and upon the People’s application, filed several weeks after the conditional discharge period expired, the court declared defendant delinquent (CPL 410.30). Although the record is unclear as to the subsequent events, upon defendant’s plea to the declaration of delinquency, the Town Attorney demanded that a $1,000 fine be imposed for every week that elapsed following the expiration of the conditional discharge period, pursuant to section 330-186 (B) of the Code of the Town of Southampton, which provides that each week’s violation shall constitute a separate, additional violation. The court resentenced defendant to a $20,000 fine.
The record shows that the declaration of delinquency was untimely. Such a declaration may be brought only “during the period of a sentence of. . . conditional discharge” (CPL 410.30), here, within four months of sentencing. Although the People contend that the period of conditional discharge was for a year, as statutorily mandated (Penal Law § 65.05 [3] [b]), the court itself, in its order rejecting, as untimely, defendant’s motion to modify the terms of the conditional discharge (see CPL 410.20), declared the period of sentence to be four months. A declaration of delinquency brought after a period of conditional sentence has expired is “invalid” (People v Lee, 2 AD3d 878, 879 [2003]) and the court was “powerless” to revoke the sentence on this basis (People v Montgomery, 115 AD2d 102, 103 [1985]). Moreover, an untimely declaration of delinquency is of nonwaivable jurisdictional dimensions, particularly in light of Penal Law § 65.15 (2), which only preserves the court’s jurisdiction over a term of probation or conditional discharge upon the timely filing of a declaration of delinquency.
*4As the People concede, a conditional discharge of four months is not an authorized sentence (Penal Law § 65.05 [3] [b]), and, as a general rule,
“when [an] unlawful sentence is the product of a negotiated plea agreement, and the sentencing court is unable to fulfill its sentence promise due to the illegality of that sentence, the appropriate remedy is to give the defendant the opportunity to either accept an amended lawful sentence or withdraw his plea of guilty and be restored to pre-plea status” (People v Hollis, 309 AD2d 764, 765 [2003]; see also People v Ingoglia, 305 AD2d 1002, 1003 [2003]; People v Martin, 278 AD2d 743, 744 [2000]).
We note that where, as here, an ordinance provides that the continuance of a violation over given periods of time permits each period to be punished as a separate offense, it is necessary that the accusatory instrument charging the violation allege, as a separate count, every period of time the violation persisted if multiple punishments are to be imposed (People v Fremd, 41 NY2d 372 [1977]; People v Melchner, 4 Misc 3d 132[A], 2004 NY Slip Op 50727[U] [App Term, 9th & 10th Jud Dists 2004]; People v Otto, 2003 NY Slip Op 51181[U] [App Term, 9th & 10th Jud Dists 2003]; People v Simoneau, 2003 NY Slip Op 51338[U] [App Term, 9th & 10th Jud Dists 2003]). Here, the accusatory instrument alleged a single violation of the ordinance, foreclosing sentencing for other than that conduct. Accordingly, should there be a resentencing, the maximum sentence that may be imposed is a $1,000 fine and six months’ imprisonment.
We find defendant’s remaining claims without merit (People v Casey, 95 NY2d 354, 360 [2000]; People v Allen, 92 NY2d 378, 385 [1998]; People v Sylla, 7 Misc 3d 8 [App Term, 2d & 11th Jud Dists 2005]), unpreserved for appellate review (People v Douglas, 94 NY2d 807, 808 [1999]; People v Mills, 45 AD3d 892, 894 [2007]; People v Kyem, 272 AD2d 136 [2000]), or academic in light of the foregoing.
McCabe, J.E, Tanenbaum and Scheinkman, JJ, concur.