
311 N.W.2d 170 (1981)
UNITED PACIFIC INSURANCE COMPANY, Plaintiff and Appellant,
v.
AETNA INSURANCE COMPANY, Marvin Schelske, Fern Schelske, Martin Engineering Company, and Cochran Electric Company, Inc., Defendants and Appellees.
Civ. No. 9989.
Supreme Court of North Dakota.
October 19, 1981.
*171 Cousineau, McGuire, Shaughnessy & Anderson, Minneapolis, Minn., and Gackle, Johnson & Rodenburg, Fargo, for plaintiff and appellant; argued by Kathleen Drake, Minneapolis, Minn.
Letnes, Marshall & Fiedler, Grand Forks, for defendant and appellee Aetna Ins. Co.; argued by Daniel S. Letnes, Grand Forks.
James D. Cahill, Moorhead, Minn., for defendant and appellee Cochran Elec. Co., Inc.; argued by Steven Marquart, Grand Forks.
Vogel, Brantner, Kelly, Knutson, Weir & Bye, Fargo, for defendant and appellee Martin Engineering Co.
Nilles, Hansen, Selbo, Magill & Davies, Fargo, for defendants and appellees Marvin Schelske and Fern Schelske.
ERICKSTAD, Chief Justice.
This is a declaratory judgment action brought under Chapter 32-23 of the North Dakota Century Code in which plaintiff, United Pacific Insurance Company, seeks a declaration as to which of two insurers must provide coverage and defense to Cochran Electric Company for a third party action brought against it. United Pacific insured Cochran under a contractor's general liability policy. Defendant Aetna Insurance Company insured Cochran for workmen's compensation and employer's liability coverage.
United Pacific appeals from an order of the District Court of Cass County granting Aetna summary judgment pursuant to Rule 56, North Dakota Rules of Civil Procedure, based upon the court's determination that at this stage of the proceedings there is no justiciable issue for the court to determine. We hold that there is no actual controversy of a justiciable nature and therefore affirm. We do not, however, express an opinion as to the dicta in the trial court's Findings of Fact, Conclusions of Law and Order denying the plaintiff's motion for summary judgment but granting defendant Aetna Insurance Company's motion for summary judgment. The trial court's conclusion that Aetna's workmen's compensation policy specifically excluded coverage to Schelske and Cochran Electric is thus not res judicata on that issue.
The undisputed facts are that on July 6, 1973, Marvin Schelske, an employee of Cochran, sustained a personal injury arising out of and in the course of his employment with Cochran at what was known as the Pipestem Dam Project. Schelske was injured when a truck leased or rented to Cochran Electric by Martin Engineering Company tipped over. The accident appears to have occurred when a choker cable furnished by Cochran Electric gave way and caused the truck to tip over. Schelske subsequently brought an action against Martin Engineering claiming that Martin Engineering was negligent, either as a subcontractor or as an independent contractor. Martin Engineering then instituted a third party action against Schelske's employer, Cochran Electric, alleging that if Martin Engineering were held liable for damages to Schelske, it was entitled to recover contribution or indemnity from Cochran Electric.[1] Cochran Electric interposed an answer to the third party complaint and subsequently moved for summary judgment on the ground that any action against an employer was precluded by North Dakota's workmen's compensation law. Cochran Electric's motion for summary judgment was denied in a memorandum opinion by the district court dated May 15, 1979.
We will not discuss at this point in our opinion the development in that action except to say that United Pacific has been defending Cochran Electric in the third party action brought against it by Martin Engineering under a reservation of rights. *172 United Pacific brought this declaratory judgment action against Aetna, Schelske, Fern Schelske, Martin Engineering, and Cochran Electric to determine whether it or Aetna has the duty to defend Cochran Electric and pay any judgment of contribution or indemnity Martin Engineering may be awarded against Cochran Electric.
On this appeal, United Pacific contends that a justiciable controversy exists, that its comprehensive liability policy doesn't provide coverage to Cochran Electric for either defense or liability, and that Aetna's workmen's compensation policy does provide coverage to Cochran Electric both for defense and liability. Aetna contends that there is no controversy of a justiciable nature and therefore this court lacks jurisdiction to decide this matter. It further contends that if this court finds a justiciable controversy exists, then its workmen's compensation policy does not make it liable for Cochran Electric's defense or liability because of an all states endorsement which excludes coverage in North Dakota. Aetna also contends that United Pacific's comprehensive liability policy does provide coverage to Cochran Electric in spite of a clause in the policy excluding coverage for injuries to an employee of the insured injured during the course of his employment.
Both United and Aetna moved for summary judgment in the District Court of Cass County. As previously stated, the district court concluded that there was no justiciable issue presented to the court for determination. It accordingly denied United Pacific's motion for summary judgment and granted Aetna's motion for summary judgment. We agree with the district court that no justiciable controversy has been presented to the court. We therefore do not reach the issue of which insurance policy provides coverage to Cochran Electric.
The North Dakota Century Code in Section 32-23-02 provides that declaratory judgment actions may be instituted to have rights and liabilities under a contract adjudicated. That section provides:
"32-23-02. Power to construe contracts, statutes, and wills.Any person interested under a deed, will, written contract, or other writings constituting a contract, or whose rights, status, or other legal relations are affected by a statute, municipal ordinance, contract, or franchise, may have determined any question of construction or validity arising under the instrument, statute, ordinance, contract, or franchise and may obtain a declaration of rights, status, or other legal relations thereunder." § 32-23-02, N.D. C.C.
In G. W. Jones Lumber Co. v. City of Marmarth, 67 N.D. 309, 315-16, 272 N.W. 190, 194 (1937), this court said that it does not render advisory opinions. This court stated that there must be "an actual controversy between parties, submitted to a court in which a judgment may be entered that will conclusively determine the controversy and become res judicata." Id. (Citations omitted.) A justiciable controversy must therefore exist before a declaratory judgment action can be maintained.
We recognize that the duty to defend is separate from the duty to indemnify. Smith v. American Family Mutual Insurance Company, 294 N.W.2d 751, 759 (N.D. 1980). Because each is a separate contractual obligation, each is separately considered in this opinion.
The two insurance companies involved in this action are seeking to have the court hold the other company liable to indemnify Cochran Electric if Martin Engineering is awarded damages in the underlying action. We agree with the Fifth Circuit Court of Appeals' decision in American F. & C. Co. v. Pennsylvania T. & F. M. Cas. Ins. Co., 280 F.2d 453 (5th Cir. 1960), that the issue of liability (as distinguished from the issue of the duty to defend) for a loss which may never arise does not create a justiciable controversy. In that case American Fire & Casualty was an insurer under a fleet policy for Clay, and Pennsylvania was an insurer, also under a fleet policy, for Britt. Britt leased a unit, complete with driver, from Clay. The Clay truck driven by Clay's employee on behalf of Britt caused an injury to plaintiff, who sued Clay and later, by *173 amendment, Britt. Clay, at the instance of American, demanded that Britt and Pennsylvania assume the defense of the damage suits then pending against Clay only. Both Britt and Pennsylvania declined to tender a defense.
The parties had begun to litigate when American, defending Clay, asked for declaratory judgment against its insured, Clay, as well as against Britt, Pennsylvania, and the damaged plaintiffs. American sought to have the court declare which of the two insurance companies had the duty to defend Clay and which would have a legal liability to pay any damages in the underlying action. The court found that there was, as yet, no legal liability since the damage suits were not yet tried. In finding that the court should not reach the issue of liability because it went to liability for a loss which may never arise, the court stated:
"What we are saying is that if each of the Damage Plaintiffs win, if neither of the defendants Clay or Britt succeed, if facts are not developed requiring or permitting decisive findings, express or implied, on the status of the truck or its driver as they might bear upon related provisions of the two insurance policies, problems now academic may then be actual." 280 F.2d at 461.
In the present case, Martin Engineering's action against Cochran Electric is yet undetermined. Any liability by either Aetna or United Pacific is contingent upon the outcome of an action which is still pending in district court. That separate action in which Martin Engineering seeks contribution or indemnity against Cochran Electric for any judgment entered against it must be decided before any liability of either insurer can attach. Cochran Electric contends in that separate action that it is not liable for contribution or indemnity because of North Dakota's workmen's compensation laws. It asserts that those laws make a recovery by an injured employee from the Workmen's Compensation Fund the employee's exclusive remedy, thereby exempting the employer from liability. Martin Engineering, however, contends that it may be awarded contribution or indemnity under an exception to that general rule allowing recovery where an independent contractual relationship exists between the employer and the third party. That exception was recognized in the case of White v. McKenzie Electric Cooperative, Inc., 225 F.Supp. 940, 945-46 (D.N.D.1964), in which the court, interpreting North Dakota workmen's compensation law, said:
"The authorities hold that a third party's right to recover indemnity from an employer who is liable to the employee under the provisions of a workmen's compensation act is based upon an independent contractual relationship which gives rise to a duty owing the third party by the employer which the employer has breached, thus creating the obligation to indemnify the third party. [Citations omitted.] In the absence of such independent contractual relationship and duty between employer and third party, indemnity is not allowed. [Citations omitted.]
The district court, in the action of Marvin Schelske and Fern Schelske v. Martin Engineering Company v. Cochran Electric Company, Inc., must make the determination of whether or not an independent contractual relationship exists between Cochran Electric and Martin Engineering. If the district court finds such an independent contractual relationship, it is conceivable that it might then hold Cochran Electric liable to Martin Engineering for contribution or indemnity. If, however, it finds no independent contractual relationship, Cochran Electric will be absolved of any liability.
United Pacific and Aetna may be held liable for contribution or indemnity to Cochran Electric only if the district court enters a judgment against Cochran Electric in favor of Martin Engineering. In summary, a judgment would be entered against Cochran Electric only if an independent contractual relationship is found to exist between Martin Engineering and Cochran Electric. And, further, the district court will reach the issue of liability between Martin Engineering and Cochran Electric *174 only if Martin Engineering is found liable in tort to Schelske. Schelske's success against Martin Engineering, and then Martin Engineering's success against Cochran Electric in the underlying action is a result the court should not presume will become a reality. See American F. & C. Co. v. Pennsylvania T. & F. M. Cas. Ins. Co., 280 F.2d 453. We hold, therefore, that there is no controversy of a justiciable nature at this time and that the district court and this court, therefore, lack jurisdiction to decide the issue of liability between United Pacific and Aetna.
We also hold that there is no justiciable controversy on the issue of which insurance company has a duty to defend Cochran in the separate action. Courts are not unanimous in their approach to whether or not a justiciable controversy exists where the duty to defend is at issue. 20 Appleman, Insurance Law and Practice, § 11354, p. 348. We believe that the better policy in an action between insurance companies is to await final adjudication of the underlying litigation to prevent decisions based upon incomplete facts. See Aetna Insurance Co. v. Transamerica Insurance Co., 262 F.Supp. 731 (E.D.Tenn.1967). Contra, American F. & Cas. Co., Inc. v. Pennsylvania T. & F. Mut. Cas. Insurance Co., 280 F.2d 453, 461 (5th Cir. 1960); Maryland Casualty Co. v. Texas Co., 114 F.2d 952, 954 (8th Cir. 1940); Improved Machinery, Inc., et al. v. Merchants Mutual Insurance Co. et al., 349 Mass. 461, 463, 208 N.E.2d 796, 798 (1965).
In determining whether or not a declaratory action may be presently maintained, we agree with the court in Aetna Insurance Co. v. Transamerica Insurance Co., 262 F.Supp. at 732, that the following test should be used:
"Basically the question in each case is whether the facts averred under the existing circumstances present a real controversy between parties having adverse legal interest of such immediacy and reality as to warrant a declaratory judgment. [Citations omitted.] The determinative factor is whether the declaratory action will probably result in a just and more expeditious and economical determination of the entire controversy. [Citations omitted.]"
This test comports with this court's opinion in G. W. Jones Lumber Company v. City of Marmarth, 67 N.D. at 315-16, 272 N.W. at 194, in which this court said that the declaratory judgment must be capable of conclusively determining the controversy.
The determination of who should pay the cost of defending the tort action against Cochran Electric and who is liable for contribution or indemnity should be in one action. Combining the two issues will foster judicial economy and at the same time provide the court with a broader foundation of factual information upon which to make a just and expeditious decision. Any decision on liability or duty to defend made by this court while the underlying litigation is pending in district court would be based on speculation of that result and without full presentation of facts.[2]
The district court's opinion granting Aetna's motion for summary judgment because of a lack of a justiciable controversy is, therefore, affirmed.
SAND and PEDERSON, JJ., and BERNING, District Judge, concur.
BERNING, District Judge, sitting in place of PAULSON, J., disqualified.
VANDE WALLE, Justice, dissenting.
I disagree with the conclusion in the majority opinion that a declaratory-judgment action seeking a determination of a duty to defend under an insurance policy does not present a justiciable controversy. In many instances the issue of the duty to defend is *175 the overriding issue involved in an action and the duty of contribution and indemnification of the party of the insurance company may be only secondary. It is not inconceivable that the expenses incurred in defending an action may well exceed any judgment for which the insurance company might be held responsible. Furthermore, the duty to defend is not speculative because an action against Cochran Electric Company, Inc., is pending.
Admittedly there are factual questions involved in this case which do not permit us to determine the ultimate responsibility for contribution or indemnification by the insurance companies involved. That issue is speculative until and unless a judgment is ordered against Cochran. However, we have previously recognized that an insurer's obligation to defend and an insurer's obligation to indemnify are separate and distinct contractual elements. Smith v. American Family Mut. Ins. Co., 294 N.W.2d 751 (N.D. 1980). Therefore, it is not necessary for this court to decide the ultimate responsibility for contribution or indemnification in order to determine the duty to defend. The duty to defend arises now, regardless of the outcome of the merits of the action against Cochran Electric Company, and, as such, there is a present justiciable controversy which we should decide.
Not only have we recognized that a duty to defend is a distinct contractual element from the duty to indemnify, we have also recognized the effect on the insured of an insurer's failure or refusal to defend. See Smith v. American Family Mut. Ins. Co., supra. Delaying the determination of the duty to defend until the duty to indemnify or contribute is also determined is merely an extension of the uncertainty which he must live with.
Although the majority opinion indicates the responsibility for defense and for contribution and indemnity should be determined in one action, I have some questions as to the procedural posture of that statement. As an example, if an insurance company refuses to defend and the insured must defend himself, a separate action apparently would be necessary to determine the issue of a duty to defend as well as the duty to indemnify or contribute if a judgment is recovered against the insured. In the instance in which the insurer defends, although protesting that it is under no obligation to do so, and the plaintiff recovers no judgment against the insured, will the insurer be able to raise the issue of duty to defend and recover its costs if it was under no duty to defend? These are procedural questions, the answer to which may well negate the judicial economy referred to in the majority opinion.
Because of the position of the majority opinion it seems futile to discuss at length the merits of the issue of the duty to defend. For the record, however, I would hold that both United Pacific Insurance Company and Aetna Insurance Company have a duty to defend with the issue of indemnification and contribution if a judgment is recovered against Cochran Electric to await the outcome of the action brought against it.
NOTES
[1]  We do not address the distinctions between contribution and indemnity in this opinion. See generally Sayler v. Holstrom, 239 N.W.2d 276 (N.D.1976); White v. McKenzie Electric Cooperative, Inc., 225 F.Supp. 940, 945-46 (D.N.D.1964).
[2]  Lest it be thought that we failed to consider a recent decision of our court in arriving at this conclusion, we shall discuss it briefly at this time. We think it is sufficient to say that in American Hardware Insurance Co. v. Dairyland Insurance Company, 304 N.W.2d 687 (N.D. 1981), although we decided in a declaratory action between two insurers which party had the duty to defend, that case is not precedent requiring us to do so in this case as the issue of justiciability was neither raised nor decided there.
