
840 S.W.2d 952 (1992)
CENTEX CORPORATION, Petitioner,
v.
John DALTON, Respondent.
No. D-1244.
Supreme Court of Texas.
November 4, 1992.
Rehearing Overruled December 16, 1992.
Jerry P. Jones, Luke Ashley, Michael R. Berry, Dallas, for petitioner.
Bernard William Fischman, San Antonio, for respondent.

OPINION
GAMMAGE, Justice.
We consider whether the court of appeals erred by holding that Centex Corporation's (Centex) contract with John Dalton was not invalidated by a governmental regulation. In district court, Dalton filed suit against Centex seeking to recover liquidated damages for alleged breach of contract. He later moved for summary judgment, which the district court granted, awarding him $750,000 as damages for breach of contract, plus prejudgment interest, post-judgment interest, costs and attorney's fees. The court of appeals affirmed. 810 S.W.2d 812. We reverse and hold that Centex's contract with Dalton is unenforceable because a governmental regulation prohibiting Centex's performance invalidates the contract, discharging Centex's

FACTS
The material facts are undisputed. Centex is a company engaged in residential and *953 commercial construction and related financial services. In November 1988, Dalton was an executive of a Texas thrift institution.
In 1988, because the flagging Texas economy adversely affected the state's thrift institutions, the Federal Home Loan Bank Board (Bank Board) and other regulatory agencies determined it was in the best interest of depositors, borrowers and other creditors of the state's thrift institutions to close, merge, liquidate or sell several large thrift institutions under what came to be known as the "Southwest Plan." In November 1988, Centex, acting through its executive vice president, David Quinn, contacted Dalton to request that he assist Centex in acquiring certain thrift institutions made available through the Southwest Plan. A few weeks later, Dalton traveled to Washington, D.C., where he made an unsuccessful bid at acquiring a group of thrift institutions for Centex. While making that bid, Dalton learned that four other central Texas thrift institutions, known as the "Lamb Package," were available for purchase. Dalton informed Centex about the availability of the Lamb Package, and on December 23, 1988, Centex entered into a letter agreement with Dalton, wherein Centex promised to pay Dalton $750,000 over a three-year period if Centex were successful in acquiring the Lamb Package.[1]
Before Centex and Dalton signed the letter agreement, Centex met with the Bank Board and advised the Bank Board of its intention to pay fees to Dalton upon completion of acquisition of the Lamb Package. The Bank Board told Centex that its payment of fees to Dalton would be acceptable as long as Centex made payment and not any of the thrift institutions in the Lamb Package or the entity formed to acquire the Lamb Package. But, on December 28, 1988, the night before Centex's acquisition of the Lamb Package closed, Quinn learned the Bank Board probably would not permit payment of the fees to Dalton. Centex, nevertheless, acquired the Lamb Package, forming a wholly-owned subsidiary known as Texas Trust Savings Bank, FSB (Texas Trust) as the acquiring entity.
At a meeting on December 29, 1988, the Bank Board approved the acquisition of the Lamb Package, conditioned on a prohibition against Texas Trust's direct or indirect payment of finder's fees.[2] The transcript of the meeting shows that members of the Bank Board discussed Texas Trust's planned payment of fees to Dalton, made specific objection to the payment, and requested its general counsel to prepare an amendment to clarify that its prohibition against the payment of fees extended to affiliates of Texas Trust. On January 31, 1989, the Bank Board adopted the amendment proposed by its counsel.[3]
Dalton performed the services required of him under the letter agreement, but Centex did not pay him. The evidence shows Centex refused to pay Dalton because of the prohibition imposed by the
*954 Bank Board when it approved Centex's acquisition of the Lamb Package on December 29,1988, and because of the prohibition amendment the Bank Board adopted on January 31, 1989.
In August 1989, the Financial Institutions Reform Recovery and Enforcement Act (FIRREA) became effective, abolishing the Bank Board and creating the Office of Thrift Supervision (OTS). FIRREA gave OTS the powers that formerly had been vested in the abolished Bank Board. Pursuant to 12 U.S.C. § 1818(b)(6)(D) (1989), OTS has authority to issue cease-and-desist orders, to rescind contracts and to correct violations of Bank Board conditions. On December 11, 1990, while this case was before the court of appeals, OTS issued such a cease-and-desist order to prevent Centex or Texas Trust from paying any fees to Dalton under the letter agreement.[4]

