— In a proceeding pursuant to CPLR article 78 to compel the appellants to comply with Public Health Law § 1340 (2) (a), the appeals are (1) from so much of an order of the Supreme Court, Suffolk County (Hand, J.), entered June 22, 1990, as failed to grant the cross motion of the Village of Ocean Beach to dismiss the proceeding, and (2) from a judgment of the same court (Tanenbaum, J.), dated June 20, 1991, which granted the petitioner’s application to hold the appellants in contempt of a prior order of the same court (Hand, J.), which directed the installation of public toilet facilities, and directed the Village to "commence installation of toilet facilities within 60 days of service of a copy of [the instant] order with notice of entry”. The appeal from the judgment brings up for review an order of the same court (Hand, J.), entered February 1, 1990, as amended February 22, 1990, which, inter alia, directed the appellants to seek prior permission of the court for any contemplated action which might delay timely compliance with a prior order and judgment dated July 7, 1989.
Ordered that the appeal from the order entered June 22, 1990, is dismissed, without costs or disbursements; and it is further,
Ordered that the judgment is reversed, on the law, without costs or disbursements, the penultimate paragraph of the order entered February 1, 1990, as amended February 22, 1990, is vacated, so much of the proceeding as pertained to the question of the legality of Local Laws, 1990, No. 1 of the Village of Ocean Beach, as well as the waiver issued thereunder, is converted into a cause of action for a declaratory judgment, and the instant proceeding is converted into a hybrid proceeding and action, and the matter is remitted to the Supreme Court, Suffolk County, for further proceedings consistent herewith and a new determination with respect to the petitioner’s application to hold the appellants in contempt.
*930The appeals from the intermediate order must be dismissed because the right of direct appeal therefrom terminated with the entry of a judgment in the action (see, Matter of Aho, 39 NY2d 241, 248). The issues raised on the appeals from the order are brought up for review and have been considered on the appeal from the judgment (see, CPLR 5501 [a] [1]).
The petitioner Lee Pokoik is a resident of the Village of Ocean Beach, a small residential community located on Fire Island in Suffolk County. The Village contains several beaches, which have traditionally been accessible to nonresidents who travel to Ocean Beach by ferry or boat. Although the Village has furnished lifeguard protection for bathers at the taxpayers’ expense since 1921, there are no toilet or other sanitary facilities available for the use of nonresident beach-goers.
In April 1985 the petitioner commenced this proceeding to compel the Suffolk County Health Services Department to enforce Public Health Law § 1340 (2) (a) by requiring the Village to provide toilet facilities to beachgoers. Although the Supreme Court dismissed the petition, this court subsequently reversed that determination, and remitted the matter for further development of the record on the issue of whether toilet facilities could be constructed without violating the Fire Island National Seashore Act (16 USC § 459e), which prohibits construction on those portions of the Village’s beaches which are included in a Federally-designated "Dune District” (Matter of Pokoik v Department of Health Servs., 138 AD2d 602). This court’s determination was affirmed by the Court of Appeals in December 1988 (Matter of Pokoik v Department of Health Servs., 72 NY2d 708).
Following an evidentiary hearing, by order and judgment dated July 7, 1989, the Supreme Court concluded that suitable areas upon which toilet facilities could be constructed existed within the Village of Ocean Beach, and directed the Village to take all steps necessary to install such facilities., However, shortly thereafter, the Village applied to the Suffolk County Department of Health Services (hereinafter the Department) for a waiver of the regulations promulgated under Public Health Law § 1340, which require that toilet facilities be provided at all bathing beaches unless facilities are available within 500 feet of the bathing beach (see, 10 NYCRR 6-2.13 [a]). The Department subsequently indicated that it would issue a waiver if the Village could ensure that toilet facilities were available to beachgoers within a reasonable distance from the beach. The Department noted, however, that this *931requirement could be waived if it were clear that "the bathing facility [was] used by the residential occupants” of the Village of Ocean Beach. Thereafter, on March 31, 1990, the Village enacted a local law limiting the use of its beaches to Village residents and their guests (Local Laws, 1990, No. 1 of Vil of Ocean Beach), and the Department issued a waiver for the 1990 summer season exempting the Village from compliance with 10 NYCRR 6-2.13 (a).
Following the enactment of the local law, the petitioner moved, within the instant proceeding, to hold the appellants in contempt for failing to comply with the order and judgment dated July 7, 1989, requiring the installation of public toilet facilities. In support of his motion, the petitioner contended that the Village’s beaches had been irrevocably dedicated to public use and that the local law limiting the use of the beaches to residents was therefore illegal and unenforceable. Although the appellants opposed the motion, they declined to address the petitioner’s challenge to the legality of the local law. In the judgment appealed from, the Supreme Court (Tanenbaum, J.) concluded that the local law restricting use of the Village’s beaches to residents and the waiver exempting the Village from complying with regulations promulgated under Public Health Law § 1340, were void, and directed the Village to commence installation of public toilet facilities within 60 days.
The central issue presented on appeal is whether the Village’s enactment of a local law converting its beaches into "resident-only” beaches and the subsequent issuance of a waiver by the Department obviated the Village’s obligation to install public toilets in compliance with the Public Health Law and the order and judgment dated July 7, 1989. In reaffirming the Village’s duty to commence installation of public toilet facilities, the Supreme Court passed upon the legality of the local law, declaring it "void”, and the resultant waiver a "nullity”. However, since this is a proceeding pursuant to CPLR article 78 and there was no conversion of any part of the proceeding into a cause of action for a declaratory judgment, the question of the validity of the local law as well as the waiver issued thereunder was never properly before the court. Moreover, since the appellants maintained that the validity of the local law and the resulting waiver could not be determined within the context of a proceeding pursuant to CPLR article 78, they did not address the merits of the petitioner’s claims, leaving the record on those issues largely undeveloped. Under these circumstances, the Supreme Court *932erred in invalidating the local law and waiver (see, e.g., Costantakos v Board of Educ., 105 AD2d 825; Matter of Lincoln Ave. Assocs. v Town of Islip, 96 AD2d 946, 947).
We agree, however, that the question of the legality of the local law must be resolved and may be determinative of the ultimate question of whether the Village must install public toilet facilities. Accordingly, we convert so much of this proceeding as relates to the legality of the local law and the waiver into a cause of action for a declaratory judgment and the instant proceeding into a hybrid proceeding and action (see, Matter of Montgomery Ward & Co. v New York State Dept. of Motor Vehicles, 90 AD2d 643, 644). The matter is remitted to the Supreme Court for further proceedings. Upon remittal, the Supreme Court should establish appropriate guidelines and schedules for the service of amended pleadings, and any appropriate discovery.
The order entered February 1, 1990, as amended February 22, 1990, which required the Village to obtain court approval before taking "any contemplated action which [might] delay the timely compliance with the [prior order and judgment] dated July 7, 1989”, impermissibly intruded into acts within the Village’s province (see, Matter of Perazzo v Lindsay, 30 AD2d 179, 180, affd 23 NY2d 764). Accordingly, the penultimate paragraph thereof is vacated. Sullivan, J. P., Fiber, O’Brien and Ritter, JJ., concur.