
25 Cal.App.4th 375 (1994)
30 Cal. Rptr. 536
REAL PROPERTY SERVICES CORP., Plaintiff and Respondent,
v.
CITY OF PASADENA, Defendant and Appellant.
Docket No. B076434.
Court of Appeals of California, Second District, Division Five.
May 27, 1994.
*377 COUNSEL
Victor J. Kaleta, City Attorney, Ann H. Higginbotham, Assistant City Attorney, and F. Glenn Nichols for Defendant and Appellant.
Hitchcock, Bowman, Schachter & Beverly and William Beverly for Plaintiff and Respondent.
OPINION
GRIGNON, Acting P.J.
This case concerns whether a signatory to a contract with an attorney fee provision, who is sued by a nonsignatory for breach of that contract, is entitled to attorney fees if the signatory is the prevailing party. Defendant and appellant the City of Pasadena (the City) appeals from that portion of a judgment against plaintiff and respondent Real Property Services Corp. (RPS) denying the City's request for attorney fees after the trial court found in the City's favor following a court trial. The sole issue on appeal is whether the trial court erred in failing to award reasonable attorney fees to the City, the prevailing party. We conclude the City is entitled to reasonable attorney fees pursuant to Civil Code section 1717, and reverse.

FACTS
On December 16, 1986, the City and BWC Development Corp. entered into a written lease for the development and construction of a site for use as a parking garage and multiscreen movie theater. The City agreed to send out requests for bids, hire the architects and contractors, and underwrite the basic property development costs. BWC, as developer, agreed to pay for any theater-specific property development, and to own and operate a movie theater complex on the premises.
At the time the lease was signed, it was agreed by the parties that RPS would actually operate the movie theater. Provision 32 of the lease, entitled "SUBLEASE," provided that "[n]otwithstanding anything to the contrary herein, Lessor [the City] hereby consents to the sublease by Lessee [BWC] of the leased Premises to Real Property Services Corp. (`RPS')...." RPS was not, however, a signatory to the lease.
The lease also provided in provision 55 (xviii), entitled "GENERAL PROVISIONS. Attorneys' Fees," that "[i]n the event of any action or proceeding brought by either party against the other under this Lease, the prevailing *378 party shall be entitled to recover for the fees of its attorneys in such action or proceeding ... in such amount as the court may adjudge reasonable."
Shortly after the lease was signed, construction of the theater shell began. However, disputes arose almost immediately regarding the parties' financial responsibility for change orders. On March 9, 1987, the city council decided that negotiations should be commenced to terminate the lease between the City and BWC. Four days later, on March 13, the city council decided to amend the construction design to eliminate the theater shell. In effect, the City determined the property would be developed for some other project. A letter was written to BWC stating that the City believed it was excused from further obligations under the lease as a result of BWC's anticipatory repudiation and subsequent breach of the lease. Rather than respond, BWC simply allowed its letters of credit, which had been used to secure financing for its portion of the construction project, to expire under their own terms, signaling BWC's acquiescence in the termination of the relationship between the City and BWC.

PROCEDURAL BACKGROUND
On December 2, 1987, RPS filed suit against the City for breach of contract. Specifically, RPS claimed that "[a]s a direct and proximate result of [the City's] breach of the master lease, [RPS] will not be able to occupy the demised premises, and operate a multi-screen movie theater complex thereon. [RPS] has thus been damaged by the loss of [RPS's] business opportunity, in a sum not now known, but which [RPS] believes to be in excess of Ten Million Dollars ($10,000,000)." Apparently, RPS considered the City's abandonment of the theater complex project with BWC a breach of contract, despite the acquiescence of BWC. Moreover, RPS alleged it was entitled to the benefits of the lease agreement to the extent of the attorney fee provision. In its complaint, RPS stated, "Pursuant to Paragraph 55 (xviii) of the master lease, in the event of litigation, the prevailing party is entitled to recovery [of] reasonable attorneys' fees incurred with respect thereto."
After a court trial, the City moved for judgment. The City claimed RPS had no standing to enforce the covenants of the master lease, the lease had been abandoned through termination by the City and acquiescence by BWC, and termination of the master lease terminated the third party beneficiary rights of RPS.[1] The trial court granted the City's motion for judgment. Following the decision in its favor, the City made a motion for attorney fees which the trial court denied. The City appeals.


