
30 Cal.Rptr.3d 755 (2005)
36 Cal.4th 412
115 P.3d 41
MW ERECTORS, INC., Plaintiff and Appellant,
v.
NIEDERHAUSER ORNAMENTAL AND METAL WORKS COMPANY, INC., et al., Defendants and Respondents.
No. S123238.
Supreme Court of California.
July 14, 2005.
*757 Pine & Pine, Norman Pine, Beverly Tillett Pine, Sherman Oaks; Gibbs, Giden, Locher & Turner, Richard J. Wittbrodt and Marion T. Hack, Los Angeles, for Plaintiff and Appellant.
Donald K. Struckman for Western Steel Council as Amicus Curiae on behalf of Plaintiff and Appellant.
Law Offices of Abdulaziz & Grossbart, Sam K. Abdulaziz and Bruce D. Rudman, North Hollywood, as Amici Curiae on behalf of Plaintiff and Appellant.
Weinberg, Roger & Rosenfeld and David A. Rosenfeld, Oakland, for District Council of Iron Workers for the State of California and Vicinity as Amicus Curiae on behalf of Plaintiff and Appellant.
Arter & Hadden, Lord, Bissell & Brook, William S. Davis, Los Angeles; Arter & Hadden, Musick Peeler & Garrett and Jack W. Fleming, Costa Mesa, for Defendants and Respondents.
*758 Jones & Mayer, Kimberly Hall Barlow, Fullerton, and Elena Q. Gerli for League of California Cities as Amicus Curiae on behalf of Defendants and Respondents.
*756 BAXTER, J.
To protect the public, the Contractors' State License Law (CSLL; Bus. & Prof.Code, § 7000 et seq.)[1] imposes strict and harsh penalties for a contractor's failure to maintain proper licensure. Among other things, the CSLL states a general rule that, regardless of the merits of the claim, a contractor may not maintain any action, legal or equitable, to recover compensation for "the performance of any act or contract" unless he or she was duly licensed "at all times during the performance of that act or contract." (§ 7031, subd. (a) (section 7031(a)), italics added.)
Earlier case law softened the severity of this scheme by allowing contractors, though technically unlicensed at the time of performance, to show they had substantially complied with licensure requirements. However, the CSLL has since limited the availability of the substantial compliance exception. In particular, the statute specifies that "[t]he judicial doctrine of substantial compliance shall not apply" unless the contractor "had been duly licensed as a contractor in this state prior to the performance of the act or contract" for which licensure was required. (§ 7031, subd. (e), italics added; cf. id., former subd. (d), Stats.1994, ch. 550, § 1, p. 2803 (hereafter, references to section 7031, former subdivision (d) are to this version, unless otherwise noted).)
Here we address several questions about the application of these CSLL provisions. Our most significant conclusions are these: (1) Where applicable, section 7031(a) bars a person from suing to recover compensation for any work he or she did under an agreement for services requiring a contractor's license unless proper licensure was in place at all times during such contractual performance. (2) Section 7031(a) does not allow a contractor who was unlicensed at any time during contractual performance nonetheless to recover compensation for individual acts performed while he or she was duly licensed. (3) The statutory exception for substantial compliance is not available to a contractor who had not been duly licensed at some time before beginning performance under the contract. (4) However, if fully licensed at all times during contractual performance, a contractor is not barred from recovering compensation for the work solely because he or she was unlicensed when the contract was executed.
To resolve this particular case, we further determine that the doctrine of judicial estoppel does not bar defendant, by virtue of allegedly inconsistent positions it took in related litigation, from contesting plaintiff's licensure.
These conclusions require that we affirm in part, and reverse in part, the Court of Appeal's judgment.

FACTS
The pertinent facts, as developed on defendant's motion for summary judgment, are essentially undisputed. Owner Disney Corporation (Disney) constructed a hotel, with Turner Construction Company (Turner) as the general contractor. Turner contracted with defendant Niederhauser Ornamental and Metal Works Company, Inc. (Niederhauser) to perform specialized metal work on the project.
Niederhauser, in turn, awarded two subcontracts to plaintiff MW Erectors, Inc. (MW). On or about October 11, 1999, *759 Niederhauser and MW executed a contract for MW's performance of "structural" steel work (structural contract). On or about November 12, 1999, the same parties entered a second contract for MW's performance of "ornamental" steel work (ornamental contract).
MW began work under the structural contract on or before December 3, 1999, but did not obtain a C-51 structural steel contractor's license (see Cal. Code Regs., tit. 16, § 832.51) until December 21, 1999. Work on the ornamental contract began in early January 2000.
MW subsequently sued Niederhauser and Niederhauser's payment bonds, seeking alleged amounts due of $955,553 for work under the structural contract and $366,694 for work under the ornamental contract.[2] Niederhauser moved for summary judgment, alleging that MW's claim was barred under section 7031(a), because MW had not been properly licensed at all times during the performance of its contracts. Niederhauser asserted that MW had no C-51 license when it began performance of the structural steel contract, and that MW never obtained a C-23 ornamental metals license, which Niederhauser asserted was required for performance of the ornamental contract. Niederhauser also averred that MW could not demonstrate its substantial compliance with the C-51 license requirement because it had never held a California contractor's license before beginning work under the contracts in December 1999.
In its response to Niederhauser's motion, MW admitted that it needed a C-51 license for its work under both contracts, and that this license was not technically in place when MW began work on the structural contract. MW also admitted it never obtained a C-23 license. However, MW claimed there were triable issues that it was in substantial compliance with the C-51 license requirement at all times during its performance of both contracts, and that no C-23 license was necessary for work under the ornamental contract. In its own subsequent motion, MW asserted that Niederhauser was judicially estopped to contest licensure in any event because, in related litigation, Niederhauser had benefited by its implicit reliance on MW's proper licensing.
The superior court granted summary judgment for Niederhauser and dismissed MW's action.[3] MW appealed, urging that (1) it had shown substantial compliance with the C-51 license requirement, (2) it did not need a C-23 license, and (3) Niederhauser was judicially estopped to question licensure. In its respondent's brief, Niederhauser disputed these points, and also argued, for the first time, that both contracts were illegal, void, and unenforceable ab initio because MW was unlicensed when they were executed.
The Court of Appeal for the Fourth Appellate District, Division Three, reversed. The Court of Appeal first concluded that Niederhauser was not judicially estopped to contest MW's licensure. On the merits, however, the court reasoned as follows: The contracts were not void ab initio because of MW's unlicensed status when they were executed. Instead, MW's right to recover depended *760 on its licensure during its performance of the contracts. Under section 7031(a), a contractor must be duly licensed at all times during performance of the "act or contract" for which compensation was sought. Thus, MW could not recover for work it performed under the agreements during the relatively short time before it had secured either a C-51 or C-23 license. Nonetheless, section 7031(a) allowed MW to obtain court-ordered compensation for every individual act it performed under its contracts after all necessary licensure was in place. Thus, MW was entitled to prove amounts due for its work on the structural contract after the C-51 license was issued. MW had a valid C-51 license at all times during performance of the ornamental contract. While MW never sought or obtained a C-23 license, MW raised a triable issue that the C-51 license was sufficient.
Niederhauser sought review, urging that section 7031(a) required due licensure at all times during performance of a contract, and that both contracts were void ab initio because MW was not licensed when they were executed. In its answer to the petition, MW asserted, as additional issues (Cal. Rules of Court, rule 28.1(c)), its claims of substantial compliance and judicial estoppel. We granted review.[4] We now conclude that the Court of Appeal's judgment must be affirmed in part and reversed in part.

DISCUSSION

