As a threshold matter, the City Council asserts that the Mayor may not challenge the validity of the Equal Benefits Law in this CPLR article 78 case. The majority claims that the Council’s approach would put the courts in “the unacceptable position of directing an officer to violate his or her oath of office by enforcing an unconstitutional law” (majority op at 388). Respectfully, I dissent. Under a separation of powers system it is the job of the legislative branch to enact laws and the executive to carry them out.1 An executive who believes that a law is unconstitutional is not powerless but must follow a process by which the judiciary—and not the executive—determines the issue in the first instance.
I.
By insisting that the Mayor follow a duly enacted law— unless and until a court nullifies it—the Council is not putting the courts in an “unacceptable position” of directing the Mayor to violate his oath.2 On the contrary, our system requires that the judiciary preserve its duty as arbiter of a law’s constitutionality. An executive is authorized to bring a declaratory judgment action challenging an enactment’s constitutionality and the case goes forward until a final judicial declaration is made. That’s how the system is supposed to work.
What happened here upended the process. The City Council enacted Local Law No. 27 (2004) (adding Administrative Code of City of NY § 6-126 [the Equal Benefits Law]) by a vote of 43 to 5. The Mayor disapproved the law. By a vote of 41 to 4 the *397City Council overrode the Mayor’s veto, pursuant to New York City Charter § 37 (b).3
The Mayor then sought a judgment declaring the law invalid and a permanent injunction barring its implementation. He also applied for a temporary restraining order and moved for a preliminary injunction staying implementation.3 4 After Supreme Court denied his application for a temporary restraining order, the Mayor announced that his administration would not implement the law. On the day the Equal Benefits Law took effect, the City Council commenced an article 78 proceeding to compel the Mayor to enforce the law. In his verified answer, the Mayor asserted by way of affirmative defense that the law was invalid.
After the legislature enacts a law it should not be necessary for it to start a lawsuit saying, in effect, “We’ve passed the law and really meant it; now we need a court to direct the executive to enforce it.” Passing the law ought to be enough; a legislature should not be forced to go through this second step. By implementing a duly enacted law, the Mayor is violating no oath; he is following precepts fundamental to a system of separation of powers (see Under 21, Catholic Home Bur. for Dependent Children v City of New York, 65 NY2d 344, 356 [1985]). Indeed, an executive’s oath of office is honored not by repudiating the law but by carrying it out unless and until the judiciary nullifies it.
Should a piece of legislation appear to be unlawful, the executive may seek its judicial invalidation, using expedited measures as necessary. Were this a clearly unlawful piece of legislation, as the racial segregation example the majority poses (majority op at 389-390), then no doubt a court would act immediately to block its implementation. Here, the Mayor lost his application for a temporary restraining order but still refuses to comply with the law, conflating the roles of the executive and judicial branches of our government.
II.
Our colleagues in the majority apparently recognize that a petitioner who challenges the validity of legislation may not *398proceed by article 78 but must bring a declaratory judgment action (see majority op at 388). That is the law. (New York City Health & Hosps. Corp. v McBarnette, 84 NY2d 194, 203-204 [1994].) Cases to this effect are legion.5 6Unless the challenge is directed at the procedures followed in the enactment or at the constitutionality of its application, “an article 78 proceeding may not be used to test the constitutionality of a legislative enactment” (Board of Educ. of Belmont Cent. School Dist. v Gootnick, 49 NY2d at 687; see Matter of Save the Pine Bush v City of Albany, 70 NY2d at 202).
The majority goes on, however, to hold that a constitutional challenge may be employed as a “defense” in an article 78 proceeding (majority op at 388).® I disagree and would rule that the executive may not assail the constitutionality of a law in a lawsuit that he, in effect, provoked because he refused to apply the law in the first place. If we approved of that type of executive action, the executive branch could refuse to enforce duly enacted legislation and put lawmakers to the burden of bringing litigation to give life to their laws.
By acting as it did, the executive branch shifted the burden, creating a precedent that, in my view, skews the roles of the legislative and executive branches. The City Charter “provide[s] for distinct legislative and executive branches” and “no matter how well-intentioned his actions may be, the Mayor may not unlawfully infringe upon the legislative powers reserved to the City Council” (Under 21, Catholic Home Bur. for Dependent Children v City of New York, 65 NY2d at 356). This is true whether the executive attempts to “legislate” by action or by *399inaction, by an unauthorized executive order or by impermissible failure to enforce.
Further, executive action of this type would strip the judiciary of its power to determine, in the first instance, whether a law is valid, and thereby clothe the executive with not only legislative but judicial powers. The Mayor’s position that the executive branch can say when a law is unconstitutional equates the powers of executive officials with those of the judiciary (see Ameron, Inc. v U.S. Army Corps of Engrs., 610 F Supp 750, 754 [D NJ 1985]). “It is emphatically the province and duty of the judicial department to say what the law is.” (Marbury v Madison, 1 Cranch [5 US] 137, 177 [1803].)
III.
For these reasons, I would not reach the questions of state or federal preemption but would have the declaratory judgment action go forward. The grounds of that action are that the Equal Benefits Law is preempted by state law and by federal law and that it curtails mayoral powers without providing for a referendum. The Mayor claims state law preemption, asserting that the Equal Benefits Law conflicts with the competitive bidding statute, General Municipal Law § 103. He further claims that the Equal Benefits Law is federally preempted insofar as it directly affects contractors’ Employee Retirement Income Security Act of 1974 (ERISA) plans.7
Contrary to the majority’s statement (majority op at 389), the state and federal law preemption claims do raise questions of fact. The Mayor claims that the Equal Benefits Law impedes competition to bid for contracts with New York City, and that neither its purpose nor its likely effect is to obtain the best work at the lowest possible price. The City Council, on the other hand, asserts the very opposite, quoting New York State Comptroller Alan Hevesi’s testimony that the Equal Benefits Law “has the potential to save significant resources for both the city and the state of New York.” The federal law preemption claim turns on the nature and extent of the economic effect of the law on the costs of contractors’ ERISA plans. Contradict*400ing the Mayor’s position on the Equal Benefits Law, the City Council quotes testimony suggesting that a similar law in San Francisco “works because it does not cost contractors much money to comply with this legislation.”
If, as our own jurisprudence mandates, the declaratory judgment action were allowed to run its course, the Mayor’s motion for summary judgment and the City Council’s response would be accompanied by the submission of evidence pertaining to the intent of the City Council in enacting the Equal Benefits Law and its expected economic effects. Expert testimony would be sought, hearings transcripts would be studied, credibility judgments would be made. Supreme Court would be able to consider the extent to which factual matters were rationally controverted in reaching a conclusion about whether summary judgment was warranted. It would do so with all facts viewed in the light most favorable to the nonmoving City Council.
Instead, the Appellate Division improperly chose to rule on the validity of a duly enacted local law in the context of an article 78 proceeding and therefore made its decision with the benefit only of a verified petition, a verified answer and a handful of accompanying documents and preceding pleadings. Such a ruling implicitly does away with the heavy burden our case law imposes on a party seeking to challenge a duly enacted law. “[P]arties challenging a duly enacted statute face the initial burden of demonstrating the statute’s invalidity beyond a reasonable doubt” (Dalton v Pataki, 5 NY3d 243, 255 [2005] [internal quotation marks and citations omitted]).
In fact, in order to prevail, a challenger has to “prove beyond a reasonable doubt that in any degree and in every conceivable application the [legislative enactment] suffers wholesale constitutional impairment” (Local Govt. Assistance Corp. v Sales Tax Asset Receivable Corp., 2 NY3d 524, 535 [2004] [internal quotation marks and citation omitted]; see also Cohen v State of New York, 94 NY2d 1, 8 [1999]; Matter of Moran Towing Corp. v Urbach, 99 NY2d 443, 448 [2003]). Moreover, we have held that this heavy initial burden applies not only to challenges to state laws but also to challenges to municipal ordinances (Lighthouse Shores v Town of Islip, 41 NY2d 7, 11 [1976]; Twin Lakes Dev. Corp. v Town of Monroe, 1 NY3d 98, 106 [2003]).
When a challenge to a law is raised in an article 78 proceeding, whether by one side or the other, the challenger is unfairly *401relieved of its burden if a court summarily declares the law invalid without benefit of a record assembled with that burden in mind. This distinction between article 78 and declaratory judgment is critical and must be maintained if we are to preserve proper methods of constitutional analysis. This goes to more than form. In the case before us, it implicates separation of powers.
IV
As a special proceeding, an article 78 proceeding “is as plenary as an action, culminating in a judgment, but is brought on with the ease, speed, and economy of a mere motion” (Siegel, NY Prac § 547, at 943 [4th ed]). Since it is “designed to facilitate a ‘summary disposition’ of the issues presented,” its procedures are in keeping with its summary nature (Davidson v Capuano, 792 F2d 275, 280 [2d Cir 1986]). Although an article 78 respondent may move for summary judgment pursuant to CPLR 409 (b), it remains “in the very spirit and purpose of proceedings under article 78 to provide a summary remedy, so summary, indeed, as to dispense with the need or occasion for the application of summary judgment” (Matter of Rockwell v Morris, 12 AD2d 272, 275 [1st Dept 1961]).
By contrast, a declaratory judgment action brings with it all the apparatus of an action, proceeding to trial unless the court dismisses the case or grants a motion for summary judgment. Faced with a summary judgment motion, the court must carefully consider the material facts to ascertain whether any are genuinely controverted, before deciding that there is, or is not, a material triable issue of fact (Glick & Dolleck v Tri-Pac Export Corp., 22 NY2d 439, 441 [1968]; Zuckerman v City of New York, 49 NY2d 557, 562 [1980]). Moreover, in that posture, the facts must be viewed in the light most favorable to the nonmoving party (Matsushita Elec. Industrial Co. v Zenith Radio Corp., 475 US 574, 587 [1986]).
Whether it is the article 78 petitioner or—as in this case—the opposing side (the Mayor) who seeks to have the courts declare a law invalid, the careful scrutiny of the record in search of triable facts that accompanies an action at the summary judgment stage is too easily bypassed when the validity of a law is sum*402marily and improperly assessed in a manner suited to special proceedings that are strictly limited in scope.8
The article 78 proceeding has the quite specific purpose of superseding the common-law writs of mandamus, prohibition and certiorari to review. It is ill fit as a vehicle for constitutional analysis. By contrast, there is no statutory restriction on the kinds of claim that may be brought in the form of a declaratory judgment action and it has traditionally been used to test a law’s constitutionality (Siegel, NY Prac § 437, at 741 [4th ed]).
V
The Mayor relies on Matter of People ex rel. Sherwood v State Bd. of Canvassers (129 NY 360 [1891]). There, we denied an application for a writ of mandamus compelling the issuance of a certificate of election to a prospective state senator who was constitutionally ineligible for the office because he was already a city government officer. The Court, however, repeatedly stressed the undisputed nature of the facts: the question of the candidate’s ineligibility was “a pure legal question, depending upon undisputed facts” (id. at 366); “upon the undisputed facts, the court [was] able to see that he [was] ineligible” (id. at 373). At best, Sherwood stands for the proposition that an article 78 proceeding may properly be dismissed where, because the facts are undisputed, the court can decide as a matter of law that the petitioner has no legal right to the relief sought. The present litigation is as factually controverted as Sherwood was factually simple.
In Kendall v United States ex rel. Stokes (12 Pet [37 US] 524 [1838]), the United States Supreme Court affirmed a judgment of the Circuit Court of the District of Columbia ordering a writ *403of mandamus to compel an executive branch official, the Postmaster General, to implement a law that he refused to enforce. The Court rejected the argument that the executive branch was vested with the power to refuse to enforce a law. “To contend that the obligation imposed on the [executive branch] to see the laws faithfully executed, implies a power to forbid their execution, is a novel construction of the constitution, and entirely inadmissible” (id. at 613).
VT.
Just as a judicial “injunction must be obeyed until modified or dissolved, and its unconstitutionality is no defense to disobedience” (Metropolitan Opera Assn., Inc. v Local 100, Hotel Empls. & Rest. Empls. Intl. Union, 239 F3d 172, 176 [2d Cir 2001]; see Walker v Birmingham, 388 US 307, 314-321 [1967]), duly enacted legislation must be enforced by the executive branch and its alleged invalidity is no defense.
By refusing to enforce a duly enacted law of New York City’s legislative branch, the Mayor assumes a legislative authority he does not possess. When the executive acts inconsistently with the legislature or usurps its exclusive powers, the doctrine of separation of powers is violated (Rapp v Carey, 44 NY2d 157 [1978]). “The Framers with memories of the tyrannies produced by a blending of executive and legislative power rejected that political arrangement.” (Youngstown Sheet & Tube Co. v Sawyer, 343 US 579, 633 [1952, Douglas, J., concurring].)
I would therefore reverse the order of the Appellate Division and allow the declaratory judgment action to proceed.
Judges G.B. Smith, Graffeo and Read concur with Judge R.S. Smith; Judge Rosenblatt dissents in a separate opinion in which Chief Judge Kaye and Judge Ciparick concur.
Order affirmed, with costs.
. The Mayor is “the chief executive officer of the city” (NY City Charter § 3), whereas the City Council is “vested with the legislative power of the city” (NY City Charter § 21).
. The majority disapproves of my asserting “without citation of authority” that the Mayor has a duty to follow enacted law unless and until a court nullifies it (majority op at 389). It seems to me basic that legislatures pass laws, executives carry them out and courts decide their constitutionality. The Supreme Court has told us as much (see Marbury v Madison, 1 Cranch [5 US] 137, 177 [1803]; Kendall v United States ex rel. Stokes, 12 Pet [37 US] 524, 613 [1838]; Youngstown Sheet & Tube Co. v Sawyer, 343 US 579, 587-588 [1952]). If the majority means that there is no authority in the New York jurisprudence for this proposition, that is probably because no one thought to question it and the prospect of a New York executive (governor, mayor or county executive) unilaterally refusing to follow a legislative enactment is virtually unheard of.
. The Mayor may veto (“disapprove”) a local law but, if after reconsideration, “the votes of two-thirds of all the council members be cast in favor of repassing such local law, it shall be deemed adopted, notwithstanding the objections of the mayor” (NY City Charter § 37 [b]).
. The Mayor withdrew his motion for a preliminary injunction the day before the Equal Benefits Law took effect.
. See e.g. Matter of Lakeland Water Dist. v Onondaga County Water Auth., 24 NY2d 400, 407 (1969); Matter of Kovarsky v Housing & Dev. Admin, of City of N.Y., 31 NY2d 184, 191 (1972); Board of Educ. of Belmont Cent. School Dist. v Gootnick, 49 NY2d 683, 687 (1980); Press v County of Monroe, 50 NY2d 695, 702 (1980); Matter of Save the Pine Bush v City of Albany, 70 NY2d 193, 202 (1987).
. The majority suggests (majority op at 388) that this Court expressly held in Matter of Carow v Board of Educ. of City of N.Y. (272 NY 341 [1936]) and People ex rel. Balcom v Mosher (163 NY 32 [1900]) that an officer against whom a proceeding for a writ of mandamus was brought could defend on the ground that the legislation he or she had been asked to enforce was invalid. In those cases, the Court apparently assumed that courts could rule on the constitutionality of a law concerning civil service appointments, even though the context was an application for a peremptory writ of mandamus commanding relator’s appointment. But nowhere in either opinion does the Court state such a proposition as a holding.
. ERISA does not preempt “laws with only an indirect economic effect on the relative costs of . . . health insurance packages” (New York State Conference of Blue Cross & Blue Shield Plans v Travelers Ins. Co., 514 US 645, 662 [1995]; see also Burgio & Campofelice, Inc. v New York State Dept. of Labor, 107 F3d 1000, 1009 [2d Cir 1997]; HMI Mech. Sys., Inc. v McGowan, 266 F3d 142, 151 [2d Cir 2001]).
. CPLR 7803 provides that
“[t]he only questions that may be raised in a proceeding under [article 78] are:
“1. whether the body or officer failed to perform a duty enjoined upon it by law; or
“2. whether the body or officer proceeded, is proceeding or is about to proceed without or in excess of jurisdiction; or “3. whether a determination was made in violation of lawful procedure, was affected by an error of law or was arbitrary and capricious or an abuse of discretion, including abuse of discretion as to the measure or mode of penalty or discipline imposed; or “4. whether a determination made as a result of a hearing held, and at which evidence was taken, pursuant to direction by law is, on the entire record, supported by substantial evidence.” (Emphasis added.)