
6 N.Y.3d 380 (2006)
846 N.E.2d 433
813 N.Y.S.2d 3
In the Matter of COUNCIL OF THE CITY OF NEW YORK, Appellant,
v.
MICHAEL R. BLOOMBERG, as Mayor of the City of New York, et al., Respondents.
Court of Appeals of the State of New York.
Argued January 4, 2006.
Decided February 14, 2006.
*381 Steven L. Holley, New York City, David H. Braff, Bradley P. Smith, Julian C. Swearengin, Jay Damashek, Eric Lane and Robert J. Newman for appellant.
*382 Michael A. Cardozo, Corporation Counsel, New York City (Alan G. Krams, Leonard Koerner, Martha Alfaro, June Buch, Spencer Fisher and Kristin M. Helmers of counsel), for respondents.
*383 Kelley Drye & Warren LLP, New York City (Francis T. Murphy, *384 John M. Callagy and Christopher C. Palermo of counsel), for Archdiocese of New York and others, amici curiae.
Dewey Ballantine LLP, New York City (Aldo A. Badini, Adam J. Kaiser, Sara Fuks and Eric Laufgraben of counsel), Sharon M. McGowan, James D. Esseks and Arthur Eisenberg for American Civil Liberties Union and another, amici curiae.
*385 Morrison & Foerster LLP, New York City and San Francisco, California (Jodi K. Miller, Ruth N. Borenstein, Paul Borden, Yana S. Johnson and Ellen K. Eagen of counsel), for City and County of San Francisco and others, amici curiae.
Paul, Weiss, Rifkind, Wharton & Garrison LLP, New York City (Sidney S. Rosdeitcher, Rebecca C. Shore and Judd Henry of counsel), and Paul K. Sonn for Brennan Center for Justice at New York University School of Law, amicus curiae.
*386 Hogan & Hartson L.L.P., New York City (David F. Wertheimer, Joanna Swomley, A. Cristina Pérez-Labiosa, M. Gavan Montague, Eva L. Dietz and Sandhya P. Kawatra of counsel), Susan Sommer and Alphonso David for LAMBDA Legal Defense and Education Fund, Inc., and another, amici curiae.
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.

OPINION OF THE COURT
R.S. SMITH, J.
We hold that New York City's Equal Benefits Law is preempted by state and federal statutes. We therefore affirm the Appellate Division's dismissal of a CPLR article 78 proceeding brought by the New York City Council to compel enforcement of that law.

Facts and Procedural History
The Equal Benefits Law (Administrative Code of City of NY § 6-126) was enacted by the City Council in 2004 over the Mayor's veto. It provides, in substance, that no city agency may enter into contracts having a value of $100,000 or more annually *387 with any person or firm that fails to provide to its employees' domestic partners employment benefits equal to those provided to spouses. "Domestic partners," as defined in the Equal Benefits Law, means people who are registered as having that status under Administrative Code § 3-240 (a), or who register with a contractor pursuant to the Equal Benefits Law itself (Administrative Code § 6-126 [b] [5]). "Employment benefits," as used in the Equal Benefits Law,
"means benefits including, but not limited to, health insurance, pension, retirement, disability and life insurance, family, medical, parental, bereavement and other leave policies, tuition reimbursement, legal assistance, adoption assistance, dependent care insurance, moving and other relocation expenses, membership or membership discounts, and travel benefits provided by a contractor to its employees" (Administrative Code § 6-126 [b] [7]).
Shortly before the Equal Benefits Law's effective date, the Mayor began a declaratory judgment action against the Council, asserting that the law was inconsistent with, and therefore preempted by, provisions of the General Municipal Law and the New York City Charter relating to municipal contracting; that it was also preempted by the federal Employee Retirement Income Security Act of 1974 (29 USC § 1001 et seq. [ERISA]); and that it was invalid because it curtailed the Mayor's powers without a referendum, in violation of the Municipal Home Rule Law and City Charter. After unsuccessfully seeking a temporary restraining order against the law's enforcement, the Mayor, through his counsel, informed Supreme Court that he would withdraw his motion for a preliminary injunction, that he would move promptly for summary judgment, and that in the meanwhile he would "comply with controlling state laws concerning procurement and the Charter"  i.e., that he would not implement the Equal Benefits Law. The next day, the Council began this CPLR article 78 proceeding, in the nature of mandamus to compel, against the Mayor and the City, asking for a judgment requiring them "immediately to implement and enforce the Equal Benefits Law." In response, the Mayor asserted, as he had in the declaratory judgment action, his reasons for considering the law invalid.
Supreme Court granted the petition without addressing the Mayor's arguments, relying on "the presumption of validity." The Appellate Division concluded that the Equal Benefits Law *388 was preempted by both the General Municipal Law and ERISA, and dismissed the proceeding on that basis. We now affirm.

