
120 Cal.App.3d 827 (1981)
174 Cal. Rptr. 806
IRMA ZIGAS et al., Petitioners,
v.
THE SUPERIOR COURT OF THE CITY AND COUNTY OF SAN FRANCISCO, Respondent. ANGELO SANGIACOMO et al., Real Parties in Interest.
Docket No. 50140.
Court of Appeals of California, First District, Division Three.
June 24, 1981.
*830 COUNSEL
Jeffrey J. Parish, Robert L. Gorman, Robert J. Yorio, Rosenblum, Fenolio, Parish, Jack & Bacigalupi and Rosenblum, Rabkin, Parish, Jack, Bachli & Bacigalupi for Petitioners.
No appearance for Respondent.
Lance S. Stryker and Meadows, Dorris, Harris & Stryker for Real Parties in Interest.
OPINION
FEINBERG, J.
This case is before us on a petition for writ of mandate. Because the issues involved appeared to be of considerable public importance and of first impression, we issued an alternative writ. We now hold that the relief sought should be granted.
Petitioners are tenants of an apartment building at 2000 Broadway in San Francisco, which was financed with a federally insured mortgage in excess of $5 million, pursuant to the National Housing Act (12 U.S.C. § 1701 et seq.) (the Act) and the regulations promulgated thereunder *831 (24 C.F.R. § 207 et seq.). They seek in a class action, inter alia, damages for the landlords' (real parties in interest) violation of a provision of the financing agreement which requires that the landlords charge no more than the Department of Housing and Urban Development (HUD) approved schedule of rents. The trial court has sustained demurrers without leave to amend to 5 causes of action of 15 alleged, apparently on the ground that there is no right in the tenants to enforce the provisions of an agreement between their landlords and the federal government.
Petitioners allege that their landlords were required under their contract with HUD to file a maximum rental schedule with HUD and to refrain from charging more than those rents without the prior approval of the Secretary of HUD. Petitioners further allege that real parties are, and have been, charging rent in excess of the maximums set out in the rental schedule; the complaint avers that real parties have collected excessive rents and fees in an amount exceeding $2 million.
In addition to sustaining demurrers as to the third-party causes of action, the trial court granted real parties' motion to strike all references to the Act, the regulations promulgated thereunder, and the terms of the agreement between HUD and real parties. It is these orders sustaining the demurrers and granting the motion to strike that petitioners seek to have set aside.
The issues presented include: (1) whether federal or state law applies; (2) whether petitioners have standing to sue; and (3) whether the action has become moot as a result of real parties' repayment of the HUD insured loan.

