
219 Cal.App.2d 235 (1963)
WESTERN GULF OIL COMPANY, Plaintiff and Appellant,
v.
OILWELL SERVICE COMPANY, Defendant and Respondent.
Civ. No. 213. 
California Court of Appeals. Fifth Dist.  
Aug. 12, 1963.
 Mack, Bianco, King & Eyherabide, Joseph F. Noriega and Robert Anspach for Plaintiff and Appellant. *237
 McCormick, Barstow, Sheppard, Coyle & Best and William B. Boone for Defendant and Respondent.
 BROWN (R.M.), J.
 This is an appeal from a judgment of dismissal entered pursuant to an order sustaining a general demurrer without leave to amend interposed by defendant to first amended complaint which asked for declaratory decree determining the rights and duties of the plaintiff and defendant regarding an indemnity clause contained in a written contract, and for damages.
 The plaintiff had engaged defendant, an independent contractor, by a written agreement, to redrill one of plaintiff's oil wells. Attached to the complaint was a copy of a personal injury complaint brought by three employees of defendant as the result of an accident in which they sued plaintiff, one Joe Beckett, San Joaquin Fishing Tool, a corporation, and one Daniel Pilgrim, alleging that the accident was caused by the negligence of the plaintiff, Western Gulf Oil Company, its employee, Joe Beckett, the San Joaquin Fishing Tool company, and its employee, Daniel Pilgrim.
 Plaintiff requested defendant to defend the personal injury suit in its behalf and indemnify it for all costs and expenses, basing its entitlement thereto on the statement that a real controversy exists regarding the agreement in that the defendant denies that it is bound by said agreement and would not defend or indemnify the plaintiff or satisfy any judgments, and plaintiff requested that the court declare the rights and liabilities of the parties by interpreting the agreement, and prayed for damages resulting from the breach according to proof.
 Upon hearing on a general demurrer to the original complaint the matter was thoroughly briefed in the trial court by both parties, and the court determined by a written memorandum that the contract was clear and unambiguous, did not require extrinsic evidence for its interpretation, and that as a matter of law, indemnity was not available to the plaintiff. However, it did permit plaintiff to amend. The first amended complaint was thereupon filed in substantially the same language as the original insofar as the indemnity provisions are concerned, but did add that the plaintiff might have some liability in the personal injury action by reason of Labor Code sections 6400-6405. The demurrer was sustained without leave to amend. *238
 The first amended complaint incorporated by reference a copy of the personal damage complaint; alleged that the employees of plaintiff were not in control of any equipment or operations but that the employees of defendant were in control, that plaintiff was not negligent in any way, that it "may be found" liable by reason of the Labor Code sections cited above, that such liability would be based on passive negligence rather than active negligence; denied any negligence on its part or on the part of its employees; alleged that plaintiff requested defendant to defend it and that the request had been refused; that as a result of such refusal, costs would be incurred in an unknown amount; alleged that a real controversy exists as to the legal interpretation of the agreement as to whether or not the defendant is required to defend or indemnify. The complaint further set forth that the defendant is an independent contractor and that plaintiff retained no right of control or direction over defendant or its employees.
 The controversial indemnity clauses are as follows:
 "2. Contractor's General Undertaking."
 "At the sole risk and expense of Contractor [defendant], Contractor shall supply all labor, drilling tools, cable, machinery and all other appliances except such as Owner is herein specifically required to furnish, necessary for the skillful and efficient performance of Contractor's duties, obligation and engagements herein provided, shall prosecute and conduct operations hereunder actively and continuously to completion, shall perform, with diligence and dispatch and in a workmanlike manner, each and every of the acts specified on the Contractor's part to be done or performed, and shall assume and bear all risk of accidents and damages to persons and property which may occur in the course of such operation. Contractor shall at all times observe and comply with the State and Federal laws and rules and regulations of the authorities thereof in the performance of this agreement." (Italics ours.)
 "5. Insurance."
 "To carry adequate Compensation, Public Liability, and Employers' Liability Insurance, to comply with the laws of the United States and the State wherein this agreement is to be performed, and save harmless and indemnify the Owner from all liability of every kind, either to person or property, incurred during the performance of this contract by the Contractor." (Italics ours.) *239
 The charging allegation set forth in the complaint for personal injuries brought by the employees against the plaintiff and others reads as follows:
 "That on or about April 29, 1960, Daniel Pilgrim was operating controls for a fishing job at the aforesaid Fruitvale lease and Joe Beckett gave him instructions and directions for the operation of the controls for a fishing job and Daniel Pilgrim negligently and carelessly engaged a clutch so as to turn a rotary table of a drilling rig of the Oil Well Service Company and Joe Beckett gave him the directions to turn the rotary table on the drilling rig of the Oil Well Service Company and did so negligently and carelessly so as their concurrent negligence injured John Argain, Jesse Hamblin and James Rowland."
 There is nothing in the record to indicate who the San Joaquin Fishing Tool company is, or whether it was on the premises as an agent of plaintiff or of defendant, but it is alleged that Joe Beckett was an agent and employee of plaintiff Western Gulf Oil Company.
 The trial court sustained a demurrer to the original complaint and filed a written opinion thereto. [1] Where the decision is discretionary as provided for under Code of Civil Procedure section 1060, declaratory relief may be refused in the discretion of the trial court where it "appears that the determination is not necessary or proper at the time and under all the circumstances." (Moss v. Moss, 20 Cal.2d 640, 642 [128 P.2d 526, 141 A.L.R. 1422].)
 Such discretion cannot be inferred where the trial judge by opinion discloses that he did not exercise any discretion but decided the case on its merits. (Collins v. City & County of San Francisco, 112 Cal.App.2d 719, 724 [247 P.2d 362]; 15 Cal.Jur.2d, Declaratory Relief,  37, p. 166.)
 The memorandum opinion of the trial court to the original complaint is carried over to the first amended complaint where the complaint is exactly the same as the original complaint except for minor additions.
 [2a] We believe that the complaint stated sufficient facts to state a cause of action for declaratory relief. [3a] In Maguire v. Hibernia Sav. & Loan Soc., 23 Cal.2d 719 [146 P.2d 673, 151 A.L.R. 1062], at pages 728, 729- 730, the court said:
 "Plaintiffs contend that the trial court erred in sustaining a demurrer to the complaint for want of facts. A complaint for *240 declaratory relief is legally sufficient if it sets forth facts showing the existence of an actual controversy relating to the legal rights and duties of the respective parties under a written instrument and requests that these rights and duties be adjudged by the court. [Citations.] ..."
 "... The rule is stated in Anderson, Declaratory Judgments, page 275, as follows: 'A declaratory complaint will not be dismissed because the court disagrees with the construction of the contract involved, contended for by plaintiff. A complaint in an action for declaratory relief which recites in detail the dispute between the parties and prays for a declaration of rights and other legal relations of the parties, states facts sufficient to constitute a cause of action against a motion to dismiss for insufficiency of the complaint.'"
 [4] "The purpose of a declaratory judgment is 'to serve some practical end in quieting or stabilizing an uncertain or disputed jural relation.' (New York Foreign Trade Z. Operators v. State Liquor A., 285 N.Y. 272 [34 N.E.2d 316, 319]; ...) [3b] To hold that a plaintiff on the wrong side of a controversy is not entitled to the security and relief against uncertainty which a declaratory judgment affords would require us to read into the statute a limitation not there present. Section 1060 of the Code of Civil Procedure provides that a party may bring an action for 'a declaration of his rights and duties in the premises' and that the 'declaration may be either affirmative or negative in form and effect.' It contains no suggestion that the pleader must allege facts entitling him to a favorable declaration. [Citations.] It follows, therefore, that both counts of the complaint state sufficient facts to constitute a cause of action."
 (Flynn v. Flynn, 103 Cal.App.2d 91, 94-95 [229 P.2d 5]; Hawkins v. McLaughlin, 196 Cal.App.2d 318, 329-330 [16 Cal.Rptr. 572]; Moss v. Moss, supra, 20 Cal.2d 640, 642; Wilson v. Board of Retirement, 156 Cal.App.2d 195, 199-200 [319 P.2d 426].)
 The plaintiff is entitled to have the court render its declaratory judgment even though such declaratory judgment may be unfavorable to him. (See Coruccini v. Lambert, 113 Cal.App.2d 486, 489-490 [248 P.2d 457].)
 In Rimington v. General Accident Group of Ins. Cos., 205 Cal.App.2d 394, 397 [23 Cal.Rptr. 40], the court stated: "The allegations here leave no doubt of the asserted existence of an actual controversy between the parties. The issue of possible *241 indemnification would be a justiciable controversy involving the insurance companies and their alleged agent, concerning the legal relations and rights arising out of the transaction of the main action."
 But, there must be a real controversy.
 [5] Respondent argues that section 3864 of the Labor Code enacted in 1959 provides that in actions brought under chapter 5 of the Labor Code (Subrogation of Employer,  3850), the employer shall have no liability to reimburse or hold such third person harmless on such judgment or settlement, in the absence of a written agreement so to do executed prior to the injury, and that such indemnity cannot be implied but must be expressly undertaken. Reference is made to Harvey Machine Co. v. Hatzel & Buehler, Inc., 54 Cal.2d 445, 447 [6 Cal.Rptr. 284, 353 P.2d 924], where the indemnity agreement expressly provided that Harvey was to be held harmless against liability for injuries sustained by any person or persons, including employees of the defendant.
 In City of Sacramento v. Superior Court, 205 Cal.App.2d 398 [23 Cal.Rptr. 43], at page 405, the court stated: "The San Francisco Unified School District case [San Francisco Unified School Dist. v. California Bldg. etc. Co., 162 Cal.App.2d 434 (328 P.2d 785)] was decided in July 1958; the Legislature met in 1959 and it is the theory of the authors of the article quoted above (Scott Conley and George Sayre) [article in 13 Hastings Law Journal, p. 219: "... The effect of this rather circular legal procedure was to make the employee's own employer liable not only for the injured employee's workmen's compensation but for additional damages awarded to him in common law as well"] that 'The California legislature felt that this double burden placed upon the employer was in contravention of the exclusive remedy theory of the workmen's compensation statutes' and that the 1959 addition to the Labor Code under discussion [Lab. Code,  3864] was the result and that its effect was only to abolish 'the right of indemnity by the third person against the injured employee's employer on the theory of implied contract. In order to recover in indemnity the third party must now rely on an express contract. ...' We join in this belief."
 [2b] Thus, does it appear that satisfactory provisions were made in the contract to provide for such indemnity? The respondent accepted its general undertaking at its sole risk and expense, agreed to assume and bear all risk of accident *242 and damages to persons or property which might occur in the course of such operation, and further agreed to carry adequate compensation, public liability and employer's liability insurance, and to save harmless and indemnify the owner from all liability of every kind either to persons or property. While the word "all" appears to need no definition, including everything and excluding nothing, the intention of the parties to include or exclude indemnity as to the actions of the appellant is a matter that would have to be determined by the trial court.
 [6] Respondent has relied on the general proposition that the agreement does not indemnify appellant from its own active negligence. The appellant, however, denies negligence on its part in its complaint, though it does attach a copy of the personal injury complaint in which the employees of the respondent have alleged that one Joe Beckett was an agent and employee of the appellant herein and have alleged the negligent acts as set forth above. The reference to the personal injury complaint in appellant's complaint is not an admission by the appellant that it was negligent.
 "The allegations in the complaint do not justify a conclusion that respondent is not obligated to defend, ... It must be remembered that the attorney who drafted the complaint in the Humboldt action is not concerned with the relations between the defendant and any insurer that may be obligated to pay the judgment. He drafts his complaint as broadly as he desires." (Firco, Inc. v. Fireman's Fund Ins. Co., 173 Cal.App.2d 524, 529 [343 P.2d 311].)
 [7] "In other words, the person seeking indemnity cannot recover if his negligence is active or affirmative as distinguished from negligence which is passive. The courts of this state now recognize the distinction between active and passive negligence in holding that in the absence of express agreement for such indemnification the indemnitee may not recover from the indemnitor where he has been actively or affirmatively negligent. [Citations.]" (Cahill Bros., Inc. v. Clementina Co., 208 Cal.App.2d 367, 382 [25 Cal.Rptr. 301].)
 [2c] It would appear that appellant has certain rights to be determined as to whether or not it is entitled to a defense on this action, and that it is also entitled to a trial on the merits on its action for declaratory relief.
 In Vinnell Co. v. Pacific Elec. Ry. Co., 52 Cal.2d 411 [340 P.2d 604], the question was whether or not the indemnity *243 clause in the light of an agreed statement of facts operated to exculpate the indemnitee from the consequences of his own negligence where the clause does not expressly state that damages caused by the indemnitee's negligence are intended to be included in the coverage of the clause. The court said at pages 414-415:
 "... 'to be sufficient as an exculpatory provision against one's own negligence, the party seeking to rely thereon must select words or terms clearly and explicitly expressing that this was the intent of the parties.' (Sproul v. Cuddy, 131 Cal.App.2d 85, 95 [280 P.2d 158].) ... As stated in Basin Oil Co. v. Baash- Ross Tool Co., 125 Cal.App.2d 578, 595 [271 P.2d 122], quoting from Pacific Indemnity Co. v. California Elec. Works, Ltd., 29 Cal.App.2d 260, 274 [84 P.2d 313], '... It could have plainly stated, if such was the understanding of the parties, that the plaintiff agreed to relieve it in the matter from all liability for its own negligence. ...' [Citations.]"
 The court went on to say at page 416: "Both by precedent and good reason, if an indemnitor such as the plaintiff is to be made responsible for the negligent acts of an indemnitee over whose conduct it has no control, the language imposing such liability should do so expressly and unequivocally so that the contracting party is advised in definite terms of the liability to which it is exposed."
 The Harvey Machine Co. case, supra, 54 Cal.2d 445, also on an agreed statement of facts, at page 449 distinguishes the Vinnell case, stating that the conduct in the Vinnell case "involved an affirmative unrelated act of negligence on the part of the indemnitee," and further states, "It was stated therein [in Vinnell], and the decision turned on the holding, that 'courts have consistently adopted the position that indemnification claims are to be strictly construed against the indemnitee in cases involving affirmative acts of negligence on his part.' " The court further stated that the indemnity agreement particularly dealt with the problem of Harvey's employees and that "... there is no room for construction of the agreement. It speaks for itself."
 But here, we have no agreed statement of facts, or no trial on the merits.
 In view of the above, we have come to the conclusion that the complaint does allege facts sufficient to state a cause of action on a general demurrer; that there are facts stating *244 a justiciable controversy involving the intentions of the indemnity agreement; and that the court should declare the rights and liabilities of the parties in interpreting the intentions and meanings of the agreement after a trial on the merits.
 The judgment is reversed.
 Conley, P. J., and Stone, J., concurred.