Discussion

I
The Council argues that we should grant its petition and order the Equal Benefits Law enforced without considering the merits of the controversy, on the ground that the validity of a legislative enactment cannot be decided in an article 78 proceeding. The Council's argument is misconceived.
The rule relied on by the Council that "article 78 does not lie to challenge a legislative act" (New York City Health & Hosps. Corp. v McBarnette, 84 NY2d 194, 201 [1994]) means that a petitioner who is challenging the validity of legislation may not use an article 78 proceeding for that purpose; a lawsuit to challenge the validity of legislation should take the form of an action for a declaratory judgment. (See also Press v County of Monroe, 50 NY2d 695, 702 [1980]; Matter of Kovarsky v Housing & Dev. Admin. of City of N.Y., 31 NY2d 184, 192 [1972].) It does not mean that, when an article 78 proceeding is brought to compel the enforcement of legislation the petitioner claims is valid, the court must grant the petition whether the legislation is valid or not.
On the contrary, article 78 relief in the form of mandamus to compel may be granted only where a petitioner establishes a "clear legal right" to the relief requested (Matter of Brusco v Braun, 84 NY2d 674, 679 [1994]). And we have repeatedly held that an officer against whom a proceeding for a writ of mandamus is brought may defend on the ground that the legislation he or she has been asked to enforce is invalid (Matter of Carow v Board of Educ. of City of N.Y., 272 NY 341, 345 [1936]; People ex rel. Balcom v Mosher, 163 NY 32, 35 [1900]). The theory the Council advocates 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, and would contradict the principle that "mandamus is never granted for the purpose of compelling the performance of an unlawful act" (Matter of People ex rel. Sherwood v State Bd. of Canvassers, 129 NY 360, 370 [1891]).
Thus we hold that the Appellate Division was correct in concluding that the Mayor was entitled to raise the invalidity of the Equal Benefits Law as a defense in this case. We are not *389 persuaded by our dissenting colleagues' arguments to the contrary.
The dissent asserts, without citation of authority, that the Mayor's duty is to "follow a duly enacted law . . . unless and until a court nullifies it" (dissenting op at 396). The assertion has a circular quality, for how can a law be "duly enacted" if the legislature that enacted it had no authority to do so? The Mayor does indeed have a duty to implement valid legislation passed by the City Council, whether over his veto or not, but he also has a duty to comply with valid state and federal legislation, including state competitive bidding laws and ERISA. Where a local law seems to the Mayor to conflict with a state or federal one, the Mayor's obligation is to obey the latter, as the Mayor has done here.
The dissent suggests that the procedural characteristics of an article 78 proceeding make it unsuitable for resolving the Mayor's contention that the Equal Benefits Law is invalid (dissenting op at 401-402). The suggestion is puzzling. Article 78 proceedings are indeed designed for the prompt resolution of largely legal issues, rather than for discovery, trials and "credibility judgments" (id. at 400), but, as we explain below, the validity of the Equal Benefits Law turns entirely on issues of law, not of fact. The dissent says that the likely fiscal impact of the Equal Benefits Law presents an issue of fact (id. at 399) but, as the next section of our opinion explains, it is not an issue sufficient to defeat summary judgment in this case. We assume the accuracy of the Council's assertion that the law will "not cost contractors much money" (id. at 400). We conclude that the law is nevertheless preempted by the competitive bidding statute.
The dissent seems to shrink, understandably, from following to the limits of its logic the proposition that an executive must implement every law, valid or invalid, that a legislative body enacts until a court determines the law's validity. Certainly, the dissenters would not so hold in an extreme case: If a legislative body enacted a law requiring racial segregation of public schools, the dissenters would not say that it is the duty of police to bar black children from "white" schools until a court orders them let in. And even in this case, the dissent stops short of saying that the relief the Council seeks in this article 78 proceeding  an order requiring implementation of the Equal Benefits Law, issued without considering the law's validity  should be granted. The dissenters say only that they would "reverse the order of the Appellate Division and allow the declaratory judgment *390 action to proceed" (dissenting op at 403)  so that the article 78 proceeding would presumably remain in limbo until the declaratory judgment action is decided. All that means, in this case, is that the parties would make, and the courts would resolve, exactly the same arguments the parties make here, but under a different caption. We decline to order such a purposeless exercise, and we proceed to consider whether the Mayor can be ordered to enforce the Equal Benefits Law.

