In a proceeding pursuant to CPLR article 78 to review a determination of the Zoning Board of Appeals of the Village of Farmingdale, dated July 15, 1992, which, after a hearing, denied the petitioners’ application for a building permit, the appeal is from a judgment of the Supreme Court, Nassau County (Robbins, J.), entered November 19, 1992, which granted the petition, annulled the determination, and directed the Zoning Board of Appeals of the Village of Farmingdale to issue the building permit.
Ordered that the judgment is reversed, on the law, with costs, the determination is confirmed, and the proceeding is dismissed on the merits.
It is well settled that local zoning boards have substantial discretion in considering applications for such things as permits and variances. Judicial review of a zoning board determi*371nation is limited to deciding whether the action taken by the zoning board is illegal, arbitrary, or an abuse of discretion (see, Matter of Fuhst v Foley, 45 NY2d 441; Conley v Town of Brookhaven Zoning Bd. of Appeals, 40 NY2d 309). The zoning board’s determination will ordinarily be sustained if the determination has a rational basis and if it is supported by substantial evidence (see, Matter of Fuhst v Foley, supra, at 444).
The record in this case clearly establishes that the zoning board’s determination is not arbitrary and capricious, that it is rationally based on the Code of the Village of Farmingdale, and that it is supported by substantial evidence (see, Human Dev. Servs. v Zoning Bd. of Appeals, 110 AD2d 135, 139, affd 67 NY2d 702; Matter of Fuhst v Foley, 45 NY2d 441, supra). Mangano, P. J., Altman, Hart and Florio, JJ., concur.