*379 DISCUSSION
In this attorney fee dispute, we are concerned with an action by a nonsignatory plaintiff against a signatory defendant for breach of contract under a third party beneficiary theory, where the contract includes an attorney fee provision. (1a) The issue on appeal is whether the prevailing signatory defendant under these circumstances is entitled to recover attorney fees from the nonsignatory plaintiff. We conclude it is so entitled.
Attorney fees are not recoverable as costs unless expressly authorized by statute or contract. (Code Civ. Proc., § 1021; Reynolds Metal Co. v. Alperson (1979) 25 Cal.3d 124, 127 [158 Cal. Rptr. 1, 599 P.2d 83].) Where a contract specifically provides for an award of attorney fees incurred to enforce the provisions of the contract, the prevailing party in an action on the contract is entitled to reasonable attorney fees. (Civ. Code, § 1717, subd. (a);[2]Reynolds Metal Co. v. Alperson, supra, 25 Cal.3d at p. 128.) "[I]n an action on a contract between a signatory plaintiff and a signatory defendant to enforce its terms, [Civil Code section 1717] make[s] reciprocal any provision awarding attorney fees regardless of any wording purporting to make the right unilateral." (Wilson's Heating & Air Conditioning v. Wells Fargo Bank (1988) 202 Cal. App.3d 1326, 1332 [249 Cal. Rptr. 553].) (2) As a general rule, attorney fees are awarded only when the action involves a claim covered by a contractual attorney fee provision and the lawsuit is between *380 signatories to the contract. (Super 7 Motel Associates v. Wang (1993) 16 Cal. App.4th 541, 544-545 [20 Cal. Rptr.2d 193].)[3]
Under some circumstances, however, the reciprocity principles of Civil Code section 1717 will be applied in actions involving signatory and nonsignatory parties. (Reynolds Metal Co. v. Alperson, supra, 25 Cal.3d at p. 128.) "Its purposes require [Civil Code] section 1717 be interpreted to further provide a reciprocal remedy for a nonsignatory defendant, sued on a contract as if he were a party to it, when a plaintiff would clearly be entitled to attorney's fees should he prevail in enforcing the contractual obligation against the defendant." (Ibid.)
In Reynolds Metal Co. v. Alperson, supra, plaintiff brought an action against two shareholders and directors of two bankrupt corporations, seeking to hold them personally liable for the debts owed plaintiff by the corporations under a theory that defendants were "alter egos" of the corporations. One of the claims was based on unpaid promissory notes, signed by one corporation and endorsed by the other, which provided for the recovery of collection costs and attorney fees. Defendants had not signed the promissory notes. Defendants prevailed in the action and sought attorney fees pursuant to the terms of the notes. The Supreme Court held that defendants were entitled to recover their attorney fees under the reciprocity requirement of Civil Code section 1717. The Supreme Court reasoned that since plaintiff would have been entitled to recover its fees against defendants had plaintiff prevailed, defendants were likewise entitled to their fees since they had prevailed. The case was remanded for a redetermination of the amount of attorney fees to be recovered.
Reynolds Metal Co. v. Alperson, supra, 25 Cal.3d 124 involved an action by a signatory plaintiff against nonsignatory defendants. Its rationale has also been applied, however, in actions by a nonsignatory plaintiff seeking to enforce a contract against a signatory defendant. (Lewis v. Alpha Beta Co. (1983) 141 Cal. App.3d 29, 33 [189 Cal. Rptr. 840]; Jones v. Drain (1983) 149 Cal. App.3d 484, 487-488 [196 Cal. Rptr. 827]; Manier v. Anaheim *381 Business Center Co. (1984) 161 Cal. App.3d 503, 508 [207 Cal. Rptr. 508]; Leach v. Home Savings & Loan Assn. (1986) 185 Cal. App.3d 1295, 1304-1307 [230 Cal. Rptr. 553]; Brusso v. Running Springs Country Club, Inc. (1991) 228 Cal. App.3d 92, 108-111 [278 Cal. Rptr. 758].)[4]
In Lewis v. Alpha Beta Co., supra, on the basis of their own lease, tenants sued their landlord and a cotenant to enforce a restrictive covenant assumed by the cotenant in its lease for the benefit of plaintiff. Each lease specifically provided for attorney fees. Plaintiffs prevailed against the cotenant. This appellate district held that plaintiffs were entitled to attorney fees under Civil Code section 1717 and the rationale of Reynolds Metal Co. v. Alperson, supra, 25 Cal.3d 124; plaintiffs had enforced the essentially reciprocal restrictive covenants of the two leases, both of which contained mutual attorney fee provisions.
Jones v. Drain, supra, involved an action by a nonsignatory plaintiff against a signatory defendant apparently on a third party beneficiary theory. Sellers entered into a listing agreement with broker for the sale of their home. The listing agreement contained an attorney fee provision. Broker entered into an oral agreement with plaintiff to act as a cooperating broker to find a buyer for sellers' house. After sellers rejected a buyer presented by plaintiff, plaintiff sued sellers for breach of the listing agreement on a third party beneficiary theory. Sellers prevailed. This appellate district held that sellers were entitled to attorney fees under Civil Code section 1717 and the rationale of Reynolds Metal Co. v. Alperson, supra, 25 Cal.3d 124. (Jones v. Drain, supra, 149 Cal. App.3d at pp. 489-490; cf. Steve Schmidt & Co. v. Berry (1986) 183 Cal. App.3d 1299 [228 Cal. Rptr. 689] [cooperating broker sued seller and broker as nonsignatory of listing agreement; prevailing nonsignatory plaintiff entitled to attorney fees against seller].)
Similarly, the appellate court in Manier v. Anaheim Business Center Co., supra, 161 Cal. App.3d at pages 508-509, determined that a nonsignatory plaintiff who sued on a real estate purchase agreement containing an attorney fee provision, and who alleged entitlement to attorney fees under it, was liable for the attorney fees of the prevailing signatory defendant. In Manier, husband and wife sued the seller for breach of the real estate contract seeking specific performance or damages. Husband had signed the agreement, wife had not. The trial court determined the contract had never come *382 into existence and found in favor of seller. Nevertheless, the signatory defendant was awarded attorney fees for prevailing in the action on the contract.
In Leach v. Home Savings & Loan Assn., supra, 185 Cal. App.3d at pages 1306-1307, a nonsignatory plaintiff was the beneficiary of a trust whose assets had been encumbered by a signatory trustee. The promissory note and deed of trust encumbering the trust property contained attorney fee provisions. Plaintiff sued the lender to quiet title and the lender prevailed. The Court of Appeal held the lender was not entitled to attorney fees because plaintiff was not a signatory to the note and deed of trust and would not have been entitled to attorney fees if she had prevailed.[5]
In Brusso v. Running Springs Country Club, Inc., supra, 228 Cal. App.3d 92, nonsignatory shareholders sued signatory defendants on behalf of the signatory corporation. The signatory defendants prevailed and sought attorney fees pursuant to the terms of the contract sued on by plaintiffs. The Court of Appeal found that defendants were entitled to their attorney fees because they would have been liable for such fees if the plaintiffs had prevailed.
Accordingly, in cases involving nonsignatories to a contract with an attorney fee provision, the following rule may be distilled from the applicable cases: A party is entitled to recover its attorney fees pursuant to a contractual provision only when the party would have been liable for the fees of the opposing party if the opposing party had prevailed. Where a nonsignatory plaintiff sues a signatory defendant in an action on a contract and the signatory defendant prevails, the signatory defendant is entitled to attorney fees only if the nonsignatory plaintiff would have been entitled to its fees if the plaintiff had prevailed.
(1b) We now discuss whether a nonsignatory sublessee suing a signatory landlord under a third party beneficiary theory for breach of a lease containing an attorney fee provision would be entitled to attorney fees if the *383 sublessee prevailed in the action. (3) It is settled law that "if a lessor has expressly agreed to a sublease, the sublessee is a third party beneficiary to the implied covenant of quiet enjoyment in the original lease and has the right to go directly against the lessor for its breach." (Marchese v. Standard Realty & Dev. Co. (1977) 74 Cal. App.3d 142, 147 [141 Cal. Rptr. 370].) Where there is a sufficient nexus between the lessor and sublessee, a nonsignatory sublessee is entitled to enforce an attorney fee provision in the lease as a third party beneficiary against a signatory landlord. (In re Vista Medical Investors, Ltd. (Bankr. S.D.Cal. 1989) 98 Bankr. 29, 34;[6]Lewis v. Alpha Beta Co., supra, 141 Cal. App.3d 29, 33; Wilhite v. Callihan, supra, 135 Cal. App.3d 295, 301-302; Saucedo v. Mercury Sav. & Loan Assn., supra, 111 Cal. App.3d 309; but see Super 7 Motel Associates v. Wang, supra, 16 Cal. App.4th at p. 546.)
(1c) Here, the facts establish the following: The lease between the City and BWC specifically provided for the award of attorney fees in an action to enforce the contract; RPS sued the City as a third party beneficiary of the lease for the City's breach; the fees were incurred by the City in an action under the contract; the City was the prevailing party; and RPS was not a signatory to the contract.
Provision 32 of the lease expressly provided for RPS to be the sublessee who would operate the movie theater, thereby establishing a nexus between RPS and the City. Therefore, RPS was entitled to proceed against the City for its claimed breach of the lease. Thus, not only was the City potentially liable for any breaches it might have committed, including costs and attorney fees, but likewise, RPS was liable for costs and attorney fees if it was not successful in proving the City breached the contract. RPS was not successful in proving the City breached the contract. RPS had every right to expect that had it prevailed on the breach of contract claim against the City, it would have been entitled to attorney fees as stated in Provision 55. It is apparent that RPS agreed with this concept, because in the original complaint, it prayed for an award of attorney fees pursuant to the contract. Therefore, under the reciprocity concept embodied in Civil Code section 1717, the City, *384 as the prevailing party, was entitled to an award of reasonable attorney fees against RPS, a nonsignatory plaintiff, who sued under and to enforce the terms of the contract in which RPS was expressly contemplated as a sublessee.[7]

CONCLUSION
As a result of our determination that RPS is responsible for the City's attorney fees associated with defending against RPS's breach of contract claim, we conclude the trial court erred in denying the City's motion for attorney fees. We remand the matter to enable the trial court to determine a reasonable attorney fee award.[8]

DISPOSITION
The order denying the City's motion for attorney fees is reversed. The case is remanded to the trial court to determine a reasonable attorney fee award, both at trial and on appeal. RPS shall bear the City's costs and attorney fees pursuant to Civil Code section 1717 on appeal.
Armstrong, J., and Godoy Perez, J., concurred.
NOTES
[1]  After the trial, the City also moved for dismissal of the case on the ground that it had fully complied with the terms of a settlement agreement negotiated between it and RPS. The trial court apparently granted its motion for dismissal. The statement of decision mentions the City's compliance with a settlement agreement between the parties and indicates that the motion to dismiss is granted. However, neither the minute order nor the judgment mentions that the City's motion to dismiss was granted. In addition, it appears from the record that the settlement agreement was never fully effectuated. One of the contemplated terms of the agreement was that the City would grant and expedite the approval process for permits for the benefit of RPS if RPS abandoned the instant lawsuit. Apparently, performance of this particular provision was never completed. As a result, the case was not settled and the matter proceeded to trial. The settlement agreement provided that the parties would bear their own attorney fees.
[2]  Civil Code section 1717, subdivision (a) reads: "In any action on a contract, where the contract specifically provides that attorney's fees and costs, which are incurred to enforce that contract, shall be awarded either to one of the parties or to the prevailing party, then the party who is determined to be the party prevailing on the contract, whether he or she is the party specified in the contract or not, shall be entitled to reasonable attorney's fees in addition to other costs. [¶] Where a contract provides for attorney's fees, as set forth above, that provision shall be construed as applying to the entire contract, unless each party was represented by counsel in the negotiation and execution of the contract, and the fact of that representation is specified in the contract. [¶] Reasonable attorney's fees shall be fixed by the court, and shall be an element of the costs of suit. [¶] Attorney's fees provided for by this section shall not be subject to waiver by the parties to any contract which is entered into after the effective date of this section. Any provision in any such contract which provides for a waiver of attorney's fees is void."
[3]  Civil Code section 1717, subdivision (b)(1) provides: "The court, upon notice and motion by a party, shall determine who is the party prevailing on the contract for purposes of this section, whether or not the suit proceeds to final judgment. Except as provided in paragraph (2), the party prevailing on the contract shall be the party who recovered a greater relief in the action on the contract. The court may also determine that there is no party prevailing on the contract for purposes of this section." The parties do not contend the trial court exercised its discretion under this subdivision to determine that neither party prevailed on the contract. Accordingly, we do not address this issue. (Cf. Christensen v. Dewor Developments (1983) 33 Cal.3d 778, 786 [191 Cal. Rptr. 8, 661 P.2d 1088]; McLarand, Vasquez & Partners, Inc. v. Downey Savings & Loan Assn. (1991) 231 Cal. App.3d 1450 [282 Cal. Rptr. 828].)
[4]  Other cases involving a nonsignatory plaintiff arise in the peculiar context of an action to prevent foreclosure for nonpayment of a loan and are not directly relevant to the facts of this case. (Saucedo v. Mercury Sav. & Loan Assn. (1980) 111 Cal. App.3d 309 [168 Cal. Rptr. 552]; Wilhite v. Callihan (1982) 135 Cal. App.3d 295, 301-302 [185 Cal. Rptr. 215]; cf. Glynn v. Marquette (1984) 152 Cal. App.3d 277, 282, fn. 6 [199 Cal. Rptr. 306].)
[5]  Leach criticized language in Jones and Manier suggesting an equitable estoppel basis for their holdings. (Leach v. Home Savings & Loan Assn., supra, 185 Cal. App.3d at pp. 1306-1307; accord, Wilson's Heating & Air Conditioning v. Wells Fargo Bank, supra, 202 Cal. App.3d 1326, 1333, fn. 7; Super 7 Motel Associates v. Wang, supra, 16 Cal. App.4th at pp. 548-549.) However, in Jones and Manier, the nonsignatory plaintiffs would have been entitled to attorney fees if they had prevailed in the action on the contract. (Cf. Myers Building Industries, Ltd. v. Interface Technology, Inc. (1993) 13 Cal. App.4th 949, 962, fn. 12 [17 Cal. Rptr.2d 242] [where a plaintiff brings an action on a contract and claims a right to attorney fees, the prevailing defendant is not entitled to its fees on an equitable estoppel theory if the contract does not in fact provide for fees]; Pilcher v. Wheeler (1992) 2 Cal. App.4th 352, 356 [3 Cal. Rptr.2d 533].)
[6]  In In re Vista Medical Investors, Ltd., supra, 98 Bankr. 29, sublessees sought declaratory judgment and full recovery of their attorney fees in connection with a suit to determine the proper interpretation of a rent increase provision in the master ground lease, to which sublessees were not parties. The bankruptcy court determined that sublessees were third party beneficiaries to the contract because they were in a class of persons for whose benefit the contract had been made and a sufficient nexus existed between the lessor and sublessees to entitle sublessees to enforce the attorney fee provision of the ground lease. The bankruptcy court stated that Civil Code section 1717 would allow "a prevailing signatory defendant ... to recover fees against a non-signatory plaintiff but only where the defendant can show it actually would have been liable for fees had it not prevailed." (98 Bankr. at p. 34.)
[7]  We reject RPS's contention that the propriety of the denial of the attorney fee award is dependent upon the reason for the judgment. Any resolution of this action to enforce the original lease agreement must be accompanied by an award of reasonable attorney fees to the prevailing party. This is so whether the judgment is based upon the merits or lack of standing. In addition, we need not be concerned here with an unconsummated settlement agreement which provided that the parties were to bear their own attorney fees. Had the City sued or moved to enforce the settlement agreement, the City would still be entitled to an award of reasonable attorney fees, because the underlying suit was to enforce the lease. Moreover, any lack of standing by RPS to bring the lawsuit does not alter the fact that RPS sued the City to enforce the contract, thereby entitling the prevailing party to its attorney fees.
[8]  We recognize that the issue regarding the payment of fees for Assistant City Attorney Ann H. Higginbotham is unresolved by this decision. Upon remand, the trial court is to determine whether an award of fees for Attorney Higginbotham's work as in-house counsel for the City warrants an award of fees in addition to those reasonably incurred for the services of retained counsel.
