Letitia James, Attorney General, Albany (Dustin J. Brockner of counsel), for appellants. Thompson Hine LLP, New York City (Eric N. Heyer of Thompson Hine LLP, Washington, DC, of counsel, admitted pro hac vice), for respondents. Appeal from an order of the Supreme Court (Cholakis, J.), entered October 22, 2020 in Albany County, which, in a combined proceeding pursuant to CPLR article 78 and action for declaratory judgment, granted petitioners’ motion for an award of counsel fees and litigation expenses. Respondent Public Health and Health Planning Council (hereinafter the Council) is an administrative body within respondent Department of Health (hereinafter DOH) empowered to establish “sanitary regulations, to be known as the sanitary code of the state of New York, subject to approval by” respondent Commissioner of Health (Public Health Law § 225 [4]). In response to concerns about the increasing prevalence of youth vaping and the availability of flavored vape liquids that were contributing to that trend, the Council and the Commissioner adopted emergency regulations in September 2019 that prohibited the possession, manufacture, distribution or sale of “any e-liquid with a distinguishable taste or aroma, other than the taste or aroma of tobacco or menthol” and the electronic cigarettes and similar devices containing it (10 NYCRR former 9-3.1 [b]; see 10 NYCRR former 9-3.2). Several days later, and before enforcement of the emergency regulations was to begin in October 2019, petitioners commenced this combined CPLR article 78 proceeding and declaratory judgment action seeking, among other things, to challenge the emergency regulations as adopted in excess of respondents’ regulatory authority. Petitioners simultaneously moved for, as is relevant here, a preliminary injunction preventing enforcement of the emergency regulations. Petitioners unsuccessfully sought a temporary restraining order pending the outcome of that motion but, upon review pursuant to CPLR 5704 (a), this Court granted the temporary restraining order in October 2019. Supreme Court then granted the motion in January 2020, and respondents appealed. The appeal was rendered moot after a statutory prohibition on the sale of non-tobacco flavored electronic cigarette products was enacted in April 2020 (see Public Health Law § 1399-mm-1, as added by L 2020, ch 56, part EE, § 1), prompting DOH to let the emergency regulations expire later that month (see State Administrative Procedure Act § 202 [6]). Upon the parties’ stipulation, respondents discontinued the appeal and petitioners reserved the right to move for counsel fees and expenses pursuant to the State Equal Access to Justice Act (see CPLR art 86). In July 2020, petitioners did so. Supreme Court granted petitioners’ motion to the extent of finding that they were entitled to an award of counsel fees and expenses and directed a hearing to determine the reasonable amount thereof. Respondents appeal. We reverse. CPLR 8601 (a) “mandates an award of fees and other expenses to a prevailing party in any civil action brought against the state, unless the position of the state was determined to be substantially justified or that special circumstances render an award unjust” (Matter of Scott v. Coleman, 20 AD3d 631, 631 [2005], lv dismissed 5 NY3d 880 [2005]; see Kimmel v. State of New York, 29 NY3d 386, 392 [2017]; Matter of Clarke v. Annucci, 190 AD3d 1245, 1246 [2021], lv dismissed 37 NY3d 935 [2021]). Respondents contest Supreme Court’s conclusion that their position was not substantially justified, meaning that it lacked “a reasonable basis both in law and fact” (Matter of New York State Clinical Lab. Assn. v. Kaladjian, 85 NY2d 346, 356 [1995] [internal quotation marks and citation omitted]; accord Matter of Walker v. Novello, 36 AD3d 1100, 1102 [2007]). Notably, even where the “respondents did not prevail in the underlying proceeding, their position can be deemed substantially justified” if it had such a reasonable basis (Matter of Rivers v. Corron, 222 AD2d 863, 864 [1995]; see Matter of New York State Clinical Lab. Assn. v. Kaladjian, 85 NY2d at 357; Matter of Smith v. Fischer, 50 AD3d 1279, 1280 [2008]). “Whether [the respondents'] position in a particular matter indeed was substantially justified is a determination committed to the sound discretion of the court of first instance and is reviewable as an exercise of judicial discretion” (Matter of Perez v. New York State Dept. of Labor, 259 AD2d 161, 163 [1999] [internal quotation marks and citations omitted]; see Matter of New York State Clinical Lab. Assn. v. Kaladjian, 85 NY2d at 356; Matter of Scott v. Coleman, 20 AD3d at 632). Petitioners challenged the emergency regulations upon the ground that they intruded upon the Legislature’s policy-making authority and violated the separation of powers doctrine. In that regard, “[a] legislature may enact a general statutory provision and delegate power to an agency to fill in the details, as long as reasonable safeguards and guidelines are provided to the agency” (Greater N.Y. Taxi Assn. v. New York City Taxi & Limousine Commn., 25 NY3d 600, 608 [2015]; accord Matter of Sugarman v. New York State Bd. of Elections, 190 AD3d 1228, 1229 [2021]; see Boreali v. Axelrod, 71 NY2d 1, 10 [1987]). In assessing whether the Council and the Commissioner went beyond the guidelines set by the Legislature in issuing the emergency regulations, the pertinent factors are whether they “(1) operated outside of [their] proper sphere of authority by balancing competing social concerns in reliance solely on [their] own ideas of sound public policy; (2) engaged in typical, interstitial rulemaking or wrote on a clean slate, creating [their] own comprehensive set of rules without benefit of legislative guidance; (3) acted in an area in which the Legislature has repeatedly tried — and failed — to reach agreement in the face of substantial public debate and vigorous lobbying by a variety of interested factions; and (4) applied [their] special expertise or technical competence to develop the challenged regulations” (Matter of Acevedo v. New York State Dept. of Motor Vehs., 132 AD3d 112, 119 [2015] [internal quotation marks, brackets and citations omitted], affd 29 NY3d 202 [2017]; accord Matter of Sugarman v. New York State Bd. of Elections, 190 AD3d at 1229; see Boreali v. Axelrod, 71 NY2d at 12-14). With regard to the first factor, the Council is empowered to create regulations “deal[ing] with any matters affecting the security of life or health or the preservation and improvement of public health in the state of New York” with the Commissioner’s approval (Public Health Law § 225 [5] [a]), and that broad grant of authority has been upheld given the impracticability of “prescrib[ing] detailed rules” for the “infinitely variable conditions” that present threats to public health (Chiropractic Assn. of N.Y. v. Hilleboe, 12 NY2d 109, 120- 121 [1962]; see Matter of New York State Socy. of Surgeons v. Axelrod, 77 NY2d 677, 683 [1991]). Emergency regulations banning the manufacture and sale of the flavored vape liquids preferred by children and contributing to the sharp increase of vaping among them, with its accompanying health impacts, were accordingly within that grant of authority – and reflected concerns for which the record contains factual support – and the regulations did not obviously attempt to address other policy goals beyond the related public health dilemma of discouraging youth vaping while leaving options open for adults who believed that vaping could help them quit cigarette smoking (compare Garcia v. New York City Dept. of Health & Mental Hygiene, 31 NY3d 601, 611-613 [2018], and Chiropractic Assn. of N.Y. v. Hilleboe, 12 NY2d at 114-118, with Matter of New York Statewide Coalition of Hispanic Chambers of Commerce v. New York City Dept. of Health & Mental Hygiene, 23 NY3d 681, 697-698 [2014], and Boreali v. Axelrod, 71 NY2d at 12-13). Turning to the second factor, respondents pointed out that the Legislature had given some guidance as to its views on discouraging vaping among children before the emergency regulations were adopted, most notably by prohibiting businesses that carry electronic cigarettes and similar products from selling them to children (see Public Health Law § 1399-cc; Garcia v. New York City Dept. of Health & Mental Hygiene, 31 NY3d at 614-615). As for the third factor, although legislation restricting the availability and visibility of flavored electronic cigarettes had been proposed but not enacted prior to the issuance of the emergency regulations, respondents plausibly argued that, because those efforts were few and had died in committee, they did not reflect a legislative inability to reach compromise following a vigorous public debate (see Matter of NYC C.L.A.S.H., Inc. v. New York State Off. of Parks, Recreation & Historic Preserv., 27 NY3d 174, 183-184 [2016]). Finally, respondents articulated how the emergency regulations were formulated following a review of studies and other data by experts at DOH, suggesting that the Council, which is itself comprised of experts and stakeholders in the fields of public health and health care (see Public Health Law § 220), and the Commissioner relied upon that expertise in adopting the regulations. Petitioners capably disputed respondents’ arguments and obtained a temporary restraining order and a preliminary injunction barring enforcement of the emergency regulations, but a grant of temporary injunctive relief is not “an adjudication on the merits,” and we need not decide who would have prevailed had this matter proceeded to a final judgment (Trump on the Ocean, LLC v. State of New York, 79 AD3d 1325, 1327 [2010], lv dismissed and denied 17 NY3d 770 [2011]; see Papa Gino’s of Am. v. Plaza at Latham Assoc., 135 AD2d 74, 77 [1988]). Upon our review, we are satisfied that respondents articulated a reasonable factual and legal basis for their arguments that the Council and the Commissioner acted within their rule-making authority by adopting the emergency regulations (see Matter of New York State Clinical Lab. Assn. v. Kaladjian, 85 NY2d at 356; Matter of Walker v. Novello, 36 AD3d at 1102). Thus, Supreme Court abused its discretion in finding that those arguments were not “substantially justified” within the meaning of CPLR 8601 (a), and petitioners were not entitled to an award of counsel fees and expenses as a result (see Matter of Sutherland v. Glennon, 256 AD2d 984, 986 [1998]; Matter of Rivers v. Corron, 222 AD2d at 865). Garry, P.J., Pritzker, Colangelo and Ceresia, JJ., concur. ORDERED that the order is reversed, on the law, without costs, and motion denied.