Appeal from an order of the Supreme Court, Erie County (Kevin M. Dillon, J.), entered January 26, 2007 in a declaratory judgment action. The order granted defendants’ motion to dismiss the amended complaint as barred by the statute of limitations.
It is hereby ordered that the order so appealed from is unanimously modified on the law by denying the motion in part and reinstating the fifth cause of action and as modified the order is affirmed without costs.
Memorandum: Plaintiff commenced this action seeking, inter alia, a declaration that the zoning ordinance adopted in 2005 (2005 Zoning Ordinance) by the Town Board of defendant Town of Sardinia is invalid. Defendants made a pre-answer motion to dismiss the complaint pursuant to CPLR 3211 (a) (5) on the ground that the four causes of action asserted therein are properly the subject of a CPLR article 78 proceeding, and the four-month statute of limitations applicable to such a proceeding has expired. Before Supreme Court ruled on defendants’ motion, plaintiff served an amended complaint that included a fifth cause of action. The court treated the motion as directed at the amended complaint and granted the motion.
We agree with plaintiff, however, that the court erred in granting that part of the motion with respect to the fifth cause of action, and we therefore modify the order accordingly. Plaintiff alleges therein that the 2005 Zoning Ordinance is “invalid” because defendants failed “to consider the Comprehensive Plan when approving the 2005 Zoning Ordinance,” as required by Town Law § 263 and, in fact, defendants adopted a zoning ordinance that is inconsistent with the comprehensive plan. In our view, plaintiff has thereby challenged the substance of the 2005 Zoning Ordinance in the fifth cause of action, rendering it subject to a six-year statute of limitations (see generally Almor Assoc. v Town of Skaneateles, 231 AD2d 863 [1996]). Thus, the fifth cause of action is not time-barred. Present—Scudder, P.J., Martoche, Peradotto, Pine and Gorski, JJ.