
    CITY OF GRANDVIEW, MISSOURI, Appellant, v. Thomas E. HUDSON and Kathlyn Hudson, as Trustees for Sanitary Systems, Inc., a Dissolved Corporation, Thomas E. Hudson and Kathlyn Hudson, Appellees. AMERICAN SURETY COMPANY OF NEW YORK, Appellant, v. CITY OF GRANDVIEW, MISSOURI, Appellee.
    Nos. 18646, 18647.
    United States Court of Appeals Eighth Circuit.
    May 24, 1967.
    
      See also 8 Cir., 377 F.2d 698.
    Donald G. Stubbs, Kansas City, Mo., for American Surety Co. of New York; Thomas D. Kelley, Kansas City, Mo., on the brief.
    Henry H. Fox, Jr., Kansas City, Mo., for Thomas E. Hudson et al.
    Roger W. Penner, Kansas City, Mo., for City of Grandview, Mo. and James C. Morris, Kansas City, Mo., on the brief.
    Before MATTHES, MEHAFFY and LAY, Circuit Judges.
   MATTHES, Circuit Judge.

The questions for determination in these appeals stem from prior litigation between the parties hereto, and the ensuing judgment of the United States District Court in American Surety Co. of New York v. City of Grandview, Missouri, aff’d sub nom. Sanitary Systems, Inc. v. American Surety Co. of New York, 331 F.2d 438 (8th Cir. 1964) (No. 17,479) These appeals are from a judgment in favor of the City and against American for Attorney fees incurred by the City in the prior litigation.

The essential facts which precipitated the original lawsuit instituted by American on April 26, 1963 are stated in our opinion in No. 17,479 and need not be reiterated in detail. In brief, a dispute developed in connection with the construction of a sewer system in the City of Grandview. Sanitary Systems, Inc. was the general contractor, Midland Engineering Company was Sanitary’s subcontractor and American was the surety on Sanitary’s performance and payment bond.

In the first trial, Counts I, III and VI of American’s complaint were litigated and adjudicated. Two remaining issues, which had not been disposed of in the first trial were tried before the court. These issues were (a) the City’s claim for attorney fees incurred during the defense of American’s lawsuit, and (b) American’s right to indemnity against Sanitary, Midland Engineering, Thomas E. Hudson and Kathlyn Hudson, as presented in Count V of the original complaint.

The district court, in concluding that American was required to reimburse the City for the amounts expended by it for attorney fees, rejected the latter’s contention that under the provisions of the construction contract with Sanitary, in particular Section GC-29, both Sanitary and American were responsible for payment of the fees. The court found, however, that under equitable principles, “in order to balance the benefits between these parties,” the City was entitled to reimbursement for its attorney fees solely from American. Judgment was rendered accordingly, and both the City and American have appealed.

The City defends the judgment, but asserts that it is entitled to recover its attorney fees from both American and appellees in No. 18,646 by virtue of the indemnifying provisions of the contract.

On the other hand, American takes the position that it is not obligated for the City’s attorney fees either on equitable principles or by reason of the provisions of the contract or the bond, which incorporated the contract.

We have concluded that the court reached the right result but that it applied the wrong theory or test as a basis for that result.2

The law is well settled that in the absence of a statute or contract providing for their allowance attorney fees are normally not recoverable by the prevailing party. As the Supreme Court observed, however, in Fleischmann Distilling Corp. v. Maier Brewing Co., 386 U.S. 714, 87 S.Ct. 1404, 18 L.Ed.2d 475 (1967), there are exceptions to this general proposition. It has been recognized that attorney fees may be recovered by the prevailing party when a court of equity determines that their allowance is necessary in order to balance the interests of the respective parties. Duncan v. Townsend, 325 S.W.2d 67, 71 (Mo.Ct.App.1959); Allstate Insurance Co. v. Hartford Accident & Ind. Co., 311 S.W.2d 41, 48 (Mo.Ct.App.1958); cf. State ex rel. Moore v. Morant, 266 S.W.2d 723, 727 (Mo.Ct.App.1954). We deem it unnecessary to deal at length with the “balancing of interests” theory upon which the district court relied. We find no factual basis for application of this doctrine in the present case. The events discussed in our prior opinion, which culminated in an action by American, do not, considered in their totality, warrant the invocation of equitable principles and the assessment of attorney fees for the purpose of adjusting the interests between the parties. Beyond dispute there were genuine fact questions which were raised by the pleadings and resolved by the court. In our view there was ample justification for American to seek an adjudication of the rights and obligations of the parties under the contract.

