involved (Capital Tel. Co. v Pattersonville Tel. Co., 56 NY2d 11, 22). While the rule is certainly not without exceptions, no such exception is possible where, as here, the agency’s original jurisdiction is exclusive (see, Flacke v Onondaga Landfill Sys., supra, at 362).
For all of the foregoing reasons, the Supreme Court should not have entertained plaintiff’s action for declaratory and related relief in connection with his efforts to demolish the building. Similarly, it should not have directed HPD to issue "no harassment” certificates on the basis of its own findings on the harassment issue or granted plaintiff’s application in the article 78 proceeding to enjoin DHCR’s inquiry into the tenants’ harassment charges, since in these circumstances the harassment issue is one for DHCR and HPD to resolve under their respective enabling provisions. Finally, the Supreme Court’s permanent injunction against the tenants’ and HPD’s efforts to remedy Housing Maintenance Code violations is untenable because it was premised on factual determinations that the Supreme Court had no authority to make. Rather than adjudicating the controversy, the Supreme Court should have dismissed the complaint for lack of subject matter jurisdiction (see, Combustion Eng’g v Travelers Indem. Co., 53 NY2d 875; cf., Lanza v Wagner, 11 NY2d 317, 334; see also, 3 Weinstein-Korn-Miller, NY Civ Prac ¶¶ 3001.13, 3001.18) and dismissed the article 78 petition on the merits because it sought to enjoin a determination that was within DHCR’s exclusive province.
Accordingly, the order of the Appellate Division should be reversed, with costs, the complaint and petition dismissed and the certified question answered in the negative.