—In a proceeding pursuant to CPLR article 78 to review a determination of the Zoning Board of Appeals of the Village of Bayville, dated June 11, 1998, which, after a hearing, denied the petitioner’s application to maintain the use of a structure as a dwelling, the Zoning Board of Appeals of the Village of Bayville and its members appeal from a judgment of the Supreme Court, Nassau County (Mahon, J.), entered October 11, 2000, which granted the petition, annulled the determination, and directed them to grant the petitioner’s application. Justice Florio has *503been substituted for Justice Feuerstein (see, 22 NYCRR 670.1 M).
Ordered that the judgment is reversed, on the law, with costs, and the matter is remitted to the appellants for further proceedings in accordance herewith.
The petitioner is the owner of property in the Village of Bayville. His lot is one of three created by the subdivision of a larger lot owned by his father. Initially, it was contemplated that a residence that existed on the original, larger lot, and that was now on another of the three smaller lots, would be moved onto the petitioner’s lot. In anticipation of this move, a structure was built on the petitioner’s lot to be used as a garage for the residence. However, after it was determined that the residence could not be moved successfully, the petitioner finished the second floor of the existing structure as living space and began using it as a dwelling. After that use was discovered and found to be in violation of the local zoning code, the petitioner applied to the Zoning Board of Appeals of the Village of Bayville (hereinafter the Board) for certain area variances needed to use the structure as a dwelling. In passing on the petitioner’s application, the Board concluded that he needed both the requested area variances and a use variance, in that the Bayville Code prohibited the use of “accessory buildings,” including garages, for dwelling purposes (see, Bayville Code § 80-66). The Board denied the area variances and use variance, and denied the petitioner’s application. In the judgment appealed from, the Supreme Court, inter alia, annulled the Board’s determination and directed the appellants to grant the application. We reverse, and remit the matter to the Board for further proceedings in accordance herewith.
Local zoning boards have substantial discretion in considering applications for variances, and judicial review is limited to ascertaining whether a board’s action was arbitrary, illegal, or an abuse of discretion (see, Matter of Sasso v Osgood, 86 NY2d 374; Matter of Fuhst v Foley, 45 NY2d 441; Matter of Gold Mark 35 Assoc. v Town of Somers, 263 AD2d 488). If the board’s determination has a rational basis, it will not be disturbed (see, Matter of Sasso v Osgood, supra at 384, n 2; Matter of Fuhst v Foley, supra at 444; Matter of Gold Mark 35 Assoc. v Town of Somers, supra). Here, the Board’s determination that the subject structure was a “garage” and, therefore, an accessory building, and that its use as a dwelling was prohibited by Bayville Code § 80-66, was arbitrary and must be annulled. Bayville Code § 80-3 defines an “accessory building” as one “subordinate to the main building on a lot and used for *504purposes customarily incidental to those of the main building.” Here, although the structure at issue was built in contemplation of becoming an accessory structure, it did not in fact become such a structure. There is no “main building” on the property to which it is subordinate or incidental. Thus, Bayville Code § 80-66 is not applicable. Accordingly, because the Board’s denial of the petitioner’s application was, in part, improperly based on a purported violation of this code provision, the matter must be remitted to the Board for consideration of the petitioner’s application for the area variances without further consideration of whether a use variance is required. Ritter, J.P., Florio, Friedmann and Crane, JJ., concur.