II
We agree with the Appellate Division that the Council's article 78 proceeding must be dismissed because the Equal Benefits Law conflicts with, and is therefore preempted by, General Municipal Law § 103.
Under section 103 (1), "all contracts for public work involving an expenditure of more than twenty thousand dollars and all purchase contracts involving an expenditure of more than ten thousand dollars, shall be awarded . . . to the lowest responsible bidder . . . ." The Mayor argues, and we hold, that the Equal Benefits Law violates this requirement by excluding from public contracting any "responsible bidder" that does not provide equal benefits to domestic partners and spouses.
Associated Bldrs. & Contrs. v City of Rochester (67 NY2d 854 [1986]) is the controlling authority. That case involved a City of Rochester ordinance providing that in awarding municipal construction contracts in excess of $100,000, preference must be given to a contractor whose employees participated in a state-approved apprenticeship program. We held that, in view of section 103's predominant purpose of "protection of the public fisc by requiring competitive bidding," the ordinance could not stand (id. at 856). We acknowledged that the apprentice training that the Rochester ordinance sought to promote was "a desirable end," but held it was not one that could "affect the qualification of an otherwise responsible low bidder" (id.). That logic is dispositive in this case. The provision of equal benefits for domestic partners and spouses may be a desirable end, but it is not one that New York City is free to pursue by departing from the requirements of the competitive bidding statute.
The Council argues that the Equal Benefits Law will not undermine the purposes of competitive bidding, because, the Council says, the economic impact of the Equal Benefits Law will be de minimis. The Council asserts, and we assume, that the cost of providing equal benefits to domestic partners and to *391 spouses will be close to zero. But the competitive bidding statute does not become inapplicable when the sums saved by complying with it are immaterial.
Apart from its purely financial effect, competitive bidding serves to prevent "favoritism, improvidence, fraud and corruption in the awarding of public contracts" (Matter of New York State Ch., Inc., Associated Gen. Contrs. of Am. v New York State Thruway Auth., 88 NY2d 56, 68 [1996]). If municipalities are free to contract only with firms that provide certain benefits to their employees, the door is open at least to favoritism, for the municipality could design its requirements to match the benefit structure of the bidder it favored. No such thing has happened in this case, of course; we have no doubt that the Equal Benefits Law is a good faith effort to make contractors treat the domestic partners of employees in a way that the Council considers fair. But the competitive bidding statute reflects a judgment by the State Legislature that, to avoid among other things the risk of favoritism, municipalities must give business to the lowest responsible bidder, whether the bidder's benefit plans meet the municipality's idea of fairness or not.
The Council says that the validity of the Equal Benefits Law finds support in the New York State Chapter case; in McMillen v Browne (14 NY2d 326 [1964]); and in the home rule provisions of the State Constitution and implementing legislation. None of these is a sufficient basis for upholding the law.
In New York State Chapter, we held that entities governed by competitive bidding requirements could, under some circumstances, adopt so-called project labor agreements (PLAs), providing that bidders for public construction contracts must sign prenegotiated labor agreements or be barred from bidding. We did not hold, however, that public entities could enter into PLAs as a means of assuring fair treatment to contractors' employees. Indeed, we said that "PLAs that do have as their purpose social policymaking, such as remedying racial and gender bias, will not be sustained" (88 NY2d at 76). But we recognized that, while PLAs "have an anticompetitive impact on the bidding process," they also brought economic benefits to the contracting authority, in that "the union promises labor peace through the life of the contract" (id. at 65). We held that the resulting "efficiencies to be gained" (id.) might justify a PLA under the competitive bidding laws. We said that a PLA would be upheld only if it "had as its purpose and likely effect the advancement of the interests embodied in the competitive bidding statutes" (id. at *392 69), which we identified as "prudent use of public moneys and. . . the acquisition of high quality goods and services at the lowest possible cost" (id. at 67).
In other words, under New York State Chapter, PLAs and other procedures having an anticompetitive effect on the bidding process can be justified only by proof that they are designed to save the public money by causing contracts to be performed at smaller cost or without disruption. No such justification can be convincingly claimed for the Equal Benefits Law. The Council says that the cost of the law will be insignificant, and will be outweighed by the benefits to the public that flow from assuring adequate health care to workers' domestic partners, but the Council cannot and does not seriously assert that the "purpose and likely effect" of the law is to make the City's contracts cheaper or their performance more efficient. The law  like the mayoral executive order prohibiting discrimination by city contractors based on sexual preference that was at issue in Under 21, Catholic Home Bur. for Dependent Children v City of New York (65 NY2d 344 [1985])  is obviously designed as "an enactment of social policy" (id. at 359 n 5). New York State Chapter gives no support to the view that social policy goals may trump the competitive bidding statute.
The Council relies on McMillen because in that case we upheld a local law requiring payment of a minimum wage by city contractors  a law plainly designed, as is the Equal Benefits Law, for the protection of contractors' employees. The flaw in the Council's argument is that McMillen had nothing to do with competitive bidding requirements; they are nowhere referred to in the decision. The issue in McMillen was whether New York City's minimum wage requirement was preempted by the State's prevailing wage and minimum wage laws. Our resolution of that issue is not relevant to this case.
The home rule provisions of the Constitution and the legislation implementing them list several subjects about which local governments are given the power to legislate. One of those subjects is "[t]he wages or salaries, the hours of work or labor, and the protection, welfare and safety of persons employed by any contractor or sub-contractor performing work, labor or services for [the municipality]" (NY Const, art IX, § 2 [c] [ii] [9]; Municipal Home Rule Law § 10 [1] [ii] [a] [10]). But this grant of power to municipalities is expressly made subject to contrary state legislation. The Constitution and the statute say that municipalities may adopt laws of the kind described in the *393 language we have quoted "except to the extent that the legislature shall restrict the adoption of such a local law" (NY Const, art IX, § 2 [c] [ii]; Municipal Home Rule Law § 10 [1] [ii]). General Municipal Law § 103 is, as Associated Builders makes clear, just such a restriction. The requirement of section 103 that municipalities contract with the lowest responsible bidder is plainly in tension with the right of a municipality to say that it will contract only with firms that provide certain benefits. Where the two conflict, as they do here, the legislative restriction on the municipality's power prevails.
In short, the Equal Benefits Law conflicts with General Municipal Law § 103. The City Council has not demonstrated a clear legal right to have the Equal Benefits Law enforced.

