
25 Cal.App.4th 525 (1994)
32 Cal. Rptr. 417
REGIONAL STEEL CORPORATION, Petitioner,
v.
THE SUPERIOR COURT OF SAN DIEGO COUNTY, Respondent; McCARTHY WESTERN CONSTRUCTORS, INC., et al., Real Parties in Interest.
Docket No. D020509.
Court of Appeals of California, Fourth District, Division One.
May 5, 1994.
*526 COUNSEL
Chenen, Cohen & Linden, Scott Richard Lord and Paul Simon Leevan for Petitioner.
No appearance for Respondent.
Robie & Matthai, Edith R. Matthai and Pamela E. Dunn for Real Parties in Interest.
OPINION
WORK, Acting P.J.
Regional Steel Corporation (Regional) petitions for a writ of mandate after the court denied its motion for summary judgment in *527 this action arising from injuries to an ironworker. Regional, a subcontractor, was named in a cross-complaint for equitable indemnity, comparative contribution and declaratory relief by the general contractor after the ironworker sued the general contractor. Regional contends it was entitled to summary judgment because principles of equitable or comparative indemnity are inapplicable when parties have an express indemnity agreement. We agree and grant the petition.

FACTUAL AND PROCEDURAL BACKGROUND
McCarthy Western Constructors, Inc. (McCarthy) was the general contractor in a project to build a science building on the University of California, San Diego campus. Under a subcontract with McCarthy dated April 24, 1991, Regional agreed to supply and install reinforcing bar in the project. The "Insurance and Indemnity" section of the subcontract originally provided in part: "5.6 To the fullest extent permitted by law, Subcontractor agrees to indemnify and hold harmless McCarthy, the Owner, the Architect and all of their agents, officers and employees from and against all claims, damages, losses and expenses, including but not limited to attorney's fees and court costs, arising out of or resulting from the performance, or failure in performance, of Subcontractor's Work and obligations as provided in the Contract Documents, including any extra Work, and from any claim, damage, loss or expense which (1) is attributable to bodily injury, sickness, disease, death, injury to or destruction of tangible property (other than the Work itself) including the loss of use resulting therefrom, and (2) is caused in whole or in part by any acts, omissions or negligence of Subcontractor or anyone directly or indirectly employed by Subcontractor or anyone for whose acts Subcontractor may be liable regardless of whether it is caused in part by the acts, omissions or negligence of a party indemnified hereunder. Such obligations shall not be constituted to negate, abridge, or otherwise reduce any other right or obligation of indemnity which would otherwise exist as to any party or person described in this Paragraph 5.6." The parties later amended their agreement to provide: "Article 5.6: REGIONAL STEEL CORPORATION will indemnify others only to the extent that damage is caused in whole by any negligent act or omission by anyone directly employed by or under the control of REGIONAL STEEL CORPORATION."
On August 5, 1992, Michael DeLaura (DeLaura) filed a complaint for negligence against McCarthy and others,[1] alleging he was injured after being knocked from a truck by McCarthy's crane while unloading rebar. McCarthy *528 cross-complained against Regional for equitable indemnity, comparative contribution and declaratory relief on December 18, 1992.[2]
Regional moved for summary judgment (Code Civ. Proc., § 437c) on the grounds it was not a joint tortfeasor and thus could not be subject to a claim for comparative equitable indemnity. Regional lodged a copy of the subcontract and amendment with its motion. McCarthy opposed the motion, arguing triable issues exist whether Regional properly supervised the work, whether Regional properly bundled, loaded and transported the rebar and whether Regional failed to conduct a required safety program.
In reply, Regional argued it was also entitled to summary judgment because McCarthy did not dispute the existence of the subcontract or the existence of the express indemnity clause, which precluded McCarthy from seeking liability on principles of equitable indemnity. McCarthy in turn responded it could pursue Regional under either or both theories of equitable and contractual indemnity and it had not yet been determined if the express indemnity clause applied to DeLaura's claim.
The court denied the motion for summary judgment on January 18, 1994, stating it had "determined that there are triable issues of fact as to the degree of negligence, if any, by Regional and McCarthy. Therefore, it has not been established that the accident was not the result of Regional's sole negligence. As a result, it has not been established as a matter of law that Regional has no liability for indemnity under its contract or otherwise." Regional petitioned to this court. Following McCarthy's response, we stayed the trial set for May 13.

DISCUSSION
"Indemnity may be defined as the obligation resting on one party to make good a loss or damage another party has incurred.... This obligation may be expressly provided for by contract ..., it may be implied from a contract not specifically mentioning indemnity, or it may arise from the equities of particular circumstances." (Rossmoor Sanitation, Inc. v. Pylon, Inc. (1975) 13 Cal.3d 622, 628 [119 Cal. Rptr. 449, 532 P.2d 97], citations omitted.) (1) Express indemnity and implied indemnity are subject to their own distinctive legal rules and limitations. "Those [rules] governing so-called `express' indemnity reflect its contractual nature, permitting great freedom of action to the parties in the establishment of the indemnity *529 arrangements while at the same time subjecting the resulting contractual language to established rules of construction." (Fn. omitted.) (E.L. White, Inc. v. City of Huntington Beach (1978) 21 Cal.3d 497, 507 [146 Cal. Rptr. 614, 579 P.2d 505].) "Where ... parties have expressly contracted with respect to the duty to indemnify, the extent of that duty must be determined from the contract and not by reliance on the independent doctrine of equitable indemnity." (Rossmoor Sanitation, Inc. v. Pylon, Inc., supra, 13 Cal.3d, 622, 628.)
Here, the April 24, 1991, subcontract between McCarthy and Regional contained an express indemnity clause requiring Regional to indemnify McCarthy and others where the loss or damage was "caused in whole or in part" by Regional, its employees, or certain others under Regional's control. McCarthy and Regional later made several "Clarifications to Subcontract" including changing the indemnity clause to provide Regional would indemnify others "only to the extent that damage is caused in whole by any negligent act or omission by anyone directly employed by or under the control" of Regional. (Italics added.) (2) The "caused in whole" indemnity clause precludes joint tortfeasor liability. By contract, McCarthy bargained away its right to pursue Regional on equitable indemnity grounds. Because Regional's duty is limited by contract and McCarthy did not sue on the contract, Regional was entitled to summary judgment.[3]
As Regional's entitlement to relief is extraordinarily clear, a peremptory writ in the first instance is proper. (Code Civ. Proc., § 1088; Alexander v. Superior Court (1993) 5 Cal.4th 1218, 1222 [23 Cal. Rptr.2d 397, 859 P.2d 96]; Ng v. Superior Court (1992) 4 Cal.4th 29, 35 [13 Cal. Rptr.2d 856, 840 P.2d 961].)

DISPOSITION
The petition is granted. The stay issued on April 7, 1994, is vacated upon issuance of the remittitur.
Todd, J., and Nares, J., concurred.
NOTES
[1]  DeLaura also named McCarthy Crane Company and Allan L. Rondo, the alleged crane operator. We omit the other named defendants as unnecessary to our discussion.
[2]  McCarthy also cross-complained against another entity, Reinforcing Post Tensioning Services, Inc., for express indemnity and breach of contract. Because Reinforcing Post Tensioning Services, Inc. is not a party to this petition, we omit its procedural history.
[3]  We do not comment on a possible claim by McCarthy for express contractual indemnity.