Federal or State Law
(1a) Real parties appear to argue at one point that whether petitioners have standing to sue is to be determined by federal law because a federal contract arising under a federal statute is involved. In so arguing, real parties misconceive the nature of the complaint in the case at bar. The complaint does not allege a federal cause of action, i.e., arising out of the National Housing Act. What it alleges, in substance, is that pursuant to the Act, an agreement was entered into between HUD and real parties whereby real parties promised not to charge as rent more than that approved by HUD. Real parties did so charge and petitioners, under California law, seek redress as the parties aggrieved.
*832 Thus, Touche Ross & Co. v. Redington (1979) 442 U.S. 560 [61 L.Ed.2d 82, 99 S.Ct. 2479], for example, relied upon by real parties, is inapposite. In Touche Ross, customers of security brokerage houses brought a federal action for damages against accountants who audited certain financial reports the security brokerage firms were required to file under section 17(a) of the Securities and Exchange Act of 1934, based on misstatements contained in the reports. Jurisdiction of the federal court was invoked under section 17(a).
The court held Congress did not create a federal statutory cause of action under section 17(a) in the customers of the brokerage houses for a violation of the section.[1]
In the case at bench, as we have said, petitioners do not contend that the National Housing Act created a federal statutory cause of action in the tenants.
In Cort v. Ash (1975) 422 U.S. 66 [45 L.Ed.2d 26, 95 S.Ct. 2080], a stockholder of a corporation brought an action for damages against the corporate directors on the ground that the corporation had made illegal contributions or expenditures in connection with a federal election in violation of 18 United States Code section 610.
The court held that no private cause of action was created by section 610 cognizable in federal court. However, the court did recognize that violation of section 610 could create the framework for a cause of action under state law. In this context, the court said, "[I]t is entirely appropriate ... to relegate respondent [the stockholder  plaintiff] and others in his situation to whatever remedy is created by state law. In addition to the ultra vires action pressed here, ... the use of corporate funds in violation of federal law may, under the law of some States, give rise to a cause of action for breach of fiduciary duty." (Id., 422 U.S. at p. 84 [45 L.Ed. at p. 40].)
We now advert to Miree v. DeKalb County (1977) 433 U.S. 25 [53 L.Ed.2d 557, 97 S.Ct. 2490], a case more directly in point here.
*833 In Miree, victims in an airplane crash sued DeKalb County, Georgia, in federal court under a third-party-beneficiary theory. One of the terms of a contract between the county and the Federal Aviation Administration (FAA) provided that the county agreed to restrict land use in the vicinity of the airport to "`activities and purposes compatible with normal airport operations including landing and takeoff of aircraft.'" (Id., at p. 27 [53 L.Ed.2d at p. 561].) The lawsuit alleged that the county had breached the contract by maintaining a garbage dump adjacent to the airport and that the cause of the crash was the ingestion of birds swarming from the dump into the aircraft's jet engines. Federal jurisdiction was invoked under 28 United States Code section 1332, diversity of citizenship, only.
The Miree court determined that the controversy should have been decided under state law, and explained its ruling in the following terms: "The litigation before us raises no question regarding the liability of the United States or the responsibilities of the United States under the contracts. The relevant inquiry is a narrow one: whether petitioners as third-party beneficiaries of the contracts have standing to sue respondent. While federal common law may govern even in diversity cases where a uniform national rule is necessary to further the interests of the Federal Government, Clearfield Trust Co. v. United States, 318 U.S. 363 (1943), the application of federal common law to resolve the issue presented here would promote no federal interests even approaching the magnitude of those found in Clearfield Trust: ..." (Miree v. DeKalb County, supra, at pp. 28-29, fn. omitted [53 L.Ed.2d at pp. 562-563], italics added.)
The court also observed: "The operations of the United States in connection with FAA grants such as these are undoubtedly of considerable magnitude. However, we see no reason for concluding that these operations would be burdened or subjected to uncertainty by variant state-law interpretations regarding whether those with whom the United States contracts might be sued by third-party beneficiaries to the contracts. Since only the rights of private litigants are at issue here, we find the Clearfield Trust rationale inapplicable." (Id., at p. 30 [53 L.Ed.2d at p. 563].)
Finally, the court noted that the federal interest was implicated "only insofar as such lawsuits might be thought to advance federal aviation policy by inducing compliance with FAA safety provisions." (Id., at p. 32 [53 L.Ed.2d at p. 564].)
*834 The parallel between Miree and this case compel the application of state law in all questions involving third-party beneficiary rights under the contract. The lawsuit is between private litigants, and raises no question regarding liability of the United States. Though the operations of HUD are of considerable magnitude, there is no reason to conclude that the operations of the department would be unduly burdened or subjected to uncertainty by variant state law interpretations. In fact, the primary effect which this case could have on federal housing policy would be to promote compliance with HUD requirements regarding HUD approved rent schedules.
Finally, in this aspect, real parties rely upon Martinez v. Socoma Companies, Inc. (1974) 11 Cal.3d 394 [113 Cal. Rptr. 585, 521 P.2d 841]. That reliance is misplaced. Martinez does not hold as sweepingly as real parties assert "that the public beneficiaries of a federally funded program have no rights as third-party beneficiaries such as to enable them to sue for nonperformance thereof."
(2) What Martinez held is that the determination of whether beneficiaries under a contract between a federal agency and a private party have standing to sue a private party for nonperformance of the agreement as third party beneficiaries "must be made in light of applicable federal statutes and other matters we [the court] must judicially notice." (Id., at p. 400.)
(1b) At this juncture, we conclude as follows: Granted that the National Housing Act does not create a federal statutory right of action in petitioners, nevertheless, they may have standing to sue based on a cause of action under applicable state law.
(3a) We turn now to the question of whether petitioners have a cause of action under California law.