DISCUSSION
Centex argues that, because its performance under the letter agreement has been made impracticable by having to comply with the Bank Board's order, its duty to render that performance is discharged. We agree.
Congress gave the Bank Board power to regulate the acquisition and control of federally-insured thrifts by savings and loan holding companies. 12 U.S.C. § 1730a (1982). As a result, the Bank Board's prohibition makes it illegal for Centex to perform under the letter agreement. "Where... a party's performance is made impracticable... by the occurrence of an event the non-occurrence of which was a basic assumption on which the contract was made, his duty to render that performance is discharged..." RESTATEMENT (SECOND) OF CONTBACTS § 261 (1981). A governmental regulation or order that makes impracticable the performance of a duty "is an event the non-occurrence of which was made a basic assumption on which the contract was made." Restatement (Second) of Contracts § 264 (1981). Consequently, to avoid inconsistency with the Bank Board's prohibition and conflict with federal regulatory law, we must hold that Centex is excused from performance by the doctrine of impossibility.
In Houston Ice & Brewing Co. v. Keenan, 99 Tex. 79, 88 S.W. 197, 199 (1905), this court approved the general doctrine of impossibility due to illegality: "the performance of a contract is excused by a supervening impossibility caused by the operation of a change in the law...." See also Metrocon Const. Co. v. Gregory Const. Co., 663 S.W.2d 460, 462 (Tex.App.Dallas 1983, writ ref'd n.r.e.) (implicitly recognizing the doctrine of impossibility). When courts are asked to excuse a party's performance due to supervening circumstances which made performance impracticable or impossible, they sometimes attempt to allocate the burden of risk and decide who must pay for the unanticipated occurrence. Foreseeability is one factor used to decide which party assumed the risk of supervening impossibility. Houston Ice & Brewing Co. v. Keenan, 88 S.W. at 198 (impossibility defense failed because the "probability" of the unanticipated occurrence was known to the party seeking relief before contracting); Calvin V. Koltermann, Inc. v. Underream Piling Co., 563 S.W.2d 950, 957 (Tex.Civ.App.San Antonio 1977, writ ref'd n.r.e.).
The foreseeability factor has, however, gradually decreased in importance. Opera Co. of Boston v. Wolf Trap Foundation, *955 817 F.2d 1094 (4th Cir.1987). For example, the first Restatement of Contracts § 457 (1932) provided that the party seeking to be excused from performing the contract must have "had no reason to anticipate" the supervening occurrence. The updated Restatement (Second) of Contracts § 261 (1981) omitted that requirement, explaining that many factors may excuse a failure to deal with contingencies, and that even if the event was reasonably foreseeable, or even foreseen, the contracting party may still be discharged.[5] Citing Eastern Air Lines v. McDonnell Douglas Corp., 532 F.2d 957, 992, n. 97 (5th Cir.1976), the Restatement (Second) reporters wrote that "the dangers of the mechanistic use of a foreseeability test have been noted...."[6] Here, one party, Centex, cannot be required to pay, regardless of the foreseeability of the Bank Board's prohibition.
The court of appeals reasoned that the Bank Board's prohibition applied only to Texas Trust and not to Centex. We note, however, that the prohibition forbids not only the direct payment of finder's fees by Texas Trust, but also the indirect payments of such fees. The payment of finder's fees by Centex, which is an affiliate of Texas Trust, is the specific indirect payment that the Bank Board's prohibition was intended to address.
The dissent urges the court to utilize the equitable remedy of quantum meruit to remand this cause and afford Dalton alternative means to collect full payment for services performed. Even if quantum meruit might have afforded Dalton an alternate ground of recovery, Dalton did not plead it, and a judgment must be based upon pleadings. See Dobbins v. Redden, 785 S.W.2d 377, 378 (Tex. 1990); Stoner v. Thompson, 578 S.W.2d 679, 682 (Tex.1979).
Dalton knew about the federal prohibition and was on notice that Centex contended it made his contract unenforceable at the time he filed this lawsuit. When it is possible a contract claim may be held invalid, it is somewhat standard practice for a party to plead an alternative quantum meruit claim.[7] Dalton's failure to initially plead quantum meruit as an alternative theory of recovery suggests he concluded that if the contract claim were barred, quantum meruit would also be barred. In reality, never at any point in the legal process of this case, not even in his appearance before this court, did Dalton assert a quantum meruit claim. His failure to plead quantum meruit at the first trial may not serve as a basis for a remand on appeal. Dobbins v. Redden, 785 S.W.2d at 378. Ultimately, the Board's broad prohibition of any "direct or indirect" payment for the services rendered probably prevents payment for those services under either quantum meruit or breach of contract theories.[8]
We also note the court of appeals reasoned that, because the obligation of Centex to pay Dalton arose when the letter agreement was signed on December 23, 1988, before the Bank Board's adoption of its prohibition on December 29, 1988, the prohibition did not apply to the letter agreement. Centex, the court concluded, was not prohibited from paying Dalton his fees. The court of appeals' reasoning was *956 incorrect because the letter agreement is premised on a condition precedent. A condition precedent is an event that must happen or be performed before a right can accrue to enforce an obligation. Hohenberg Bros. Co. v. George E. Gibbons & Co., 537 S.W.2d 1, 3 (Tex.1976); Evans v. Prufrock Restaurants, Inc., 757 S.W.2d 804, 805 (Tex.AppDallas 1988, writ denied); Gordin v. Shuler, 704 S.W.2d 403, 406 (Tex.AppDallas 1985, writ ref'd n.r.e.). Here, by the terms of the letter agreement, Dalton's right to enforce it could not accrue until the Bank Board approved the acquisition. Because the Bank Board, in approving the acquisition, prohibited the payment of the finder's fees, thereby invalidating the letter agreement, Dalton's right to enforce the letter agreement never accrued.
The Bank Board's order prohibits Centex's performance under the letter agreement, which otherwise would be enforceable under state contract law. Centex cannot pay Dalton and obey the governmental regulation, which has prohibited the proposed payment. Centex's duty to perform under the letter agreement is excused. Consequently, we reverse the court of appeals and render judgment for Centex.
MAUZY, J., joined by GONZALEZ and HIGHTOWER, JJ., dissents.
MAUZY, Justice, dissenting.
The majority opinion recognizes an injustice, but fails to correct it. Having concluded that the Bank Board's prohibition invalidates the agreement between Centex and Dalton, the majority declines to provide an opportunity for an equitable remedy. As a result, Centex reaps a windfall at Dalton's expense. I dissent.
Centex agreed to pay Dalton a total of $750,000 if Centex closed a deal on a thrift by a certain date. The fee was to compensate Dalton for his services in arranging the sale. Although its representative had previously approved the agreement, the Bank Board prohibited payment to Dalton on the eve of the closing date. Centex proceeded without notice to Dalton.
The majority determines that the Board's prohibition invalidated the contract before Dalton's right to enforcement accrued. Allowing that the agreement is unenforceable, Centex should not reap a windfall for its acquiescence to the belated disapproval of the fee. Although there is no indication that Centex affirmatively sought the prohibition, there is also no indication that it made any effort to avoid the foreseeable bar to performance. At a minimum, Centex should have notified Dalton upon learning that the Board would not permit payment. Instead, Centex evidently kept the information to itself, preventing Dalton from appealing the decision while the contract was still viable.
Further, Centex need not have proceeded with the acquisition on the Board's new terms. Having chosen to do so, the resulting, inconsistent obligations were its burden. Instead of resolving those obligations, it pawned the responsibility onto Dalton.
The majority now rewards Centex with a windfall of $750,000, thus recommending a neatly profitable scheme to those in positions to influence regulatory policymaking. The decision is explained in terms of federal supremacy and the intricacies of contract law, but the plain injustice of the result is overlooked: Centex, by quietly acquiescing to the Board's new terms, unfairly escaped its debt for the benefit of Dalton's services.
Whenever our rendition of judgment would work an injustice, our rules enable us to remand the cause for a new trial. Tex.R.App.P. 180. This is such a case.
On remand, Dalton would be free to plead and prove a claim based on quantum meruit. See Hudson v. Wakefield, 711 S.W.2d 628, 631 (Tex.1986) (when a summary judgment is reversed, the parties are not limited to the theories asserted in the original summary judgment at a later trial on the merits and may amend their pleadings to assert other theories in view of the *957 appellate holding). Founded on the equitable doctrine of unjust enrichment, quantum meruit provides a remedy "when nonpayment for the services rendered would `result in an unjust enrichment to the party benefitted by the work.'" Vortt Exploration v. Chevron U.S.A., 787 S.W.2d 942, 944 (Tex.1990) (citing City of Ingleside v. Stewart, 554 S.W.2d 939, 943 (Tex.Civ. App.Corpus Christi 1977, writ ref'd n.r.e.)).
This remedy remains available despite the obstacles of federal law and state contract law raised by the majority.[1] A remedy under quantum meruit is consistent with the Board's prohibition. Although the prohibition may have preempted state contract law to the extent of invalidating the agreement, the prohibition does not foreclose an equitable remedy. Even in instances of apparent actual conflict, the preemptive effect of a federal regulation is determined by its policy objective. See Midlantic Nat'l Bank v. New Jersey Dept. ofEnv. Protection, 474 U.S. 494, 106 S.Ct. 755, 88 L.Ed.2d 859 (1986). Here, the prohibition was adopted in the interest of avoiding a precedent permitting finders' fees.[2] Requiring equitable reimbursement by Centex in this instance does not frustrate this policy objective because the circumstances giving rise to the remedy are unique to this transaction: future parties to fee arrangements will have been on notice of the O.T.C.'s prohibition. Further, because the remedy of quantum meruit "does not arise out of contract, but is independent of it," compensation under quantum meruit would not conflict with the Board's prohibition on the payment of the fee as arranged by contract. Vortt Exploration, 787 S.W.2d at 944 (citing Colbert v. Dallas Joint Stock Land Bank, 129 Tex. 235, 102 S.W.2d 1031, 1034 (1937)). Also, because quantum meruit arises independently of contract obligations, the majority's contract analysis is inapposite. See id.
Because Centex should be required to pay for the benefit of Dalton's services, I would reverse the judgment of the Court of Appeals and remand this cause to the trial court. Dalton, in fairness, should have the opportunity to assert a claim under a theory that is consistent with the majority's invalidation of the agreement.
GONZALEZ and HIGHTOWER, JJ., join in this dissent.
NOTES
[1]  The letter from Centex to Dalton, to which Dalton agreed on December 23, 1988, provides in relevant part that "[i]n view of your experience in the savings and loan industry ... we will engage you as a consultant to work with us to consolidate and restructure the [Lamb Package]. Upon the condition that we acquire [the Lamb Package] on or before December 31, 1988, we will pay to you at closing Three Hundred Thousand Dollars ($300,000) and thereafter pay to you One Hundred Fifty Thousand Dollars ($150,000) per year (payable `/i2 monthly) over a period of three (3) years, in exchange for which you will serve as a consultant to work with us to consolidate and restructure the [Lamb Package]. We have no obligation to close, and if we do not close, you will have no claim for any payment."
[2]  The Bank Board's prohibition provides that "[n]o advisory fees, finders fees, investment banker's fees or other fees incurred in connection with the acquisition shall be paid directly or indirectly by the New Federal [Texas Trust]."
[3]  The Bank Board's amendment to its prohibition provides that "[t]he Bank Board determines that the prohibition on advisory fees, finders fees, investment bankers fees or other fees imposed upon Texas Trust ... should be extended to any affiliates and subsidiaries of Texas Trust."
[4]  The order, which was signed by Billy C. Wood, Director of OTS's Dallas Regional Office, provides in relevant part that "... IT IS ORDERED that Centex Corporation ("Centex") and its directors, officers, employees, agents, service corporations, and other persons acting on behalf of Centex Corporation shall not cause Centex Corporation, or Texas Trust Savings Bank. F.S.B., Llano, Texas, or any other of its affiliates, affiliated persons, subsidiaries, or service corporations ("Texas Trust"), to pay, directly or indirectly, any advisory fees, finder's fees, investment bankers fees or other such fees, investment bankers fees or other such fees incurred in connection with the approval of Centex Corporation's holding company application or with Texas Trust's acquisition of the four institutions comprising the Lamb Package."
[5]  Restatement (Second) of Contracts § 261, cmts. b & c (1981).
[6]  Restatement (Second) of Contracts § 261, cmt. c, rptr. note at 321 (1981).
[7]  One practice guide advises that "a party may not seek recovery on the basis of an express contract and recover on the basis of quantum meruit without pleading the quantum meruit claim. Nevertheless, plaintiff may, and if appropriate should, allege both theories as altemative bases of recovery, particularly if there is the possibility that the contract might be found to be invalid...." W. DORSANEO, 1A TEXAS LITGATION GUIDE § 21A.03[21 (1992) (citations omitted) (emphasis added). See also TEX. R.CIV.P. 48.
[8]  We recognize the dissent's desire to find a more equitable solution to this contract dispute. We are precluded from adopting its proposals, however, by both state and federal law and the record in this case.
[1]  Neither is compensation under quantum meruit inconsistent with the provision of the Real Estate License Act, Tex.Rev.Civ.Stat.Ann. art. 6573a § 20(b), conditioning recovery of a commission upon the existence of a written agreement. Here, there was a written agreement between Dalton and Centex, which gave rise to the expectation of payment and became invalid only after a seller was procured by Dalton. When a broker procures a seller while the contract is in force, but the closing occurs after its termination, the broker is nevertheless entitled to the commission earned by the procurement of a seller. See Ramesh v. Johnson, 681 S.W.2d 256, 259 (Tex.App. Houston [14th Dist.] 1984, writ ref'd n.r.e.) (where broker procured aseller pursuant to a written countrct but then consented to rescision, and buyer subsequently made a purchase from that seller through a different broker, the original broker satisfied the statutory requirement of a writing and is entitled to a commission).
[2]  See Minutes, Federal Home Loan Bank Board, Special Bank Board Meeting, December 28, 1988.