III
The Equal Benefits Law is also preempted by ERISA, except to the extent that it governs benefits that are outside ERISA's scope. In so holding, we agree with two federal district courts that have addressed the validity under ERISA of local legislation similar to the Equal Benefits Law (Catholic Charities of Me., Inc. v City of Portland, 304 F Supp 2d 77, 84-93 [D Me 2004]; Air Transp. Assn. of Am. v City & County of San Francisco, 992 F Supp 1149, 1165-1180 [ND Cal 1998]).
ERISA is a federal statute that imposes disclosure and reporting requirements, and establishes standards of conduct, for employee benefit plans and their fiduciaries (see 29 USC § 1001 [b]). A consistent, nationwide regulatory scheme was clearly one of Congress's goals, and to that end it provided that "the provisions of [ERISA] shall supersede any and all State laws insofar as they may now or hereafter relate to any employee benefit plan" of the kind governed by ERISA (29 USC § 1144 [a]). ERISA plans include, among other things, "any plan, fund, or program . . . maintained by an employer . . . for the purpose of providing . . . medical, surgical, or hospital care or benefits, or benefits in the event of sickness, accident, disability, death or unemployment . . ." (29 USC § 1002 [1] [A]). Clearly, the coverage of ERISA overlaps substantially with the coverage of the Equal Benefits Law, though the Equal Benefits Law may apply to some benefits not governed by ERISA (see Air Transp. Assn. of Am. v City & County of San Francisco, 992 F Supp at 1169 [a law applying to "benefits that . . . require no `ongoing administrative program,' . . . does not apply to a `plan' and thus is not preempted"; also, "(m)oving expenses . . . are not even ERISA-covered benefits"]).
*394 The broad preemptive language of 29 USC § 1144 (a), superseding all laws that "relate to any employee benefit plan," has been held by the United States Supreme Court to be no less sweeping than it appears on its face: "A law `relates to' an employee benefit plan, in the normal sense of the phrase, if it has a connection with or reference to such a plan" (Shaw v Delta Air Lines, Inc., 463 US 85, 96-97 [1983]). In Shaw, the Court struck down a New York law that prohibited discrimination in the provision of employee benefits on the basis of pregnancy. Shaw holds that states (and, of course, municipalities) cannot regulate the content of ERISA plans. That holding has been left untouched by more recent cases, which hold, in effect, that ERISA does not preempt every state law that has an indirect impact on an ERISA plan (New York State Conference of Blue Cross & Blue Shield Plans v Travelers Ins. Co., 514 US 645 [1995]; HMI Mech. Sys., Inc. v McGowan, 266 F3d 142 [2d Cir 2001]).
The Equal Benefits Law seemingly seeks to do exactly what ERISA, as interpreted in Shaw, prohibits  to prescribe the terms of benefit plans. The Council argues, however, that the prohibition is inapplicable because the Equal Benefits Law does not compel any firm to offer domestic partner benefits; it merely provides that the City will not contract with firms that do not do so. Thus, says the Council, the law does not regulate benefit plans, but reflects a decision by the City, as a market participant, to choose the firms it deals with based on the benefits those firms provide their employees. The Council's "market participant" argument is inconsistent with United States Supreme Court precedent.
While the Supreme Court has not addressed the market participant theory in an ERISA preemption case, it recognized a limited market participant exception to federal labor law preemption in the so-called Boston Harbor case (Building & Constr. Trades Council v Associated Builders & Contractors of Mass./R.I., Inc., 507 US 218 [1993]). Boston Harbor (like our New York State Chapter case, discussed at pages 391-392 above) involved a public agency's practice of entering into project labor agreements that required its contractors to sign agreements with labor unions, in order to prevent a project from being disrupted by labor disputes. Under the preemptive provisions of federal labor law, a state could not impose such a requirement by statute or regulation, but the Court held in Boston Harbor that the requirement could be imposed by a state agency when *395 the state is not regulating, but is acting as an owner or manager of property that "must interact with private participants in the marketplace" (507 US at 227). The Boston Harbor court recognized, as we did in New York State Chapter, that a PLA may produce economic benefits that a public proprietor, like a private proprietor, should be free to seek in the marketplace. The Court thus recognized a distinction "between government as regulator and government as proprietor" (id.).
Boston Harbor does not hold, however, that a state may escape the force of federal preemption by using its power in the marketplace to implement governmental policies. To the contrary, Boston Harbor makes clear that a state acts as a regulator, not a proprietor, when it uses its bargaining leverage as a means of attaining policy ends. Thus, the Court in Boston Harbor distinguished Wisconsin Dept. of Industry v Gould Inc. (475 US 282 [1986]), which held that certain state activity in the marketplace was preempted.
In Gould, the Court held that a Wisconsin statute barring some labor law violators from doing business with the State was preempted by federal labor law. The difference between Boston Harbor and Gould, the Court explained in Boston Harbor, is that in Gould the State's reason for its marketplace activity was to deter labor law violations, not to protect the State's proprietary interest in the efficient performance of contracts (507 US at 228-229). Under Boston Harbor, the market participant exception to preemption is limited to the situation where "the State acts as a market participant with no interest in setting policy" (id. at 229).
The Equal Benefits Law is much more like the statute involved in Gould than the contract specification at issue in Boston Harbor. In enacting the Equal Benefits Law the Council was obviously "setting policy." As we pointed out above, it was not acting just as a manager or owner of property concerned with assuring the cheap and efficient performance of contracts. The Equal Benefits Law, as its name implies, is designed to induce contractors to treat domestic partners and spouses equally, just as the Wisconsin statute in Gould was designed to induce contractors to avoid unfair labor practices. Thus the market participant exception does not apply here, and the Equal Benefits Law, except to the extent that the benefits it governs are not provided through ERISA plans, is preempted by ERISA.
Accordingly, the order of the Appellate Division should be affirmed, with costs.
*396 ROSENBLATT, J. (dissenting).
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 *397 City 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.[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 *398 proceed 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] Unless 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).[6] 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 *399 inaction, 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. Contradicting *400 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 *401 relieved 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 summarily *402 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 *403 of 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).

VI.
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.
Order affirmed, with costs.
NOTES
[1]  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).
[2]  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.
[3]  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]).
[4]  The Mayor withdrew his motion for a preliminary injunction the day before the Equal Benefits Law took effect.
[5]  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).
[6]  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.
[7]  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]).
[8]  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.)