1. Judicial estoppel.
MW renews its contention that Niederhauser is judicially estopped to raise MW's nonlicensure as a bar to MW's recovery because, in related litigation, Niederhauser took, and benefited from, the opposite position. MW asserts that in a lawsuit against the project's owner, Disney, and its general contractor, Turner, Niederhauser obtained money by implicitly representing that MW was fully licensed. Under these circumstances, MW insists, Niederhauser may not now assert MW's nonlicensure as a bar to MW's recovery of money due to MW from Niederhauser. For reasons we explain below, we agree with the Court of Appeal that application of the judicial estoppel doctrine is not appropriate here.
The evidence bearing on MW's judicial estoppel argument is sketchy. The record reflects that when MW sued Niederhauser for monies due under the two contracts between these parties, Niederhauser cross-complained against Turner and Disney for sums allegedly due and unpaid by Turner to Niederhauser. Niederhauser also noticed a mechanic's lien against the project for the sums it claimed it was owed by Turner. MW represents, and Niederhauser apparently does not dispute, that Niederhauser subsequently settled its claims against Disney and Turner for a substantial amount.
Neither Niederhauser's cross-complaint nor its mechanic's lien mentioned MW, its work, or its licensure. Nonetheless, MW asserts that a significant portion of the sums sought and obtained by Niederhauser from Turner and Disney were attributable to MW's work under its contracts with Niederhauser. MW urges that Niederhauser's claim of entitlement to such amounts implicitly relied on MW's due licensure because, even if it is itself licensed, a contractor may not use the courts to recover sums attributable to the work of an entity that lacked proper licensure. (Citing Loving & Evans v. Blick *761 (1949) 33 Cal.2d 603, 612-613, 204 P.2d 23; and Holm v. Bramwell (1937) 20 Cal.App.2d 332, 67 P.2d 114 (Holm).) Accordingly, MW maintains, Niederhauser is estopped to deny such licensure against MW itself.
"`"Judicial estoppel precludes a party from gaining an advantage by taking one position, and then seeking a second advantage by taking an incompatible position. [Citations.] ..."' [Citation.] The doctrine [most appropriately] applies when: `(1) the same party has taken two positions; (2) the positions were taken in judicial or quasi-judicial administrative proceedings; (3) the party was successful in asserting the first position (i.e., the tribunal adopted the position or accepted it as true); (4) the two positions are totally inconsistent; and (5) the first position was not taken as a result of ignorance, fraud, or mistake.'" (Aguilar v. Lerner (2004) 32 Cal.4th 974, 986-987, 12 Cal.Rptr.3d 287, 88 P.3d 24 (Aguilar); Scripps Clinic v. Superior Court (2003) 108 Cal.App.4th 917, 943, 134 Cal.Rptr.2d 101; Jackson v. County of Los Angeles (1997) 60 Cal.App.4th 171, 183, 70 Cal.Rptr.2d 96 (Jackson).)
"`"The doctrine's dual goals are to maintain the integrity of the judicial system and to protect parties from opponents' unfair strategies. [Citation.]"'" (Aguilar, supra, 32 Cal.4th 974, 986, 12 Cal.Rptr.3d 287, 88 P.3d 24.) Consistent with these purposes, numerous decisions have made clear that judicial estoppel is an equitable doctrine, and its application, even where all necessary elements are present, is discretionary. (E.g., Aguilar, supra, 32 Cal.4th 974, 986, 12 Cal.Rptr.3d 287, 88 P.3d 24; Koo v. Rubio's Restaurants, Inc. (2003) 109 Cal.App.4th 719, 735, 135 Cal.Rptr.2d 415; Tuchscher Development Enterprises, Inc. v. San Diego Unified Port Dist. (2003) 106 Cal.App.4th 1219, 1245, 132 Cal.Rptr.2d 57; People ex rel. Sneddon v. Torch Energy Services, Inc. (2002) 102 Cal.App.4th 181, 189, 125 Cal.Rptr.2d 365; Cloud v. Northrop Grumman Corp. (1998) 67 Cal.App.4th 995, 1016, 79 Cal.Rptr.2d 544; see M. Perez Co., Inc. v. Base Camp Condominiums Assn. No. One (2003) 111 Cal.App.4th 456, 469, 3 Cal.Rptr.3d 563; International Engine Parts, Inc. v. Feddersen & Co. (1998) 64 Cal.App.4th 345, 351, 75 Cal.Rptr.2d 178; Jackson, supra, 60 Cal.App.4th 171, 184, fn. 8, 70 Cal.Rptr.2d 96.)
Here, MW cannot invoke judicial estoppel for the simplest of reasons. Section 7031(a) expressly provides that, "regardless of the merits," one may not "bring or maintain any action, or recover in law or equity in any action, ... for the collection of compensation for the performance of any act or contract where a license is required ... without alleging that he or she was a duly licensed contractor at all times during the performance of that act or contract." (Italics added.) If the defendant then "controvert[s]" the plaintiff's proper licensure, the plaintiff must prove it by producing verified certificates establishing that he or she held all necessary licenses during performance of the work. (§ 7031, subd. (d).)
"Because of the strength and clarity of this policy" (Hydrotech Systems, Ltd. v. Oasis Waterpark (1991) 52 Cal.3d 988, 995, 277 Cal.Rptr. 517, 803 P.2d 370 (Hydrotech)), the bar of section 7031(a) applies "[r]egardless of the equities." (Hydrotech, supra, at p. 997, 277 Cal.Rptr. 517, 803 P.2d 370.) Indeed, it has long been settled that "the courts may not resort to equitable considerations in defiance of section 7031." (Lewis & Queen v. N.M. Ball Sons (1957) 48 Cal.2d 141, 152, 308 P.2d 713 (Lewis & Queen).) "`Section 7031 represents a legislative determination that the importance of deterring unlicensed persons from engaging in the contracting *762 business outweighs any harshness between the parties, and that such deterrence can best be realized by denying violators the right to maintain any action for compensation in the courts of this state [Citation.]...'" (Hydrotech, supra, at p. 995, 277 Cal.Rptr. 517, 803 P.2d 370, quoting Lewis & Queen, supra, at p. 151, 308 P.2d 713, italics in Hydrotech.)
Acceptance of MW's judicial estoppel argument would contravene this strong and clear statutory mandate. It would permit MW to disregard the statutory bar and to recover compensation for work that required a license, even if MW was not licensed "at all times" during the performance of that work. (§ 7031(a).) We decline to endorse such a result.
We are not persuaded otherwise by the possibility that, in its suit against Disney and Turner, Niederhauser did recover amounts attributable to MW's unlicensed work, and will thus be unjustly enriched if allowed to retain those funds. We have previously disregarded equitable considerations even though the result was to permit another entity to retain sums otherwise due to an unlicensed contractor.
Thus, in Lewis & Queen, the general contractor on a state highway project was sued by an unlicensed subcontractor for amounts due under the subcontracts. The subcontractor asserted, among other things, that because the state had paid the general contractor in full for the project, "justice require[d] that [the general contractor] be compelled to turn over to plaintiff the proceeds from the state contracts attributable to plaintiff's labor." (Lewis & Queen, supra, 48 Cal.2d 141, 150, 308 P.2d 713.) This court disagreed, concluding that the possibility of the defendant's unjust enrichment could not overcome the absolute prohibition against use of the courts to recover for unlicensed contract work. (Id. at pp. 150-151, 308 P.2d 713.)
Section 7031(a) will be applied, regardless of equitable considerations, even when the person for whom the work was performed has taken calculated advantage of the contractor's lack of licensure. Thus, it matters not that the beneficiary of the contractor's labors knew the contractor was unlicensed. (Hydrotech, supra, 52 Cal.3d 988, 997, 277 Cal.Rptr. 517, 803 P.2d 370; Pickens v. American Mortgage Exchange (1969) 269 Cal.App.2d 299, 302, 74 Cal.Rptr. 788 (Pickens); Cash v. Blackett (1948) 87 Cal.App.2d 233, 196 P.2d 585.) Moreover, a contractor cannot circumvent section 7031(a) by alleging the beneficiary's false promise to pay despite the contractor's lack of licensure. (Hydrotech, supra, 52 Cal.3d at pp. 997-1002, 277 Cal.Rptr. 517, 803 P.2d 370.) Accordingly, we are convinced that Niederhauser is not estopped, on grounds of bad faith or unjust enrichment, from asserting a nonlicensure defense against MW.
Of course, the equitable doctrine of judicial estoppel targets not only unfairness between individual parties, but also abuse of the judicial system itself. Nothing we say here is intended to authorize or condone abusive manipulation of the courts. And the law provides means of avoiding such abuse, if any occurred, under the circumstances alleged here. Disney and Turner could have determined through normal discovery and investigation whether Niederhauser's cross-complaint and mechanic's lien included amounts attributable to the work of an unlicensed subcontractor. For all that appears, the two cross-defendants did precisely that before deciding to settle with Niederhauser. On the other hand, if persuaded that they had no legal obligation to pay such amounts, they were free to assert the matter as an affirmative *763 defense to Niederhauser's claims.[5]
For all these reasons, we conclude that Niederhauser is not judicially estopped to assert MW's nonlicensure as a bar to MW's recovery. Accordingly, we turn to the merits of the licensure issues.

2. Licensure during performance of "act or contract."
Since the CSLL was adopted in 1939 (Stats.1939, ch. 37, § 1, p. 381), section 7031 has declared that, except as expressly otherwise provided, a contractor may not sue to collect compensation for performance of "any act or contract" requiring a license without alleging that he or she was duly licensed "at all times during the performance of that act or contract." (§ 7031(a).) In 1989, section 7031(a) was amended to make clear that the bar extends to actions "in law or equity" and applies "regardless of the merits of the cause of action." (Stats.1989, ch. 368, § 1, p. 1509.) If licensure is controverted, the suing contractor must produce a verified certificate establishing that he or she "was duly licensed ... during the performance of any act or contract covered by the action." (§ 7031, subd. (d).)
MW concedes it needed a C-51 license to perform the work contemplated by the structural steel contract, but began work thereon before its C-51 license was formally issued on December 21, 1999. Thus, MW admits it "was [not] ... duly licensed ... at all times during the performance of that ... contract." (§ 7031(a).) The Court of Appeal nonetheless held that, while section 7031(a) bars MW from recovering compensation for pre license activities under the structural steel contract, MW may recover for all performance rendered under that contract after the C-51 license was issued. We disagree.
At the outset, the Court of Appeal's interpretation contravenes well-entrenched case law. Prior decisions express a consistent understanding that one fails to meet the technical requirements now set forth in section 7031(a), and is ineligible to recover any compensation under the terms of that statute, if, at any time during performance of an agreement for contractor services, he or she was not duly licensed. (Latipac, Inc. v. Superior Court (1966) 64 Cal.2d 278, 280-281, 49 Cal.Rptr. 676, 411 P.2d 564 (Latipac); Pacific Custom Pools, Inc. v. Turner Construction Co. (2000) 79 Cal.App.4th 1254, 1259-1260, 94 Cal.Rptr.2d 756; ICF Kaiser Engineers, Inc. v. Superior Court (1999) 75 Cal.App.4th 226, 230, fn. 3, 89 Cal.Rptr.2d 88; Pickens, supra, 269 Cal.App.2d 299, 302, 74 Cal.Rptr. 788; Bierman v. Hagstrom Construction Co. (1959) 176 Cal.App.2d 771, 776-777, 1 Cal.Rptr. 826; Harrison v. Butte Steel Buildings, Inc. (1957) 150 Cal.App.2d 296, 302-303, 310 P.2d 126; see Slatkin v. White (2002) 102 Cal.App.4th 963, 968, 126 Cal.Rptr.2d 54 (Slatkin); Owens v. Haslett (1950) 98 Cal.App.2d 829, 832, 221 P.2d 252.) Our close examination of section 7031(a) confirms that these decisions are correct.
"In construing a statute, `"we strive to ascertain and effectuate the Legislature's intent." [Citations.] Because *764 statutory language "generally provide[s] the most reliable indicator" of that intent [citations], we turn to the words themselves, giving them their "usual and ordinary meanings" and construing them in context....' (People v. Castaneda [Castenada] (2000) 23 Cal.4th 743, 746-747 [97 Cal.Rptr.2d 906, 3 P.3d 278].) `If the language contains no ambiguity, we presume the Legislature meant what it said, and the plain meaning of the statute governs.' (People v. Robles (2000) 23 Cal.4th 1106, 1111 [99 Cal.Rptr.2d 120, 5 P.3d 176].) If, however, the statutory language is susceptible of more than one reasonable construction, we can look to legislative history (ibid.) and to rules or maxims of construction (Meija [Mejia] v. Reed (2003) 31 Cal.4th 657, 663 [3 Cal.Rptr.3d 390, 74 P.3d 166]). `... [T]he court may [also] consider the impact of an interpretation on public policy, for "[w]here uncertainty exists consideration should be given to the consequences that will flow from a particular interpretation."' (Ibid., quoting Dyna-Med, Inc. v. Fair Employment & Housing Com. (1987) 43 Cal.3d 1379, 1387 [241 Cal.Rptr. 67, 743 P.2d 1323].)" (People v. Smith (2004) 32 Cal.4th 792, 797-798, 11 Cal.Rptr.3d 290, 86 P.3d 348.)
Addressing section 7031's plain language, we note first its specific provision that "no person ... may bring or maintain any action, or recover in law or equity in any action ... for the collection of compensation for the performance of any act or contract [requiring] a [contractor's] license" unless he or she alleges (§ 7031(a), italics added), and can prove (§ 7031, subd. (d)), his or her due licensure "at all times" during such performance (§ 7031(a)). The words "at all times" convey the Legislature's obvious intent to impose a stiff all-or-nothing penalty for unlicensed work by specifying that a contractor is barred from all recovery for such an "act or contract" if unlicensed at any time while performing it. This all-or-nothing philosophy is directly at odds with the premise that contractors with lapses in licensure may nonetheless recover partial compensation by narrowly segmenting the licensed and unlicensed portions of their performance.
To conclude otherwise, the Court of Appeal focused on the words "act or contract." In the Court of Appeal's view, urged here by MW, the disjunctive phrasing of this passage plainly indicates that a contractor may recover compensation for either any "act" or any "contract" requiring a license, so long as he or she was duly licensed at all times during the performance of either the "act" or the "contract." Thus, the Court of Appeal reasoned, the contractor may recover compensation for each and every fully licensed "act," even if it occurred in furtherance of a "contract" and the contractor was not licensed "at all times during the performance of such ... contract" (italics added). We find this parsing of section 7031(a) unpersuasive.
Central to the Court of Appeal's reasoning was its assumption that if the phrase "act or contract" were construed to mean a contractor could not recover compensation for any work done under a "contract" unless the contractor was duly licensed at all times during performance of that "contract," the disjunctive word "act" would be superfluous. This, the Court of Appeal insisted, would violate the maxim against statutory interpretations that render some words surplusage. (E.g., Myers v. Philip Morris Companies, Inc. (2002) 28 Cal.4th 828, 850, 123 Cal.Rptr.2d 40, 50 P.3d 751.)
However, the Court of Appeal's strained construction defies the only plausible reading of section 7031(a)'s plain language. At the outset, while the Court of Appeal's interpretation gives meaning to the word "act," it violates the very maxim it seeks to apply by making the word "contract" *765 surplusage. If a contractor, working to perform an agreement for services that require a license, may recover for any licensed "act" undertaken in the course of that performance, even if not duly licensed at other times during the work, there is no separate meaning to, or use for, the explicit statutory proviso that one may not maintain an action to recover compensation for the performance of any "contract where a license is required" unless he or she "was ... duly licensed ... at all times during the performance of that ... contract." (§ 7031(a), italics added.)[6]
On the other hand, Niederhauser argues that, contrary to the Court of Appeal's assumption, there is a sensible function for both "act" and "contract" as they appear in section 7031(a). In Niederhauser's view, "the disjunctive prohibition against compensation for an `act' exists to deny any sort of recovery on a theory other than breach of contract." (Italics added.) Thus, Niederhauser asserts, "its purpose is to broaden the bar of [s]ection 7031 beyond a `contract' to any [unlicensed] `act' with or without a contract." (Italics added.)
We agree. The CSLL does not require contractors to operate exclusively by formal contract; it simply seeks to deter them from offering or performing unlicensed services for pay. (See Hydrotech, supra, 52 Cal.3d 988, 995, 277 Cal.Rptr. 517, 803 P.2d 370.) As amended in 1989, section 7031(a) stresses that an unlicensed contractor may not sue for compensation "in law or equity." (Italics added.) This implies that licensed contractors have noncontractual remedies to recover for work not covered by a formal contract. Indeed, parties do sometimes operate without, or beyond the boundaries of, a formal contractual arrangement, under an implicit understanding that the contractor is working on a quantum meruit basis. (See, e.g., Amelco Electric v. City of Thousand Oaks (2002) 27 Cal.4th 228, 237, 115 Cal.Rptr.2d 900, 38 P.3d 1120; C. Norman Peterson Co. v. Container Corp. of America (1985) 172 Cal.App.3d 628, 640, 218 Cal.Rptr. 592; Daugherty Co. v. Kimberly-Clark Corp. (1971) 14 Cal.App.3d 151, 156, 158, 92 Cal.Rptr. 120.)
It therefore appears clear that the reference to unlicensed performance of both "acts" and "contracts" was intended to close a loophole, not to open one. Most reasonably read, this reference ensures that one may not avoid the all-or-nothing bar against recovery for unlicensed services simply because there is no formal contract. In other words, one may not recover compensation for work accomplished under a contract unless duly licensed for the work "at all times during the performance of that ... contract." (§ 7031(a), italics added), and, in any event, he or she may not recover compensation for any "act" requiring a license unless duly licensed "at all times during the performance of that act" (ibid., italics added).
We confirm this construction by examining section 7031(a) in its statutory context. Similar "at all times" and "act or contract" *766 language appears throughout the companion subdivisions of section 7031. (See id., subds. (b) [one may sue to recover "all" compensation paid to unlicensed contractor "for performance of any act or contract"], (c) [security interest taken to secure payment for performance of any "act or contract" requiring a contractor's license is unenforceable unless contractor was duly licensed "at all times during the performance of the act or contract"], (d) [if due licensure is controverted, suing contractor must produce certificate proving such licensure was in place "at all times during the performance of any act or contract covered by the action"], and (e) [substantial compliance applies only where contractor "had been duly licensed ... prior to the performance of the act or contract," acted reasonably and in good faith to maintain licensure, neither knew nor should have known he or she was unlicensed "when performance of the act or contract commenced," and "acted promptly and in good faith to reinstate his or her license upon learning it was invalid"].) Together these provisions make clear the general rule denying recovery of all compensation for work requiring a contractor's license if a valid license was not in place when performance began, or if licensure lapsed at any time during the work.
Our interpretation also conforms to the Legislature's express understanding when it amended section 7031 in 1989. The 1989 amendments, contained in Assembly Bill No. 841 (1989-1990 Reg. Sess.) (Assembly Bill No. 841), modified section 7031(a) to specify that an unlicensed contractor could not recover compensation "in law or equity," "regardless of the merits of the cause of action," and also added subdivision (d) (now subdivision (e)) to section 7031, abrogating the prior judicially developed doctrine of substantial compliance. (Stats.1989, ch. 368, § 1, p. 1509; see discussion, post.) Legislative reports and analyses for Assembly Bill No. 841 uniformly described existing law as "prevent[ing] a person from pursuing legal action for payment for work requiring a contractor's license if the person was not duly licensed ... at all times during the project."[7] (Assem. Com. on Gov. Efficiency and Consumer Protection, Rep. on Assem. Bill No. 841, as amended Apr. 4, 1989, p. 1; Assem. Com. on Gov. Efficiency and Consumer Protection, 3d reading analysis of Assem. Bill No. 841, as amended Apr. 4, 1989, p. 1; Dept. of Consumer Affairs, analysis of Assem. Bill No. 841, as amended Apr. 4, 1989, p. 1; Cal. Dept. of Consumer Affairs, Enrolled Bill Rep. on Assem. Bill No. 841 (Aug. 31, 1989) p. 1.)[8]
*767 MW urges that section 7031(a)'s disjunctive phrase "act or contract" cannot have meant to bar quantum meruit recovery for individual licensed acts as punishment for a lapse of licensure during other stages of contractual performance, because use of that phrase in the original CSLL far predated the 1989 Legislature's express decision to preclude such relief. We fail to see the point of this argument. The Legislature intended its 1989 amendments to narrow a "loophole" created by the courts' use of the substantial compliance doctrine to avoid "apply[ing] the licensing law strictly." (Assem. Com. on Gov. Efficiency and Consumer Protection, Rep. on Assem. Bill No. 841, as amended Apr. 4, 1989, p. 2; Assem. Com. on Gov. Efficiency and Consumer Protection, 3d reading analysis of Assem. Bill No. 841, as amended Apr. 4, 1989, p. 2.) If anything, the Legislature's 1989 action confirms, rather than undermines, the view that the phrase "act or contract" has never allowed contractors to distinguish, for purposes or recovery, among individual licensed and unlicensed "act[s]" in furtherance of a larger contract.
Several amici curiae[9] foresee dire consequences unless we affirm the Court of Appeal's construction of section 7031(a). These amici curiae predict that contractors who suffer momentary gaps in licensure while performing agreements for licensed services may abandon the work, even though they are by then fully licensed, because they will realize that they have already forfeited all right to sue for compensation for both past and future labor and materials expended on the projects. (Cf., Slatkin, supra, 102 Cal.App.4th 963, 969-971, 126 Cal.Rptr.2d 54.)
However, as indicated above, it has been understood for decades that section 7031 precludes court recovery for any work performed under an agreement for construction services unless the contractor was duly licensed (or met the applicable standards for substantial compliance with licensure requirements) with respect to all the work performed thereunder. Even so, we are not aware that significant problems of the kind described by amici curiae have surfaced. The statute's purpose, to encourage careful adherence to the licensing laws, and to deter persons from offering or providing unlicensed contractor services for pay, has apparently been served.[10]
*768 But even if such problems had arisen, we could not depart from section 7031(a)'s clearly expressed purpose to bar recovery for any work performed under a construction services agreement unless the provider was duly licensed "at all times during the performance of that ... contract." Here, MW had no valid California contractor's license when it began work under the structural contract. Hence, unless MW can establish substantial compliance with applicable license requirements, it cannot recover, in its suit against Niederhauser, any compensation for its work under that contract. We turn to a consideration of the substantial compliance issue.

3. Substantial compliance with C-51 license requirement.
Because the Court of Appeal concluded that section 7031(a) allowed MW to recover compensation for the great majority of its "act[s]" under the structural contract, insofar as a valid C-51 license was in place when MW performed those "act[s]," the court did not address MW's theory that it could recover in any event because it was, at all times during its work on the project, in substantial compliance with the C-51 licensing requirement. We now conclude that MW cannot establish substantial compliance.
MW entered the structural contract in 1999 and performed its work under that contract in 1999 and 2000. At those times, section 7031, former subdivision (d) provided that the doctrine of substantial compliance could apply only when, among other things, the contractor, despite a later lapse in licensure, "had been duly licensed as a contractor in this state prior to the performance of the act or contract" for which compensation is sought. (Stats.1994, ch. 550, § 1, p. 2803, italics added.)[11]
Thus, in order to invoke former subdivision (d)'s substantial compliance exception, a contractor who was technically unlicensed at any time during performance was required to establish that he or she had been duly licensed at some time before performance began. The obvious purpose of the subdivision was to limit application of the substantial compliance doctrine to those contractors who, at some time before beginning performance, had held valid California contractor's licenses.
MW concedes it had never held a valid California contractor's license until, after commencing performance of the structural steel contract, it received its C-51 license. Hence, MW is ineligible, under section 7031, former subdivision (d), to invoke the doctrine of substantial compliance.
*769 MW suggests it does qualify to demonstrate its substantial compliance during the entire period of performance because it was duly licensed before it completed performance. But again, such an assertion contravenes the plain statutory language. By specifying that the substantial compliance doctrine applies only to those who "had been" duly licensed in this state "prior to the performance of the act or contract" (§ 7031, former subd. (d), italics added), the statute clearly contemplates that, in order to qualify for this exception, the contractor must have been duly licensed in California at some time before the performance began.
The trial court rejected MW's substantial compliance theory on just this ground. MW argues that, to do so, the trial court improperly "rewrote" section 7031, former subdivision (d) to add the words "the commencement of" between "prior to" and "the performance." Not so. The existing statutory language specifies that due licensure must have existed at some time "prior to" performance. That language cannot be squared with the notion that the contractor could first become licensed at some time during performance. The words that MW suggests the trial court added would be superfluous.
MW focuses on the first sentence in former subdivision (d) of section 7031, which provided that "[t]he judicial doctrine of substantial compliance shall not apply ... where the person who [acted as a contractor] has never been a duly licensed contractor in this state." (Italics added.) MW insists this means that if a contractor was duly licensed in California at "some point," he or she was eligible to establish substantial compliance with licensure requirements during performance of the work for which compensation is sought. Any other construction, MW insists, would render meaningless the word "never."
The argument lacks merit. MW's theory omits the proviso that, as one prong of substantial compliance, the contractor must show he or she had been duly licensed at some time "prior to the performance of the act or contract." (§ 7031, former subd. (d), italics added.)
The structure of section 7031, former subdivision (d) also belies MW's interpretation. After stating that one could not qualify for substantial compliance if he or she had "never" been licensed here, the subdivision continued: "However, the court may [find] substantial compliance ... if it is shown ... that the [contractor] (1) had been duly licensed ... prior to the performance of the act or contract...." (Ibid., italics added.) Thus, the subdivision conveyed that a contractor who had "never" been licensed in this state was one who "had [not] been duly licensed ... prior to ... performance." (Ibid.)
Though MW argues otherwise, the legislative history of section 7031, former subdivision (d) confirms this construction. As added in 1989, former subdivision (d) flatly stated that "[t]he judicial doctrine of substantial compliance shall not apply to this section." (Stats.1989, ch. 368, § 1, p. 1509.) In 1991, this absolute bar was softened by addition of language stating that a court could find substantial compliance under certain circumstances. These included that the person seeking compensation "was a duly licensed contractor during any portion of the 90 days immediately preceding the performance of the act or contract for which compensation is sought." (Stats. 1991, ch. 632, § 1, p. 2937, italics added.)
In 1994, the Legislature rewrote the subdivision to the form it retained in 1999 and 2000. The requirement that the contractor must have had a license validly in effect at some time within 90 days before performance was dropped in favor of language requiring simply that the contractor *770 must have been duly licensed "prior to [such] performance." (Stats.1994, ch. 550, § 1, p. 2803, italics added.) Though the 1994 amendment thus expanded the time during which the necessary previous licensure could have been in place, it retained the concept that this period must have preceded the performance for which compensation was sought.[12]
Finally, the Legislature has recently indicated it intends the substantial compliance doctrine, now set forth in subdivision (e) of section 7031, to apply in exactly this way.[13] In 2003, the Legislature amended subdivision (e) to provide that one may establish substantial compliance, despite being unlicensed at some time during performance, if he or she (1) "had been duly licensed ... prior to ... performance ..., (2) acted reasonably and in good faith to maintain proper licensure, (3) did not know or reasonably should not have known that he or she was not duly licensed when performance of the act or contract commenced, and (4) acted promptly and in good faith to reinstate his or her license upon learning it was invalid." (Stats. 2003, ch. 289, § 1, italics added.)
Thus, as currently worded, the statute explicitly contemplates a situation in which (1) the contractor had been licensed "prior to" performance, (2) the previously valid license had expired, or was suspended, at the time "performance of the act or contract commenced" and (3) the contractor, upon learning of the lapse, acted diligently to "reinstate" the license (§ 7031, subd. (e), italics added). In an uncodified section of the 2003 amendments, the Legislature "[found] and declare[d] that the changes made by this act do not constitute a change in, but are declaratory of, existing law." (Stats.2003, ch. 289, § 2.)
"`[A] subsequent expression of the Legislature as to the intent of [a] prior statute, although not binding on the court, may properly be used in determining the effect of [the] prior act.' [Citation.]" (Western Security Bank v. Superior Court (1997) 15 Cal.4th 232, 244, 62 Cal.Rptr.2d 243, 933 P.2d 507.) Here, for reasons we have explained, the 2003 amendment seems entirely consistent with the prior statutory expression of the substantial compliance doctrine. No reason appears to reject the Legislature's assurance that the amendment merely clarified, and did not change, existing law. Hence, we conclude, it governs this case. (Id., at p. 252, 62 Cal.Rptr.2d 243, 933 P.2d 507.)
Because MW was not duly licensed "at all times" during performance of the structural *771 contract (§ 7031(a)), and cannot alternatively establish its substantial compliance with the licensure requirements in that it had never held a valid California contractor's license "prior to" beginning performance (§ 7031, former subd. (d); see now id., subd. (e)), MW cannot sue to recover any compensation for work performed under that contract. Insofar as related to this portion of MW's complaint, the summary judgment entered by the trial court was proper.

4. Validity of agreement executed by unlicensed contractor.
Niederhauser concedes MW held a valid C-51 structural steel contractor's license at all times during MW's performance of the ornamental contract. However, Niederhauser notes that MW had no valid California contractor's license when it executed the ornamental contract.[14] Niederhauser urges that an agreement for work requiring a contractor's license is illegal, void, and unenforceable from the outset if the contractor was unlicensed at the time the agreement was entered. However, we agree with MW and the Court of Appeal that one may recover compensation under a contract for work requiring a license if he or she satisfied licensure requirements at all times while performing the contract, even if he or she was not licensed when the agreement was signed.
At the outset, we take note that allowing suit and recovery under such circumstances violates no express term of section 7031(a). That statute prohibits a contractor from suing "for the collection of compensation for the performance of any act or contract where a license is required ... without alleging that he or she was a duly licensed contractor at all times during the performance of that act or contract." (Ibid., italics added.) The "act" of executing an agreement is not one for which a contractor seeks compensation; rather, he or she pursues payment for carrying out the contract in a satisfactory manner. (See Vitek, Inc. v. Alvarado Ice Palace, Inc. (1973) 34 Cal.App.3d 586, 590, 110 Cal.Rptr. 86 (Vitek).) Hence, we conclude, the due licensure of which section 7031(a) speaks is due licensure while the contract itself is being performed.
Niederhauser points out that, wholly apart from section 7031, the CSLL makes it a misdemeanor "for any person to engage in the business or act in the capacity of a contractor within this state without having a license therefor...." (§ 7028, subd. (a), italics added.) The CSLL defines a "contractor" as one who, among other things, "undertakes to or offers to undertake to, or ... submits a bid to" engage in specified building and construction services. (§ 7026.) MW so acted in contravention of the CSLL, Niederhauser urges, when, lacking a license, it agreed to perform the services contemplated by the ornamental contract. The contract itself, Niederhauser posits, is therefore unlawful.
Generally a contract made in violation of a regulatory statute is void. Under this general rule, where a law requires, for regulatory rather than revenue purposes, that one procure a license before offering or performing certain services and provides a penalty for violation, the contract of an unlicensed person to perform such services will not be *772 upheld. (E.g., Asdourian v. Araj (1985) 38 Cal.3d 276, 291, 211 Cal.Rptr. 703, 696 P.2d 95 (Asdourian); see 1 Witkin, Summary of Cal. Law (9th ed. 1987) Contracts, § 491, p. 436.) "This rule is based on the rationale that `the public importance of discouraging such prohibited transactions outweighs equitable considerations of possible injustice between the parties.' [Citation.]" (Asdourian, supra, at p. 291, 211 Cal.Rptr. 703, 696 P.2d 95.)
The CSLL is a regulatory statute. It seeks to "protect the public from incompetence and dishonesty in those who provide building and construction services" and to "provide minimal assurance that all persons offering such services ... have the requisite skill and character, understand applicable local laws and codes, and know the rudiments of administering a contracting business. [Citations.]" (Hydrotech, supra, 52 Cal.3d 988, 995, 277 Cal.Rptr. 517, 803 P.2d 370.)
Accordingly, any number of cases, including decisions of this court, have stated that the courts will not enforce an agreement for contractor services executed by a person who was not duly licensed to perform them. (E.g., Lewis & Queen, supra, 48 Cal.2d 141, 150-151, 308 P.2d 713; Loving & Evans v. Blick, supra, 33 Cal.2d 603, 607-608, 204 P.2d 23; Gatti v. Highland Park Builders, Inc. (1946) 27 Cal.2d 687, 689, 166 P.2d 265; Holm, supra, 20 Cal.App.2d 332, 334-337, 67 P.2d 114; see General Ins. Co. v. Superior Court (1972) 26 Cal.App.3d 176, 182, 102 Cal.Rptr. 541.) However, Niederhauser has cited no modern case under the CSLL, and we have found none, which applied this principle to deny recovery where a contractor, though not licensed at the time he or she executed the agreement, was fully licensed at all times during its performance.[15]
Moreover, the rule expressed by these decisions is not absolute, and many exceptions have arisen. (Asdourian, supra, 38 Cal.3d 276, 291, 211 Cal.Rptr. 703, 696 P.2d 95.) One of these was stated in Lewis & Queen, supra, 48 Cal.2d 141, 308 P.2d 713: "In some cases ... the statute making the conduct illegal, in providing for a fine or administrative discipline, excludes by implication the additional penalty involved in holding the illegal contract unenforceable." (Id., at p. 151, 308 P.2d 713, italics added.)
In Vitek, supra, 34 Cal.App.3d 586, 110 Cal.Rptr. 86, the court, after examining specific provisions of the CSLL, applied this principle to conclude that one fully licensed during performance of a contract may recover even if unlicensed when the contract was entered. Plaintiff Vitek's contractor's license had expired and was not in effect on the Friday the construction contract was signed. The license was renewed the following Monday, the day the defendant made its first payment under the contract and Vitek began work. The license remained in effect until construction was complete. The trial court later awarded Vitek judgment for amounts due under the agreement. The defendants appealed, urging that recovery was barred because Vitek had not been duly licensed at all necessary times.
The Court of Appeal affirmed. The court first construed section 7031 as barring recovery only if the contractor was not duly licensed at all times during performance of a contract. Because Vitek's *773 license had been continuously in effect during the entire period of construction, the court reasoned, section 7031 had been satisfied. (Vitek, supra, 34 Cal.App.3d 586, 590, 110 Cal.Rptr. 86.)
The court then considered whether, "wholly apart from section 7031" (Vitek, supra, 34 Cal.App.3d 586, 590, 110 Cal.Rptr. 86), the contract was illegal and void, and therefore unenforceable, because Vitek had no valid license when it was executed, contrary to the CSLL's proscription against acting as a contractor while unlicensed. Acknowledging the general rule that contracts in violation of regulatory statutes are void, the court nonetheless reasoned that the individual statute, its provisions, and its purposes, must be examined to determine whether its deterrent purposes require the voiding of otherwise fair and moral agreements. (Id., at pp. 592-593, 110 Cal.Rptr. 86.)
In this regard, the Vitek court observed that "[t]he penalty provisions provided by the Legislature call for imposition of punishment for a misdemeanor where the party acts in the capacity of a contractor (§ 7028) and deny the party the right to bring or maintain [an] action [for compensation] based on performance (§ 7031). Normally, a court will not impose additional penalties for [noncompliance] with the licensing requirement. [Citations.]" (Vitek, supra, 34 Cal.App.3d 586, 592, 110 Cal.Rptr. 86, italics added.) The court reasoned that where, as here, the contract's object is not inherently wrongful or contrary to sound public policy, it will be deemed void "only if it falls within the area which the Legislature intended as part of deterrence necessary to protect the public interest." (Id., at p. 593, 110 Cal.Rptr. 86, fn. omitted.)
The court conceded that the CSLL's purpose is "to protect the administration of the licensing law as well as to protect the public from incompetent and untrustworthy artisans. [Citation.]" (Vitek, supra, 34 Cal.App.3d 586, 594, 110 Cal.Rptr. 86.) However, the court concluded, the Legislature had addressed the former concern solely by imposing misdemeanor sanctions for unlicensed acts other than the performance of unlicensed work, and had reserved the bar against civil suit for cases where the contractor was unlicensed during such performance. Under these circumstances, the court held, the civil bar should not be expanded beyond its explicit legislative bounds. (Ibid.)
Gaines v. Eastern Pacific (1982) 136 Cal.App.3d 679, 186 Cal.Rptr. 421 (Gaines), reached a similar result. Eastern Pacific, acting as a general contractor, subcontracted concrete work for an apartment complex to Gaines. Gaines began work the next day, but Eastern Pacific did not receive its contractor's license until approximately a month later. Gaines later sued Eastern Pacific for breach of contract. Eastern Pacific cross-complained for damages arising from Gaines's alleged improper performance of its assigned work. Gaines appealed the cross-judgment in Eastern Pacific's favor, asserting Eastern Pacific's lack of licensure when the subcontract was executed. The Court of Appeal held, among other things, that Eastern Pacific's nonlicensure during the agreement's first month did not void the contract, thus precluding Eastern Pacific's recovery, because Eastern Pacific had not been called upon to perform services under the agreement, related to its counterclaim for damages, until well after its license was in place. As had Vitek, supra, 34 Cal.App.3d 586, 110 Cal.Rptr. 86, the Gaines court stressed that section 7031, by its terms, imposes a civil bar only against contractors who were not licensed at all times during their performance. (Gaines, supra, at p. 682, 186 Cal.Rptr. 421.)
*774 In Asdourian, supra, 38 Cal.3d 276, 211 Cal.Rptr. 703, 696 P.2d 95, this court cited Vitek, supra, 34 Cal.App.3d 586, 110 Cal.Rptr. 86, in two respects pertinent to our analysis here. Plaintiff Asdourian performed three remodeling projects for defendant Araj, a real estate investor. These included work on converting a garage to a restaurant, and renovation jobs on a four-flat apartment building and a single-family home. Asdourian had personally qualified for a contractor's license, and a license had been issued to Artko Remodeling and Construction (Artko), his sole proprietorship, with Asdourian listed on the certificate as the responsible managing party. However, Asdourian technically violated the CSLL by accepting and performing the three projects in his own name, not Artko's. Moreover, in violation of statutes regulating the sale and provision of home improvements (§ 7150 et seq.), no written contracts covered the residential work.
Asdourian won judgment for amounts due and unpaid on the three projects. Araj appealed, asserting that Asdourian's recovery was barred by his nonlicensure, and that any agreements for improvement of the residential properties were void, and thus unenforceable, because they were not in writing. We affirmed.
Addressing the home improvement violation, the majority acknowledged the general rule that contracts in violation of regulatory statutes are invalid. However, the majority invoked Vitek, supra, 34 Cal.App.3d 586, 110 Cal.Rptr. 86, for the premise that "the rule will not be applied where the penalties imposed by the Legislature exclude by implication the additional penalty of holding the contract void." (Asdourian, supra, 38 Cal.3d 276, 291, 211 Cal.Rptr. 703, 696 P.2d 95.)
As the Asdourian majority noted, the statutes in question made violation of the writing requirement a misdemeanor, but they nowhere expressly declared that a noncomplying contract was void. Though the Legislature had amended the original statutes to remove a provision explicitly stating that home improvement contracts were not void solely for failure to put them in writing, the majority concluded the Legislature had not thereby expressed an intent to invalidate all noncomplying contracts. The agreements in question, the majority noted, were not "`intrinsically illegal'" (i.e., wrongful in their object) (Asdourian, supra, 38 Cal.3d 276, 293, 211 Cal.Rptr. 703, 696 P.2d 95, quoting Vitek, supra, 34 Cal.App.3d 586, 593, 110 Cal.Rptr. 86); thus, they were not automatically void, but merely voidable "depending on the factual context and the public policies involved." (Ibid.) The majority observed that the requirement of written home improvement contracts was intended to protect unsophisticated homeowners, but defendant Araj was not unsophisticated, Asdourian performed the improvement projects fully and honestly, and denying him recovery under such circumstances would unjustly enrich Araj. (Id., at pp. 293-294, 696 P.2d 95.)
As to the licensing violation, the majority concluded that Asdourian had substantially complied with licensure requirements, because his personal qualifications were the basis of Artko's license, which was in effect at all times during the relationship between the parties. Under those circumstances, the majority reasoned, a license issued in Asdourian's own name would not have provided Araj with any greater assurance that he was dealing with an experienced, competent, and qualified contractor. (Asdourian, supra, 38 Cal.3d 276, 286, 211 Cal.Rptr. 703, 696 P.2d 95.)[16]
*775 Noting that Asdourian used his own name when entering the transactions, in technical violation of section 7028.5 (no member of a licensed contacting business shall act individually as a contractor without having a valid license), the majority concluded that this "did not prevent [Araj] from receiving the full and effective protection of the statute." (Asdourian, supra, 38 Cal.3d 276, 285, 211 Cal.Rptr. 703, 696 P.2d 95, fn. omitted.) Moreover, the majority observed, "[a]t least two courts ... have held that section 7031 does not require a license at the time of execution of a contract. (Gaines, supra, 136 Cal.App.3d 679, 186 Cal.Rptr. 421; Vitek, supra, 34 Cal.App.3d 586, 110 Cal.Rptr. 86; see also, General Ins. Co. v. Superior Court, supra, 26 Cal.App.3d 176, 102 Cal.Rptr. 541.) These courts have noted the statute requires the contractor to prove only that he was duly licensed at all time `during the performance of [the] act or contract.' (Vitek, supra, 34 Cal.App.3d at p. 590, 110 Cal.Rptr. 86, italics in original.)" (Id., at p. 285, fn. 7, 696 P.2d 95.)[17]
We now confirm that the CSLL does not automatically void all contracts entered by unlicensed contractors. As indicated in Vitek, supra, 34 Cal.App.3d 586, 110 Cal.Rptr. 86, the statute expresses no such legislative intent. The CSLL imposes misdemeanor punishment (§§ 7028, 7028.2) and authorizes both injunctive relief (§§ 7028.3, 7028.4) and civil citations and penalties (§§ 7028.6-7028.14) against persons who act as unlicensed contractors. It also expressly bars suits to collect compensation for unlicensed work (§ 7031(a)), but does not extend the bar to persons who, though they performed while licensed, were unlicensed when they agreed to perform the work. This detailed and comprehensive enforcement scheme thus excludes by implication such an additional penalty.
Indeed, the Legislature has demonstrated, elsewhere in the CSLL, that it knows how to invalidate the agreements of unlicensed contractors when it wishes to do so. Section 7028.15, subdivision (e), as amended in 1990 (Stats.1990, ch. 321, § 1, p. 1605), expressly provides that "[a]ny contract awarded [by a public agency] ... to[] a contractor who is not licensed pursuant to this chapter is void." (Italics added.) As noted, no CSLL provision similarly treats an unlicensed contractor's agreement with a private person or entity.[18]
*776 An agreement for contractor services has no wrongful object whose enforcement is forbidden by fundamental public policy (see Civ.Code, §§ 1595, 1596, 1598), merely because the contractor was unlicensed at the moment he or she executed it. Insofar as unlicensed execution of such a contract violates the CSLL's regulatory provisions, the statute provides specified civil and criminal sanctions for such conduct. (See text discussion, ante.) On the other hand, while the CSLL denies use of the courts to recover compensation for the unlicensed performance of contracting work, the statute nowhere extends that disability to a contractor's unlicensed agreement with a private entity. As Asdourian, supra, 38 Cal.3d 276, 211 Cal.Rptr. 703, 696 P.2d 95, and Vitek, supra, 34 Cal.App.3d 586, 110 Cal.Rptr. 86, make clear, courts will not, under such circumstances, extend the harsh sanction of forfeiture beyond the bounds set by the Legislature absent a showing that such a result is essential to effectuate the statute's protective purposes.
We see no such necessity here. As indicated, the CSLL expressly provides multiple means of enforcing the general ban on acting as an unlicensed contractor, insofar as that prohibition includes the mere execution of contracting agreements while unlicensed. Though the Legislature barred recovery of compensation by unlicensed contractors under certain circumstances, it did not impose this bar against contractors who, though licensed at all times during performance of contracting work, had executed agreements for the work while unlicensed. No compelling reason exists to conclude that the public protective purposes of the CSLL can only be served by deeming such contracts illegal, void, and unenforceable on that basis alone.
Courts have reached similar conclusions under analogous provisions of the real estate broker licensing statutes. Where such statutes imposed criminal and civil penalties for nonlicensure, and also barred suits for compensation for the performance of acts requiring a license unless the broker was licensed "at the time the alleged cause of action arose," the decisions have consistently held that a broker who was unlicensed when he or she agreed to provide real estate services may nonetheless recover compensation if duly licensed at the time a buyer was procured. (Fewel & Dawes, Inc. v. Pratt (1941) 17 Cal.2d 85, 90, 109 P.2d 650 [agreeing that broker may recover if licensed at time contract is performed]; McNichols v. Nelson Valley Bldg. Co. (1953) 116 Cal.App.2d 266, 271, 253 P.2d 744; Brenneman v. Lane (1927) 87 Cal.App. 414, 417, 262 P. 400; Radich v. Cernokus (1924) 65 Cal.App. 452, 454, 224 P. 124; Houston v. Williams (1921) 53 Cal.App. 267, 270-272, 200 P. 55 [where compensation statute required licensure only when cause of action arose, "[b]y implication any earlier period was excluded"]; see Estate of Lopez (1992) 8 Cal.App.4th 317, 324, 10 Cal.Rptr.2d 67 [where, under Probate Code, liability of decedent's estate for real estate broker's commission attached when sale was "consummated," broker's cause of action against estate "arose" at that time; hence, despite prior lapses in licensure, broker could sue for commission if then licensed].)
It is true that where contractors' licenses had lapsed during performance, pre-1989 decisions under the CSLL, applying the judicial doctrine of substantial *777 compliance, stressed that due licensure at the time of contracting was an important factor in assuring the statute's protective purposes had been served. Thus, Latipac, supra, 64 Cal.2d 278, 49 Cal.Rptr. 676, 411 P.2d 564, explained that licensure at the time of contracting "was crucial to the decisions of the other contracting party and to the prospective subcontractors and other creditors who might extend credit in reliance upon the validity of that contract. The key moment ... when the existence of the license becomes determinative is ... when the other party to the agreement must decide whether the contractor possesses the requisite responsibility and competence and whether [such other party] should, in the first instance, enter into the relationship. The license, as an official confirmation of the contractor's responsibility and experience, then plays its important role. Then, too, it serves as a basic determinant in the decision of prospective subcontractors and other creditors as to whether to extend credit to the contractor on the strength of the contract." (Id., at p. 282, 49 Cal.Rptr. 676, 411 P.2d 564; see also, e.g., Steinwinter v. Maxwell (1960) 183 Cal.App.2d 34, 37-38, 6 Cal.Rptr. 496 [rejecting substantial compliance where contractor whose license lapsed during performance was not licensed at the time the contract was executed].)
For several reasons, however, we do not find this analysis dispositive here. First, while the pre-1989 decisions suggested that nonlicensure at the time of contracting was an influential factor in assessing substantial compliance, none deemed it crucial. Asdourian, supra, 38 Cal.3d 276, 211 Cal.Rptr. 703, 696 P.2d 95, confirmed that Latipac, supra, 64 Cal.2d 278, 49 Cal.Rptr. 676, 411 P.2d 564, had declined to decide if any of the "substantial compliance" factors discussed therein, singly or in combination, were necessary or sufficient. (Asdourian, supra, at p. 284, 211 Cal.Rptr. 703, 696 P.2d 95.) Asdourian then proceeded to find substantial compliance although the contractor in that case, who had agreed in his own name to perform the work for which he sought compensation, had no personal license then, or at any time during performance. (Id., at pp. 284-286, 289, 211 Cal.Rptr. 703, 696 P.2d 95.)[19]
Moreover, even if due licensure at the time of contracting favors the conclusion that the other party received the statute's full protection despite a later lapse in licensure, this does not mean nonlicensure at the time of contracting negates such protection where all performance was licensed. After all, as Latipac, supra, 64 Cal.2d 278, 49 Cal.Rptr. 676, 411 P.2d 564, suggested, one contemplating professional dealings with a contractorwhether as a client, surety, general contractor or subcontractor  presumably will consider it important to determine at the outset whether the contractor is then duly licensed. If no valid license is then in place, such a party may simply decline to enter the relationship.[20]
*778 Post-1989 statutory revisions to the substantial compliance doctrine suggest the Legislature itself does not consider due licensure at the precise moment of contracting to be crucial to the CSLL's protections. As discussed above, section 7031 allows a contractor who suffers a license lapse during performance to establish substantial compliance, under specified circumstances, if he or she held a valid California contractor's license at some time "prior to the performance of the act or contract" for which compensation is sought. (Id., subd. (e), italics added; see also id., former subd. (d).) This broad language may include a person whose previously valid license had lapsed at the time the agreement was entered, or one who did not first obtain a valid license until after the contract was signed.
Niederhauser urges that upholding MW's right to recover on the ornamental steel contract, though MW had no license when that agreement was executed, would violate principles emphasized in Hydrotech, supra, 52 Cal.3d 988, 277 Cal.Rptr. 517, 803 P.2d 370. We disagree. In that case, Hydrotech, a New York manufacturer of wave-simulation machinery, agreed with defendant Wessman, the general contractor for a California water park, to design and build a "surfing pool" at the park using Hydrotech equipment. According to Hydrotech, it expressed concern about California license requirements, but Wessman and the water park's owner persuaded Hydrotech to proceed, promising both to arrange for help from a licensed California contractor and, in any event, to pay for the equipment and services provided by Hydrotech. Hydrotech performed the agreed work without securing the necessary California license.
When a payment dispute arose, Hydrotech sued. The defendants asserted Hydrotech's nonlicensure as a bar. Hydrotech urged that the CSLL does not require a license for "`isolated'" or "`exceptional'" California transactions. (Hydrotech, supra, 52 Cal.3d 988, 992, 277 Cal.Rptr. 517, 803 P.2d 370.) Alternatively, Hydrotech claimed that, even if section 7031 eliminates contractual or quasi-contractual claims seeking compensation for unlicensed work, the statute did not bar a fraud claim based on the defendants' false promise to pay despite their understanding that Hydrotech would do the work without a license.
We rejected both arguments. Confronting the fraud issue, we reasoned that "[r]egardless of the equities, section 7031 bars all actions, however they are characterized, which effectively seek `compensation' for illegal unlicensed contract work. [Citation.]" (Hydrotech, supra, 52 Cal.3d 988, 997, 277 Cal.Rptr. 517, 803 P.2d 370, italics added.) Hence, we concluded, Hydrotech could not circumvent the statute "by alleging that when the illegal contract was made, the other party had no intention of performing. Section 7031 places the risk of such bad faith squarely on the unlicensed contractor's shoulders. `Knowing that they will receive no help from the courts and must trust completely to each other's good faith, the parties are less likely to enter an illegal arrangement in the first place. [Citations.]'" (Id., at p. 998, 277 Cal.Rptr. 517, 803 P.2d 370, quoting Lewis & Queen, supra, 48 Cal.2d 141, 150, 308 P.2d 713, second italics added by Hydrotech.)
Addressing the Court of Appeal's concern that denial of fraud claims would encourage general contractors to seek out and cheat unlicensed subcontractors, Hydrotech *779 further observed that "the statutory disallowance of claims for payment by unlicensed subcontractors is intended to deter such persons from offering their services, or accepting solicitations of their work. That policy applies regardless of whether the other party's promise to pay for the work was honest or deceitful." (Hydrotech, supra, 52 Cal.3d 988, 998, 277 Cal.Rptr. 517, 803 P.2d 370.)
As Hydrotech suggested, an offer, or acceptance of a solicitation, to perform unlicensed contract work is illegal. If the work offered or solicited is performed without a license, the contractor must rely solely on the other party's good faith for payment, and a claim for compensation will be disallowed under section 7031, regardless of the balance of equities or the manner in which the claim is framed. Proper application of section 7031, and of the other sanctions provided by the CSLL, thus rightly discourages contractors from entering arrangements for unlicensed work. But Hydrotech did not consider whether an agreement for contractor services is void and unenforceable solely because the contractor, though fully licensed at all times during performance, was not licensed when the agreement was executed. Nothing in Hydrotech stands for the proposition that the contractor is barred from recovery in such a case.
Niederhauser notes that courts have concluded, under various other licensing laws, that contracts for performance of services requiring a license were illegal and void if executed by unlicensed persons. (E.g., Styne v. Stevens (2001) 26 Cal.4th 42, 51, 109 Cal.Rptr.2d 14, 26 P.3d 343 [Talent Agency Act]; Payne v. De Vaughn (1926) 77 Cal.App. 399, 404, 246 P. 1069 [architect]; see generally 1 Witkin, Summary of Cal. Law, supra, Contracts, §§ 491-493, pp. 436-439.) Of course, we express no views on statutory schemes not at issue here. But we know of no modern decision that barred a suit to recover compensation by one who, though unlicensed when a contract for services was entered, was fully licensed at all times during performance, under a statute which expressly barred recovery only for nonlicensure at the latter time. For reasons we have expressed, we are satisfied that application of the void contract principle is inappropriate in such cases under the CSLL.
Accordingly, we conclude that MW is not barred from recovering compensation for its work under the ornamental contract on the sole ground that it was unlicensed when it executed that agreement.

CONCLUSION
The Court of Appeal's judgment is reversed insofar as it permits MW to sue for compensation for work under the structural contract. In all other respects, the judgment of the Court of Appeal, reversing the trial court's grant of summary judgment for Niederhauser, is affirmed.
WE CONCUR: GEORGE, C.J., KENNARD, WERDEGAR, CHIN, and MORENO, JJ.
NOTES
[1]  All further unlabeled statutory references are to the Business & Professions Code.
[2]  Niederhauser and its bonding companies, Fidelity and Guaranty Insurance Company and United States Fidelity and Guaranty Company, were joint respondents on appeal and continue to submit joint briefing in this court. We hereafter refer to these defendants collectively as Niederhauser.
[3]  The superior court noted in its order that all of MW's evidentiary objections were overruled, but the court did not otherwise mention or discuss the issue of judicial estoppel.
[4]  Niederhauser did not reraise the C-23 license issue in its petition for review, and has given that issue no meaningful discussion in its opening and reply briefs. We therefore do not address it. (Cal. Rules of Court, rules 28.1(b)(1), 29(b)(1), 29.1(b)(2)(B), (3).)
[5]  As noted above, section 7031(a) requires any person suing to recover compensation for work requiring a contractor's license to "alleg[e] that he or she was a duly licensed contractor at all times during performance" of the work. (Italics added.) If the defendant then "controvert[s]" the plaintiff's licensure, the plaintiff must prove it by producing a "verified certificate." (§ 7031, subd. (d).) Thus, while the statutory scheme contemplates that nonlicensure must be raised as a defense, no statutory provision explicitly requires a duly licensed contractor who is suing for money attributable to the work of another entity to affirmatively allege that the other entity was duly licensed.
[6]  In attempting to explain this difficulty away, MW confirms it. As MW would have it, section 7031(a)'s disjunctive reference to "act or contract" simply means that if there was a lapse in licensure at any time during performance of a "contract," one cannot sue on the "entire contract," but may nonetheless invoke noncontractual remedies to recover the value of all "act[s]" performed on the project while he or she was duly licensed. Thus, the only penalty for a lapse of licensure during performance of a "contract" would be loss of compensation for particular unlicensed "act[s]." But the Legislature could have achieved that result by omitting all reference to "contract[s]" and simply barring suits to recover compensation for unlicensed "act[s]."
[7]  In Hydrotech, supra, 52 Cal.3d 988, 277 Cal.Rptr. 517, 803 P.2d 370, we stressed that the 1989 amendments "underscored [the Legislature's] insistence on a strict application of section 7031 despite the balance of equities." (Id., at p. 997, fn. 6, 277 Cal.Rptr. 517, 803 P.2d 370.)
[8]  A similar understanding appears in the legislative history of the most recent amendments to section 7031. By 2003, the flat no-substantial-compliance rule adopted in 1989 had been softened to allow contractors to establish substantial compliance in certain circumstances, and therefore to recover compensation, despite technical lapses in licensure. (See text discussion, post.) Meanwhile, in 2001, the Legislature, using the same "act or contract" terminology set forth in other subdivisions of section 7031, including subdivision (a), had added subdivision (b) to the statute, providing that one who employs an unlicensed contractor may sue to recover "all compensation paid to the unlicensed contractor for performance of any act or contract." (Stats.2001, ch. 226, § 1, italics added.) However, the 2001 amendment did not expressly provide contractors with a substantial compliance defense against such suits. In 2003, Assembly Member Horton introduced Assembly Bill No. 1386 (2003-2004 Reg. Sess.) (Assembly Bill No. 1386). The bill, which was ultimately adopted (Stats.2003, ch. 289, § 1), amended subdivision (b) of section 7031 to provide explicitly that contractors may defend disgorgement suits by asserting substantial compliance. Legislative analyses explained that the defense was deemed necessary because "[c]urrently, a lapse of license for even a single day could lead to the owner's recovery of 100 percent of the compensation paid to the contractor for work performed." (Sen. Rules Com., Off. of Sen. Floor Analyses, 3d reading analysis of Assem. Bill No. 1386, as amended July 23, 2003, p. 2, italics added; see also, e.g., Sen. Com. on Judiciary, Analysis of Assem. Bill No. 1386, as amended June 23, 2003, pp. 2-3.) It was also noted that the 2003 bill was "similar, but not identical, to [Assembly Bill No. 2693 (2001-2002 Reg. Sess.) (Assembly Bill No. 2693)], which was rejected by [the Senate Judiciary Committee in 2002]. Among other things, [Assembly Bill No.] 2693 sought to limit the consumer's recovery to the amount paid during the time the contractor was unlicensed.... When [that] bill was heard, Committee members expressed concern that the bill would go too far in benefiting unlicensed contractors...." (Sen. Com. on Judiciary, Analysis of Assem. Bill No. 1386, as amended June 23, 2003, p. 3, italics added.)
[9]  The District Council of Iron Workers of the State of California and Vicinity, the Western Steel Council, and the law firm of Abulaziz & Grossbart have submitted amicus curiae briefs in support of MW. The League of California Cities has submitted an amicus curiae brief on behalf of Niederhauser.
[10]  As we noted in Hydrotech, supra, 52 Cal.3d 988, 277 Cal.Rptr. 517, 803 P.2d 370, section 7031 "advances [its] purpose [of protecting the public from the incompetent or dishonest provision of building and construction services] by withholding judicial aid from those who seek compensation for unlicensed contract work." (Hydrotech, supra, at p. 995, 277 Cal.Rptr. 517, 803 P.2d 370, italics added.) But nothing in the statute precludes the satisfied beneficiary of such work from paying for it voluntarily. Business considerations may persuade the beneficiary to ignore license lapses it deems insignificant, and to continue compensating the contractor, in order to avoid disruption of progress on the project.
[11]  In 1999 and 2000, section 7031, former subdivision (d) provided in pertinent part: "The judicial doctrine of substantial compliance shall not apply under this section where the person who engaged in the business or acted in the capacity of a contractor has never been a duly licensed contractor in this state. However, the court may determine that there has been substantial compliance with licensure requirements under this section if it is shown at an evidentiary hearing that the person who engaged in the business or acted in the capacity of a contractor (1) had been duly licensed as a contractor in this state prior to the performance of the act or contract, (2) acted reasonably and in good faith to maintain proper licensure, and (3) did not know or reasonably should not have known that he or she was not duly licensed...." (Stats.1994, ch. 550, § 1, pp. 2803-2804.)
[12]  Reports and analyses of Senate Bill No. 1844 (1993-1994 Reg. Sess.) (Senate Bill No. 1844), which contained the 1994 amendments, illustrate the Legislature's understanding that the substantial compliance doctrine was intended to apply to contractors whose previously valid licenses had lapsed at the time of performance. Thus, referring to the proposed abandonment of the "90 days immediately preceding performance" rule in favor of a more flexible "prior to performance" standard, they commented that the proposed exceptions might unintentionally broaden the circumstances under which substantial compliance could be applied. Thus, they asserted, the proposed standards might, "for example, permit the court to set aside the fact that a contractor's license may have been expired for up to two years (contractors are licensed on a biannual basis)...." (Sen. Bus. & Prof. Com., Rep. on Sen. Bill No. 1844, as introduced Feb. 27, 1994, p. 4, italics added; Assem. Com. on Consumer Protection, Governmental Efficiency and Economic Development, Rep. on Sen. Bill No. 1844, as amended July 1, 1994, p. 2; Sen. Rules Com., Off. of Sen. Floor Analyses, Rep. on Sen. Bill No. 1844, as amended July 1, 1994, p. 4.)
[13]  In 2001, when the Legislature added current subdivision (b) to section 7031, former subdivision (d) was relettered, without substantive change, as subdivision (e). (Stats. 2001, ch. 226, § 1.)
[14]  As noted above, MW admits it did not actually possess a valid C-51 license until December 21, 1999, more than a month after it executed the ornamental contract. Moreover, for reasons explained in the previous part of this opinion, MW cannot establish that it was in substantial compliance with C-51 licensure requirements when it executed the ornamental agreement.
[15]  In Holm, supra, 20 Cal.App.2d 332, 67 P.2d 114, the court held that a licensed contractor could not recover, on a mechanic's lien, money voluntarily advanced to a subcontractor who was not licensed at the time the subcontract was entered, even though the subcontractor was perhaps duly licensed at all times during performance of the subcontract. We discuss Holm in greater detail below.
[16]  In this regard, Asdourian, a 1985 decision, applied the judicial doctrine of substantial compliance, which was abrogated by the Legislature in 1989.
[17]  As indicated above, an early case, Holm, supra, 20 Cal.App.2d 332, 67 P.2d 114, held that because a subcontractor was unlicensed when the subcontract was executed, though perhaps fully licensed during performance, the subcontract was illegal, void, and unenforceable; hence, the general contractor could not recover, under a mechanic's lien, compensation attributable to the subcontractor's work. Significant in Holm's reasoning (see id., at p. 336, 67 P.2d 114) was the wording of the predecessor statute to section 7031, as then in effect. Unlike modern section 7031, this statute did not condition the right to sue for compensation upon licensure during performance; it more vaguely applied the civil bar based on lack of licensure "at the time the alleged cause of action arose." (Stats.1931, ch. 578, § 12, pp. 1262-1263.) Such language could be construed to extend to causes of action that "arose" by virtue of agreements signed by unlicensed contractors. As noted below, however, cases construing analogous provisions of the statutes governing licensure of real estate brokers have concluded, contrary to Holm, that brokers may recover compensation if licensed at the time of performance, even if not licensed when they agreed to provide services for which a license was required. (See text discussion, post.)
[18]  Section 7028, which makes it a misdemeanor to "engage in the business or act in the capacity of a contractor" without holding a valid license, provides that for a second or subsequent violation, "the court shall [among other sanctions] impose a fine of 20 percent of the price of the contract under which the unlicensed person performed contracting work, or four thousand five hundred dollars ($4,500), whichever is greater...." (Id., subd. (b), italics added.) There is no suggestion that the contract is necessarily void between the parties; in fact, the fine is assessed as a percentage of the contract price itself.
[19]  Indeed, decisions implying that substantial compliance might be found even where nonlicensure existed at the time the agreement was entered logically undermine the notion that an agreement executed by an unlicensed person is void and unenforceable from the outset.
[20]  In its present form, the CSLL requires all prime contracts (i.e., contracts between owners and their general contractors), and all home improvement, repair, or service contracts to caution against use of unlicensed contractors, and to advise how information about a contractor's licensure can be obtained. (§ 7030.) These requirements do not extend to contracts between general contractors and subcontractors, such as the agreement at issue here, presumably because all parties to subcontracts should be thoroughly familiar with licensure requirements. We express no view on the rights and remedies of one who justifiably relied, at the time an agreement was entered, on a contractor's false representation that he or she was then duly licensed.
