If administrative or other proceedings are required or available to determine the legality of the defendant's conduct, the court shall remit the parties to such proceedings, except where immediate and irreparable damage will probably result, which proceedings shall be conducted in accordance with and subject to the applicable provision of law providing for such proceedings and the provisions of the "Administrative Procedure Act," P.L. 1968, c. 410 (C. 52:14B-1 et seq.) In so remitting the court may grant temporary equitable relief where necessary for the protection of the environment or the interest of the public therein from pollution, impairment or destruction. In so remitting the court shall retain jurisdiction of the action pending completion thereof for the purpose of determining whether the administrative findings made in such proceedings are supported by substantial evidence and the agency action is in conformance with the law.
N.J.S. § 2A:35A-8