
19 Cal.App.3d 277 (1971)
96 Cal. Rptr. 669
THE PEOPLE ex rel. DEPARTMENT OF PUBLIC WORKS, Cross-complainant and Appellant,
v.
DALY CITY SCAVENGER COMPANY, Cross-defendant and Respondent.
Docket No. 27826.
Court of Appeals of California, First District, Division Two.
August 16, 1971.
*279 COUNSEL
Harry S. Fenton, John P. Horgan, Robert J. DeFea, James T. Johnson and William R. Edgar for Cross-complainant and Appellant.
Ropers, Majeski, Kohn, Bentley & Wagner and Michael J. Brady for Cross-defendant and Respondent.
OPINION
KANE, J.
This case presents two questions: First, whether an express contract of indemnity necessarily negates the assertion of a right to implied equitable indemnity; and second, if not, whether the indemnity claimant in the instant case is entitled to such indemnity as a matter of law.
The State of California ("State") appeals from a judgment in declaratory relief denying its claim for recovery of indemnity from Daly City Scavenger Company ("Company"). Neither party disputes the findings of fact, which may be summarized as follows:
In 1957, State closed a portion of the Old Coast Highway located in San Mateo County to general public travel by placing hinged fence gates at two points labeled Stations 255 + 08 (southerly) and 362 + 70 (northerly). State owned all real property on which the highway was located; Company *280 owned real property adjacent to and along both sides of the highway north and south of the southerly fence gate.
In order to provide Company with access to its property located within the barricaded highway, State and Company entered into a written agreement dated February 24, 1960. Said agreement provided for Company to receive keys to the gate locks, but for Company to indemnify State for injury to any person using the barricaded portion of the highway pursuant to the purposes of the agreement, but not to indemnify State for injury to any individual using the highway for his own purposes or not pursuant to the agreement or business of Company. The agreement further provided that "the restricted use contemplated by this agreement" extended only to the area between the two fence gates.
Subsquent to execution of this agreement, Company erected a chain barrier across the highway south of State's southerly fence gate at a location labeled Station 235 + 28. State knew said chain barrier existed, and its agents entered through the barrier to accomplish State's purposes. On July 11, 1963, two individuals were killed when a motorcycle on which they were riding collided with the chain barrier. Both individuals were using the highway for their own purposes and not pursuant to Company permission or business.
Wrongful death actions thereafter filed against State and Company were settled by payments of $62,500 by State and $91,250 by Company. State sought to recover its payment (plus attorney's fees) from Company by cross-complaint for declaratory relief. Judgment denying State's claim forms the basis of the present appeal.

Is State precluded from seeking implied equitable indemnity?
(1) The rule is established that where parties expressly contract with respect to indemnity, the extent of the indemnitor's duty is "determined from the contract and not from the independent doctrine of equitable indemnity." (Markley v. Beagle (1967) 66 Cal.2d 951, 961 [59 Cal. Rptr. 809, 429 P.2d 129], quoted with approval in Price v. Shell Oil Co. (1970) 2 Cal.3d 245, 256 [85 Cal. Rptr. 178, 466 P.2d 722]; Burlingame Motor Co., Inc. v. Peninsula Activities, Inc. (1971) 15 Cal. App.3d 656, 662 [93 Cal. Rptr. 376].) The trial court relied upon this rule to hold that inclusion of all rights to indemnity in the parties' express contract precluded State from seeking implied equitable indemnity from Company.
The application of this rule, however, necessarily depends upon whether the contract, construed as a whole, was intended to convey indemnification *281 rights with respect to the particular occurrence at issue. (County of Alameda v. Southern Pac. Co. (1961) 55 Cal.2d 479, 488 [11 Cal. Rptr. 751, 360 P.2d 327]; Atchison, T. & S.F. Ry. Co. v. James Stewart Co. (1966) 246 Cal. App.2d 821, 828 [55 Cal. Rptr. 316].) The indemnity provision of each contract in the above cases, as well as in those cited by Company, clearly encompassed the transaction giving rise to the claim of indemnity. (2) But the indemnity provisions of the agreement in the present case, as the trial court found and State now acknowledges, clearly were not intended to apply to the incident which resulted in the wrongful death actions.
Indeed, that incident occurred at a geographical location well removed from the area expressly covered by the agreement, was only remotely related to the subject matter of the agreement, and therefore should not be considered included within the scope of the indemnity obligations of the agreement. It follows that although State was not entitled to express or implied contractual indemnity, the trial court erred in holding that the parties' contract precluded appellant from seeking implied equitable indemnity.[1]

Is State entitled to implied equitable indemnity?
(3) The right to such type of indemnity depends upon an equitable consideration of the difference between primary and secondary liability: it "inures to a person who, without active fault on his part, is compelled by reason of legal obligation or relationship to pay damages which have been caused by the acts of another." (Pearson Ford Co. v. Ford Motor Co. (1969) 273 Cal. App.2d 269, 272 [78 Cal. Rptr. 279]; Barth v. B.F. Goodrich Tire Co. (1971) 15 Cal. App.3d 137, 143 [92 Cal. Rptr. 809], hg. den.; Card Constr. Co., Inc. v. Ledbetter (1971) 16 Cal. App.3d 472, 477-478 [94 Cal. Rptr. 570], hg. den.; Molinari, Tort Indemnity in California (1968) 8 Santa Clara Law. 159, 165; Witkin, Summary of Cal. Law (1969 Supp. to Vols. 1, 2) Torts § 22A, pp. 503-504 and cases cited.) (4) Such indemnification requires an indemnity claimant to prove that (1) the damages sought to be shifted were imposed as a result of a legal obligation owed to the injured party, and (2) the indemnity claimant did not actively or affirmatively participate in the wrongdoing. (Pearson Ford Co. v. Ford Motor Co., supra, 273 Cal. App.2d at pp. 272-273; Sammer v. Ball (1970) 12 Cal. App.3d 607, 610 [91 Cal. Rptr. 121].)
*282 (5a) Although the determination of whether indemnity should be allowed depends upon the facts of each case (Herrero v. Atkinson (1964) 227 Cal. App.2d 69, 74 [38 Cal. Rptr. 490, 8 A.L.R.3d 629], quoted with approval in Sammer v. Ball, supra, at p. 610), each party herein contends that the record supports its position as a matter of law.
(6) Considering the first of the two requirements for equitable indemnity described, supra, State was subjected to payment of damages as a result of a legal obligation owed to injured parties. State acknowledges its liability for injuries caused by the dangerous condition of the highway. (Gov. Code, § 835.) The records on appeal establish that defense of the wrongful death actions was tendered to Company by State but refused by Company and that said actions were thereafter settled. A good faith settlement of an action after refusal of a tendered defense entitles a party to seek indemnity. (Safeway Stores, Inc. v. Massachusetts Bonding & Ins. Co. (1962) 202 Cal. App.2d 99, 115, 117 [20 Cal. Rptr. 820].)
(5b) As to the second requirement for implied equitable indemnity, it appears as a matter of law that State affirmatively participated in the wrongdoing to an extent which precludes it from recovering from Company. State accepts without dispute a finding of fact by the trial court that subsequent to Company's construction of the chain barrier and prior to the incident resulting in the deaths, State "had knowledge of the existence of the barrier ... [and] used said barrier through State's agents, in that State entered through, locked and unlocked said barrier in order to accomplish State's own purposes."
State relies upon cases in which the indemnity claimant failed to discover a dangerous condition (Markley v. Beagle, supra, 66 Cal.2d at p. 956; J.A. Payton v. Kuhn-Murphy, Inc., supra, 253 Cal. App.2d at p. 282), or the court expressly declined to consider acquiescence as affirmative conduct (County of Alameda v. Southern Pac. Co., supra, 55 Cal.2d at pp. 485-486), or the claimant apparently possessed mere constructive notice of a dangerous condition (City & County of S.F. v. Ho Sing (1958) 51 Cal.2d 127, 130, 138 [330 P.2d 802]; Reinach v. City & County of San Francisco (1958) 164 Cal. App.2d 763, 766-767, 769 [331 P.2d 1006]), or the claimant of contractual indemnity obtained a letter guaranteeing the absence of a dangerous condition (Safeway Stores, Inc. v. Massachusetts Bonding & Ins. Co., supra, 202 Cal. App.2d at pp. 107, 111), or the claimant was not alleged to have possessed knowledge of a dangerous condition. (Alisal Sanitary Dist. v. Kennedy (1960) 180 Cal. App.2d 69 [4 Cal. Rptr. 379].)
The conduct by the claimants in these cases is readily distinguishable from that of State in the present case. Not only did State possess actual *283 knowledge and acquiesce in the existence of the dangerous chain barrier, but its agents made affirmative use of the barrier in order to accomplish State's purposes. (Cf. Rest., Restitution, § 95.) Such conduct constitutes the type of active participation in wrongdoing which as a matter of law prevents State from receiving implied equitable indemnity from Company. (See Barth v. B.F. Goodrich Tire Co., supra, 15 Cal. App.3d at pp. 144-145; also, Marincovich v. Oriana, Inc. (1970) 13 Cal. App.3d 146, 162-163 [91 Cal. Rptr. 417], hg. den.)
The judgment is affirmed.
Shoemaker, P.J., and Taylor, J., concurred.
A petition for a rehearing was denied September 15, 1971, and appellant's petition for a hearing by the Supreme Court was denied October 6, 1971.
NOTES
[1]  Construction of an indemnity provision of a contract requires the same determination of the parties' intent as provisions in other contracts (J.A. Payton v. Kuhn-Murphy, Inc. (1967) 253 Cal. App.2d 278, 281 [61 Cal. Rptr. 575]; see also Civ. Code, § 2778) and, when accomplished by the trial court without the aid of extrinsic evidence, constitutes a question of law for this court. (Price v. Shell Oil Co., supra, 2 Cal.3d at p. 256.)
