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 obligation.
FACTS
The material facts are undisputed. Cen-tex is a company engaged in residential and *953commercial 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 Cen-tex 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 *954Bank 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 ContRacts § 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, *955817 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 me-ruit 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 me-ruit 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 *956incorrect 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 Cen-tex’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..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 V12 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.”
. 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]."
. 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.”
. 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."
. Restatement (Second) of Contracts § 261, cmts. b & c (1981).
. Restatement (Second) of Contracts § 261, cmt. c, rptr. note at 321 (1981).
. 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 altema-tive bases of recovery, particularly if there is the possibility that the contract might be found to be invalid....” W. DORSANEO, 1A TEXAS LITIGATION GUIDE § 21A.03[2] (1992) (citations omitted) (emphasis added). See also TEX. R.CIV.P. 48.
. 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.