—In an action pursuant to Village Law § 7-714 to enjoin the defendant from operating an overnight shelter in the cellar of its premises, the plaintiff appeals from an order of the Supreme Court, Nassau County (Segal, J.), dated September 19, 1991, which denied its motion for summary judgment.
Ordered that the order is reversed, on the law, with costs, *410the plaintiffs motion is granted, and the matter is remitted to the Supreme Court, Nassau County, for entry of an appropriate judgment.
In February 1989 the defendant Roman Catholic Church of Our Lady of Loretto at Hempstead (hereinafter the Church) opened a shelter for the homeless on its premises. It is undisputed that up to 10 persons, including two volunteer workers, sleep there overnight. It is further undisputed that the shelter is located in the cellar of the convent building, which is below grade level, and that the cellar also contains an oil furnace, a hot water boiler, and a gas cooking range. Although the plaintiff Village of Hempstead (hereinafter Village) originally permitted and even encouraged the shelter to open, a change of administration occurred and it thereafter issued a notice of violation in April 1990 based, inter alia, on the fact that the Church was permitting overnight sleeping in the cellar, which was prohibited. Ultimately, the Village brought the instant action to enjoin this use of the cellar on safety grounds. The Supreme Court denied a preliminary injunction to the Village, which then moved for summary judgment. That motion was denied as well.
Notwithstanding the laudable goal of the Church to provide shelter for the homeless — a goal the Village also indicates it supports — we agree with the Village that the Supreme Court erred in denying its motion for summary judgment. The Village’s Department of Buildings, through its Superintendent and Deputy Superintendent, has interpreted Village of Hemp-stead Code § 78-15 as barring the use of the cellar for sleeping. In pertinent part, that section states that "[n]o cellar or basement space shall be used as a habitable room or dwelling unit”. The New York State Uniform Fire Prevention and Building Code (hereinafter "Fire Code”), which the Village has adopted, defines "[hjabitable space” as that "occupied by one or more persons for living, sleeping, eating or cooking” (9 NYCRR 606.3 [a] [88]). The Village also has determined that overnight sleeping violates another section of the Fire Code. That section provides, in pertinent part: "It shall be prohibited to use for sleeping purposes any kitchen or nonhabitable space. Public space shall be permitted to be used for temporary shelter” (9 NYCRR 1241.1 [a]). "It shall be prohibited to use any cellar space as habitable space” (9 NYCRR 1241.1 [c]).
It is well settled that the construction of regulations by the agency charged with their enforcement will not be overturned by the courts unless that interpretation is irrational or unreasonable (see, e.g., Matter of Kaufman v Sarafan, 59 NY2d 855, *411857; Matter of Fineway Supermarkets v State Liq. Auth., 48 NY2d 464, 468; Matter of Haines v Flacke, 104 AD2d 26, 31). The Supreme Court did not hold that the Village’s interpretation was unreasonable or irrational, but, rather, found that the plaintiff had failed to establish a compelling interest supporting its interpretation. The court thus applied an incorrect standard to this dispute. It also found that issues of fact existed, inter alia, as to whether the cellar constituted "public space” under 9 NYCRR 1241.1 (a), available for use as a temporary shelter. However, the defendant, if it so chose, could close the cellar to anyone. Therefore, the cellar is not a "public space” (see, Hyland v Cobb, 252 NY 325, 329; Madison Prods. Co. v Coler, 242 NY 467). Further, there is nothing in the record which contradicts the Village’s assertion that it is motivated solely by concern for public safety.
We have examined the defendant’s remaining contentions and find them to be without merit (see, Matter of E.F.S. Ventures Corp. v Foster, 71 NY2d 359, 369; Van Wagner Adv. Corp. v S & M Enters., 67 NY2d 186, 190, n 1). Accordingly, the order appealed from must be reversed and summary judgment granted to the plaintiff. Mangano, P. J., Balletta, Copertino and Joy, JJ., concur.