Standing to Sue  Third Party Beneficiary
California law clearly allows third-party suits for breaches of contract where no government agency is a party to the contract. (Civ. Code, § 1559.) Whether such suits are allowed when the government contracts with a private party depends upon analysis of the decisions in Shell v. Schmidt (1954) 126 Cal. App.2d 279 [272 P.2d 82] and Martinez v. Socoma Companies, Inc., supra, 11 Cal.3d 394.
*835 In Shell, plaintiffs sued as third-party beneficiaries to defendant's contract with the Federal Housing Authority (FHA). The contract entailed an agreement by the defendant to build homes for sale to veterans according to plans and specifications submitted by the defendant to FHA in return for which FHA gave priorities to the defendant to secure the materials necessary for the building.
In deciding that plaintiffs had standing to enforce the terms of the contract between the defendant and the FHA, the Shell court relied on common law principles as embodied in Civil Code section 1559, which states: "A contract, made expressly for the benefit of a third person, may be enforced by him at any time before the parties thereto rescind it." Applying this provision to the facts before it, the Shell court observed: "Once it is established that the relationship between the contractor and the government is contractual, it follows that veterans purchasing homes, that is, the class intended to be protected by that contract, are third party beneficiaries of that contract. As already pointed out, the statute and the regulations passed thereunder resulting in the contract were passed to aid and assist veterans and for their benefit. Purchasing veterans constitute the class intended to be benefitted, and the contract must therefore be for their benefit." (Id., at p. 290.)
It is evident that petitioners are entitled to maintain a third-party cause of action under the Shell rationale. Real parties do not dispute the contractual nature of their relationship with HUD. And it is clear that a requirement of HUD approval of rent increases could only benefit the tenants.
Furthermore, even the most cursory review of the statutes and regulations which resulted in the contract in the present case leads to the conclusion that the tenants constitute the class which Congress intended to benefit. As stated in 12 United States Code section 1701t: "The Congress affirms the national goal, as set forth in section 1441 of Title 42, of `a decent home under a suitable living environment for every American family.'" (Section 1713(b) of title 12, United States Code, also provides, in part: "The insurance of mortgages under this section is intended to facilitate particularly the production of rental accommodations, at reasonable rents, ... The Secretary is, therefore, authorized ... to take action, by regulation or otherwise, which will direct the benefits of mortgage insurance hereunder primarily to those projects which make adequate provision for families with children, and in which *836 every effort has been made to achieve moderate rental charges." (Italics added, see also 24 C.F.R. § 207.19(e).)
This national goal, along with the purposes enunciated throughout the Act and the regulations promulgated thereunder, can leave no doubt that petitioners are members of the class which this legislation was intended to benefit. Under Shell, this conclusion, coupled with the uncontested contractual relationship between real parties and HUD, is sufficient to support the tenants' standing to sue as third-party beneficiaries to a government contract.
In the subsequent case of Martinez v. Socoma Companies, Inc., supra, 11 Cal.3d 394, the court approved of the result in Shell but, at the same time, applied a different standard.[2] Plaintiffs in Martinez sought to enforce the terms of a contract between Socoma Companies, Inc. and the Secretary of Labor. Under this agreement, defendants received government funds in exchange for a promise to hire and train "hard core unemployed" residents of a "Special Impact Area" in East Los Angeles. Defendants failed to perform, and plaintiffs, who were residents of East Los Angeles and members of the class which the government intended to benefit, sought to recover under the contract.
In holding that the plaintiffs had no standing to sue as third-party beneficiaries, the Martinez court adopted a more restrictive standard than that embodied in Civil Code section 1559, choosing instead to be guided by the principles set forth in section 145 of the Restatement of Contracts: "`A promisor bound to the United States or to a State or municipality by contract to do an act or render a service to some or all of the members of the public, is subject to no duty under the contract to such members to give compensation for the injurious consequences of performing or attempting to perform it, or of failing to do so, unless, ... an intention is manifested in the contract, as interpreted in the light of the circumstances surrounding its formation, that the promisor shall compensate members of the public for such injurious consequences. ...'" (Martinez v. Socoma Companies, Inc., supra, at pp. 401-402; City & County of San Francisco v. Western Air Lines, *837 Inc. (1962) 204 Cal. App.2d 105, 121 [22 Cal. Rptr. 216]; Rest., Contracts, supra, § 145.)[3]
(4) Thus, under Martinez, standing to sue as a third-party beneficiary to a government contract depends on the intent of the parties as manifested by the contract and the circumstances surrounding its formation. "Insofar as intent to benefit a third person is important in determining his right to bring an action under a contract, it is sufficient that the promisor must have understood that the promisee had such intent. [Citations.] No specific manifestation by the promisor of an intent to benefit the third person is required." (Lucas v. Hamm (1961) 56 Cal.2d 583, 591 [15 Cal. Rptr. 821, 364 P.2d 685].) We therefore must determine, from the terms of the contract between HUD and real parties and the attendant circumstances, whether there was manifested an intention that petitioners be compensated in the event of real parties' nonperformance. (5) Mindful of the rule that "[w]hen a complaint is based on a written contract which it sets out in full, a general demurrer to the complaint admits not only the contents of the instrument but also any pleaded meaning to which the instrument is reasonably susceptible. [Citation.]" (Martinez v. Socoma Companies, Inc., supra, 11 Cal.3d at p. 400) and focusing upon the precepts of Martinez as to standing, we are of the view that the case falls within Shell; that is to say, appellants were direct beneficiaries of the contract and have standing, and not, as in Martinez, incidental beneficiaries without standing.
We explicate:
1. In Martinez, the contract between the government and Socoma provided that if Socoma breached the agreement, Socoma would refund to the government that which the government had paid Socoma pursuant to the contract between them. Thus, it is clear in Martinez that it was the government that was out of pocket as a consequence of the breach and should be reimbursed therefor, not the people to be trained and given jobs. In the case at bench, as in Shell, the government suffered *838 no loss as a consequence of the breach, it was the renter here and the veteran purchaser in Shell that suffered the direct pecuniary loss.
2. Unlike Martinez, too, in the case at bench, no governmental administrative procedure was provided for the resolution of disputes arising under the agreement. Thus, to permit this litigation would in no way affect the "efficiency and uniformity of interpretation fostered by these administrative procedures." (Martinez v. Socoma Companies, Inc., supra, 11 Cal.3d at p. 402.) On the contrary, as we earlier noted, lawsuits such as this promote the federal interest by inducing compliance with HUD agreements.
3. In Martinez, the court held that "To allow plaintiffs' claim would nullify the limited liability for which defendants bargained and which the Government may well have held out as an inducement in negotiating the contracts." (At p. 403, fn. omitted.) Here, there is no "limited liability." As we shall point out, real parties are liable under the agreement, without limitation, for breach of the agreement.
4. Further, in Martinez, the contracts "were designed not to benefit individuals as such but to utilize the training and employment of disadvantaged persons as a means of improving the East Los Angeles neighborhood." (At p. 406.) Moreover, the training and employment programs were but one aspect of a "broad, long-range objective" (ibid.) contemplated by the agreement and designed to benefit not only those to be trained and employed but also "other local enterprises and the government itself through reduction of law enforcement and welfare costs." (Ibid.)
(3b) Here, on the other hand, as in Shell, the purpose of the Legislature and of the contract between real parties and HUD is narrow and specific: to provide moderate rental housing for families with children; in Shell, to provide moderate priced homes for veterans.
5. Finally, we believe the agreement itself manifests an intent to make tenants direct beneficiaries, not incidental beneficiaries, of real parties' promise to charge no more than the HUD approved rent schedule.
Section 4(a) and 4(c) of the agreement, providing that there can be no increase in rental fees, over the approved rent schedule, without the prior approval in writing of HUD, were obviously designed to protect *839 the tenant against arbitrary increases in rents, precisely that which is alleged to have occurred here. Certainly, it was not intended to benefit the government as a guarantor of the mortgage.
Furthermore, the provision in section 11(d) of the agreement, authorizing the Secretary of HUD to "[a]pply to any court ... for specific performance ..., for an injunction against any violation ... or for such other relief as may be appropriate" (italics added) would entitle the secretary to seek restitution on behalf of the tenants overcharged, for such relief would surely be "appropriate." (See Porter v. Warner Co. (1946) 328 U.S. 395 [90 L.Ed. 1332, 66 S.Ct. 1086].) Thus, there was an intent upon the part of the government in executing the agreement with real parties, to secure the return of any rents exacted in excess of the rent schedule.
We are supported in our view by section 17 of the Agreement which specifically provides that real parties are personally liable, "(a) for funds ... of the project coming into their hands which, by the provisions [of the Agreement] they are not entitled to retain; and (b) for their own acts and deeds or acts and deeds of other [sic] which they have authorized in violation of the provisions [of the Agreement]." (Italics added.)
By the allegations of the complaint, real parties have "retained" in excess of $2 million in violation of the Agreement. Therefore, they are liable for that sum. To whom should they be liable? To ask the question is to answer it. It is not the government from whom the money was exacted; it was taken from the tenants. Therefore, it should be returned to the tenants.
In the face of this evidence of intent to direct the benefits of mortgage insurance to the tenants of the facilities involved, real parties argue that petitioners have no standing to sue because enforcement of the agreement is vested solely in the Secretary. They point to 12 United States Code section 1731a, which empowers the Secretary to refuse the benefits of participation to any mortgagor who violates the terms of the agreement. However, section 1731a's authorization does not constitute the exclusive remedy for enforcement of the agreement by the Secretary or by third parties. As stated by the court in Shell v. Schmidt, supra, 126 Cal. App.2d at p. 287: "This fundamental purpose would, in many cases, be defeated if the statute were interpreted so as to deprive the veterans of their normal remedies to the benefit of defaulting contractors *840  the very class it was the purpose of the statute to protect the veterans against. It must be held, therefore, that the enumeration of remedies in the statute merely created new enumerated remedies and was not intended to and did not deprive the veterans of any action for fraud or breach of contract that they might have under general common law principles."
Similarly, it would be anomalous if a congressional program, and the regulatory agreement formed thereunder, all of which was designed to assist in providing housing for low and moderate income families, were construed so as to provide cheap financing for the housing industry while at the same time denying tenants any means of protecting the benefits which they were intended to receive.
Real parties direct this court's attention to Falzarano v. United States (1st Cir.1979) 607 F.2d 506, in which the court denied relief to tenants of a similar project. However, Falzarano and other similar cases cited by real parties, involved situations where tenants were contesting HUD-approved rent increases. (See Fenner v. Bruce Manor, Inc. (D.Md. 1976) 409 F. Supp. 1332; Harlib v. Lynn (7th Cir.1975) 511 F.2d 51; Feldman v. U.S. Dept. of H. & U. Development (E.D.Pa. 1977) 430 F. Supp. 1324.) These cases are therefore inapposite; a requirement of tenant approval to a rent increase or a tenant suit to challenge a HUD-approved increase could easily frustrate the Secretary's policy of maintaining a reasonable return of mortgagor's investments and promoting the financial stability of the housing projects. In contrast, as we have noted, maintenance of petitioners' action in this case will only serve to effectuate the policies of the Act.
Thus, for reasons we have set forth, appellants are entitled to maintain a third-party beneficiary action against real parties.

Standing to Sue  Restitution
We can do no better than to quote the Supreme Court of New Jersey in a case substantially on all fours with the case at bench. "Accepting as we must for present purposes, the plaintiffs' version of the transaction there was an illegal and unjust exaction of rent in excess of the maximum expressly prescribed by the Administrator's [presently the Secretary of HUD] regulations and in violation of the terms embodied therein.... This exaction resulted in the unjust enrichment of the defendants at the plaintiffs' expense and, special defenses aside, entitles *841 the plaintiffs to restitution under settled equitable principles cognizable in the lower court." (Brinkmann v. Urban Realty Co. (1952) 10 N.J. 113, 119 [89 A.2d 394, 397].)

Conclusion
Surely it would be unconscionable if a builder could secure the benefits of a government guaranteed loan upon his promise to charge no more than a schedule of rents he had agreed to and then find there is no remedy by which the builder can be forced to disgorge rents he had collected in excess of his agreement simply because the government had failed to act.
Insofar as appellants sought specific performance of the contract between real parties and HUD or an injunction against breach of that contract by real parties, it appears that such relief has become moot because the contract has expired. Thus, we have not addressed the question as to whether appellants have standing to seek such remedies.
Let a writ of mandate issue directing the trial court to set aside its orders sustaining the general demurrers and granting the motion to strike. The matter is remanded for such further proceedings as may be appropriate and not inconsistent with the views expressed herein.
White, P.J., and Scott, J., concurred.
A petition for a rehearing was denied July 24, 1981, and the petition of real parties in interest for a hearing by the Supreme Court was denied September 10, 1981.
NOTES
[1]  Parenthetically, the court observed that a state action had been brought by the same plaintiffs against the same defendant wherein the allegations of the complaint were substantially identical with those before the Supreme Court except that plaintiffs made no claim under section 17(a). (Ibid.)
[2]  The Martinez court approved of the result in Shell, based upon a finding that the legislation under which the homes in Shell were built included a provision empowering the government to obtain payment by the contractor to the veteran purchasers for deficiencies resulting from failure to comply with specifications. (Martinez, supra, at p. 403.) Thus, the intent to compensate which Restatement, Contracts, section 145, requires was present. However, the Shell court made no mention of section 145.
[3]  It has been suggested that section 145 was meant only to preclude lawsuits for consequential damages arising out of government contracts, because the resulting potential liability may be disproportionately burdensome in relation to the value of the promised performance. (See Rest., Contracts, supra, § 145, illus. 1 and 2; 44 A.L.I. Proceedings 331 (1967).) Thus, the underlying rationale of section 145 is inapplicable where, as here, the money sought is not a consequence of the breach, it is the breach. In such a situation, standard third-party beneficiary doctrines should apply. (See Note (1975) 88 Harv. L.Rev. 646, 650-651.)