Our holding does not, of course, relieve Sanitary and American from their contractual obligation, if any, to reimburse the City for attorney fees. The crucial question for decision is whether under the provisions of the bond and contract an obligation arose on the part of Sanitary and American to reimburse the City for the attorney fees, it had expended in connection with the first trial and appeal.

The bond was conditioned on the basis that the contractor would “faithfully observe, perform and abide by each and every covenant, condition and part of said contract.” Section GC-29 of the contract provides in pertinent part:

“In case any action at law or suit in equity is brought against the Owner [City] * * * for or on account of the failure, omission, or neglect of the Contractor to do and perform any of the covenants, acts, matters, or things by this contract undertaken to be done or performed, or for the injury or damage caused by the negligence or alleged negligence of the Contractor or his subcontractors or his or their agents, or in connection with any claim based on the lawful demands of subcontractors, workmen, material men, or suppliers of machinery and parts thereof, equipment, power tools, and supplies incurred in the fulfillment of this contract, the Contractor shall indemnify and save harmless the Owner * * * of and from all losses, damages, costs, expenses, judgments, or decrees whatever arising out of such action or suit that may be brought as aforesaid.”

Concededly, the bond and contract must be construed together. See Dale Benz, Inc., Contractors v. American Casualty Co., 303 F.2d 80, 85 (9th Cir. 1962). The lower court interpreted GC-29 as applicable only to actions brought against the City by persons who may have a cause of action arising out of the performance of the contract and who join the City as a party, such as material men, laborers, or other third parties who have any cause of action arising out of the performance of the contract. GC-29 is designed not only to encompass actions envisioned by the court, but as we interpret that section, its indemnity provisions apply to any action brought against the City “for or on account of the failure, omission or negligence of the Contractor to do or perform any of the covenants, actions, matters, or things by this contract undertaken to be done or performed * * (Emphasis added.)

Clearly American instituted its action against the City in order to determine its liability under the bond as the result of Sanitary’s failure to complete its work under the contract. We believe the contract contemplates such an action. GC-29 by its plain terms is an indemnifying agreement. So viewed, there is sound authority that the indemnitee, the City, is entitled to recover from the indemnitors, as a part of its damages, reasonable attorney fees which City incurred in defending a suit brought against it in reference to the matters against which it was indemnified. This is so even though the indemnity agreement does not specifically include or mention “attorney fees.” Cf. Moses-Ecco Company v. Roscoe-Ajax Corporation, 115 U.S.App.D.C. 366, 320 F.2d 685, 690 (1963); General Acc. F. & L. Assur. Corp., Ltd. v. Smith & Oby Co., 272 F.2d 581, 586, 77 A.L.R.2d 1134 (6th Cir. 1959); Frommeyer v. L. & R. Construction Co., 261 F.2d 879, 881, 69 A.L.R.2d 1040 (3rd Cir. 1958); B & G Electric Company v. G. E. Bass & Company, 252 F.2d 698, 701 (5th Cir. 1958), cert. denied, 357 U.S. 931, 78 S.Ct. 1372, 2 L.Ed.2d 1371 (1958); Epley v. S. Patti Construction Company, 228 F.Supp. 1, 5-6 (N.D.Iowa 1964), rev’d on other grounds, 342 F.2d 830 (8th Cir. 1965); Mason v. City of Albertville, 276 Ala. 68, 158 So.2d 924 (1963); Mundy v. Knutson Construction Company, 156 Tex. 211, 294 S.W.2d 371, 373-74 (1956).

We are convinced on the basis of the prior litigation, the provisions of the contract, the bond and the applicable law that the City is entitled to recover the .amounts it expended as attorney fees :from both Sanitary and American. Inasmuch as the district court rendered judgment only against American, the judgment appealed from is modified in accordance with our holding and, as modified, the judgment is affirmed. 
      
      . The name of American Surety Company was changed to Transamerica Insurance Company during the pendency of the action in the district court. We will in the interest of brevity refer to the surety company as American.
     
      
      . The court determined this issue in favor of American and that judgment is the subject of appeal No. 18,640, Hudson v. American Surety Company of New York, 377 F.2d 698 (8th Cir. 1967), decided contemporaneously with these appeals.
     
      
      . It is settled law that a judgment of the district court, if correct, should be sustained even though the court may have based its judgment upon an erroneous theory. Barunica v. United Hatters, Cap and Millinery Workers, Local Number 55, 321 F.2d 764, 765-766 (8th Cir. 1963); State Mutual Life Assur. Co. v. Fleischer, 186 F.2d 358, 364 (8th Cir. 1951).
     