
    NATIONAL UNION FIRE INSURANCE COMPANY OF PITTSBURGH, PENNSYLVANIA, Plaintiff-Appellant, v. ENGINEERING-SCIENCE, INC.; Edward B. Thornton and Does 1 through 5, Defendants-Appellees. NATIONAL UNION FIRE INSURANCE COMPANY OF PITTSBURGH, PENNSYLVANIA, Plaintiff-Appellee, v. ENGINEERING-SCIENCE, INC.; Edward B. Thornton and Does 1 through 5, Defendants-Appellants.
    Nos. 88-1511, 88-2601.
    United States Court of Appeals, Ninth Circuit.
    Argued and Submitted June 28, 1989.
    Decided Sept. 6, 1989.
    
      John B. Hook, Long & Levit, San Francisco, Cal., for plaintiff-appellant-eross-ap-pellee.
    Duane W. Grummer, William A. Bogdan, Lynch, Loofbourrow, Helmenstine, Gilardi & Grummer, San Francisco, Cal., for defendants-appellees-cross-appellants.
    Before WALLACE, POOLE and HALL, Circuit Judges.
   POOLE, Circuit Judge:

In August 1981 the Monterey Regulatory Water Pollution Control Agency (the Agency) contracted with Engineering-Science Inc. (ESI) for the design of an ocean sewer outfall pipeline (the Master Agreement). The pipeline consisted of a concrete pipe covered with “armor rock” which extended from the shore of Monterey Bay into the Pacific Ocean. ESI was insured against liability for professional negligence through an errors and omissions policy with National Union Fire Insurance Company (National Union) up to a limit of $1 million. It also carried several million dollars worth of excess liability insurance with Lexington and Granite State.

In February 1982 the Agency awarded the contract for construction of the pipeline to Peter Kiewit & Sons (Kiewit), a general contractor. Pursuant to the terms of their agreement, Kiewit obtained a builder’s risk insurance policy for the project from National Union, listing itself and the Agency as insureds. Later that year, the pipeline sustained extensive damage due to storms off the Monterey coast. National Union was required to pay over $4 million in repairs under the builder’s risk policy.

National Union, a Pennsylvania corporation with its principal place of business in New York, brought a subrogation action against ESI, a California corporation with its principal place of business in California, and its employee Edward B. Thornton, in the district court based on diversity of citizenship. 28 U.S.C. § 1332. The complaint alleged that the storm damage to the pipeline was the result of ESI’s and Thornton’s negligent design and sought recovery for the losses paid out under the builder’s risk policy.

ESI moved for summary judgment arguing that the action was barred because ESI was insured by National Union and an insurance company cannot bring a subrogation action against its own insured. After two hearings on the matter, District Judge Spencer Williams granted the motion in a published opinion holding that public policy concerns prohibit an insurance company from asserting the subrogated claims of one of its insureds against another of its policy holders. Nat’l Union Fire Ins. Co. v. Engineering-Science, Inc., 673 F.Supp. 380 (N.D.Cal.1987).

ESI then moved for attorney’s fees pursuant to the Master Agreement. The Master Agreement, the contract between the Agency and ESI for design of the pipeline, provided that:

[I]f any legal action is necessary to enforce or interpret the terms or provisions of this Master Agreement and project assignments thereto, and the respective rights and duties of the parties hereunder, the prevailing party shall be entitled to reasonable attorney’s fees in addition to any other relief to which he may be entitled.

District Judge William Ingram denied the motion, holding that the attorney’s fees provision in the Master Agreement did not apply because National Union’s suit was based on a negligence and not a contract claim.

National Union appeals the district court’s grant of defendants’ summary judgment motion and ESI appeals the denial of its request for attorney’s fees. Both parties timely appealed the final orders of the district court and we have jurisdiction under 28 U.S.C. § 1291. The two appeals are consolidated before this court.

I.

National Union argues that the district court erred in granting ESI’s summary judgment motion on the ground that an insurance company may not pursue a subrogation action against its own insured. We review a grant of summary judgment de novo. Darring v. Kincheloe, 783 F.2d 874, 876 (9th Cir.1986). Because this case arose under the district court’s diversity jurisdiction, the law of California applies. Erie R.R. Co. v. Tompkins, 304 U.S. 64, 58 S.Ct. 817, 82 L.Ed. 1188 (1938); Byrd v. Blue Ridge Rural Electric Cooperative, Inc., 356 U.S. 525, 78 S.Ct. 893, 2 L.Ed.2d 953 (1958).

No California court has addressed the precise issue presented here: whether an insurer, claiming subrogation for amounts paid an insured under one policy, is barred from suing a third party whom it has also insured under a separate policy. However, in St. Paul Fire & Marine Ins. Co. v. Murray Plumbing & Heating Corp., 65 Cal.App.3d 66, 135 Cal.Rptr. 120 (Ct.App.1976), a California court of appeals confronted a closely related question. In that case, an insurer brought a subrogation action against a subcontractor for losses paid to the general contractor under a builder’s risk policy. Holding that the subcontractor was a co-insured under the policy, the court concluded that the insurance company was barred from subrogating against its own insured for a loss it had insured against.

We agree with the analysis in Judge Williams’ opinion and conclude in light of the decision in Murray Plumbing that the California courts would probably bar a sub-rogation action by an insurance company against its own insured under the circumstances presented here.

II.

ESI appeals the district court’s denial of its request for attorney’s fees pursuant to the Master Agreement. To the extent that the availability of attorney’s fees depends upon an analysis of the contractual language, we review the district court’s decision de novo. Any factual conclusions relating to the request for attorney’s fees, however, will not be reversed unless clearly erroneous. Miller v. Safeco Title Ins. Co., 758 F.2d 364 (9th Cir.1985).

The Master Agreement provides for attorney’s fees for the prevailing party in any action “necessary to enforce or interpret [its] terms or provisions.” The district court concluded that the subrogation action brought by National Union sounded wholly in tort and that therefore, the provision for fees in the agreement did not apply.

Relying on Perry v. Robertson, 201 Cal. App.3d 333, 247 Cal.Rptr. 74 (Ct.App.1988), ESI contends that contractual attorney’s fees may be awarded in a negligence action. In Perry, the only question facing the court was whether the plaintiff in fact properly pleaded a contract claim and pursued a remedy consistent with that claim. It concluded that it had done so and therefore was entitled to attorney’s fees under the contract. In this case, by contrast, the complaint sounds wholly in tort and does not seek to enforce or interpret the terms of the Master Agreement. National Union did not choose to pursue any contractual claims or remedies. That it might have chosen to do so if the case had proceeded on the merits is irrelevant now.

ESI asserts that National Union should be bound by the attorney’s fees provision because it has used the Master Agreement as both “a sword and a shield” by citing the Agreement several times its papers opposing the summary judgment motion. In making these references, however, National Union was only concerned with establishing the insurance relationships between the parties, not in proving its underlying case. Such incidental references do not change the nature of the underlying action. Because National Union’s complaint alleges only tort claims, the district court properly concluded that the attorney’s fees provision in the Master Agreement does not apply.

III.

For the foregoing reasons, the district court’s orders granting ESI’s summary judgment motion and denying ESI’s motion for attorney’s fees are AFFIRMED.  