
350 N.W.2d 425 (1984)
FEDERATED MUTUAL INSURANCE COMPANY, Appellant,
v.
AMERICAN FAMILY MUTUAL INSURANCE COMPANY, Respondent.
No. C9-83-1839.
Court of Appeals of Minnesota.
June 19, 1984.
Gary N. Gustafson, Fletcher, O'Tool, Ristvedt & Gustafson, St. Cloud, for appellant.
*426 Bruce Sherwood, Kevin S. Carpenter, Quinlivan & Williams, P.A., St. Cloud, for respondent.
Heard, considered, and decided by WOZNIAK, P.J., and HUSPENI and NIERENGARTEN, JJ.

OPINION
HUSPENI, Judge.
This is a declaratory judgment action arising out of an automobile accident. Appellant Federated Mutual Insurance Company (Federated) seeks indemnity from respondent American Family Mutual Insurance Company (American Family) for payments made to the injured party.
The matter was heard on cross motions for summary judgment. The trial court determined appellant was primarily responsible for payment of the damages, and that it was not necessary to address the issue of indemnity between the parties. Appellant claims that it is entitled to indemnity from respondent regardless of its priority for payment. We affirm as modified.

FACTS
The facts are stipulated. On December 15, 1976, Sandra Lee Stawarski negligently operated an automobile, causing an accident with a vehicle driven by Kenneth L. Herbst. Kroska Datsun, Inc., d/b/a Ambassador Leasing Corporation, owned Ms. Stawarski's vehicle, which was leased to James O. Wentzell, Sr. Wentzell consented to Stawarski's driving the vehicle.
Under the terms of the lease agreement, Wentzell was to provide liability insurance, but he did not do so. Ambassador did maintain liability insurance on the vehicle with Federated as required by Minn.Stat. § 65B.48 (1982). American Family insured Stawarski through a policy issued to her father. The policy included a clause covering the use of other cars. Stawarski is an insured under both Federated's and American Family's policies.
Herbst sued Ambassador, Wentzell, and Stawarski for damages. In full settlement of his claims, Federated paid Herbst its policy limits of $25,000. American Family paid Herbst $10,000 under its policy's excess coverage provisions.
Federated then filed a declaratory judgment action seeking indemnity from American Family for the $25,000 payment. The trial court granted American Family summary judgment on the issue of Federated's liability for first payment, but found it unnecessary to reach the indemnity issue. By doing so, the court implicitly found Federated was not entitled to indemnity from American Family.

ISSUES
1. Whether Federated or American Family is primarily responsible for damages incurred by Stawarski.
2. Whether the primary insurer is entitled to indemnity from the excess carrier when the primary insurer's client is only liable by operation of law and is not at fault.
3. Whether the primary insurer is entitled to an award of attorney's fees and costs.

ANALYSIS
Summary judgment is appropriate when there is no genuine dispute as to any material facts. Minn.R.Civ.P. 56. Since the facts are stipulated, it is proper for this court to determine the issues as a matter of law.
1. We look first to the "other insurance" clauses of the two policies to determine if they are in conflict. Integrity Mut. Ins. v. State Auto. & Cas. Underwriters Ins. Co., 307 Minn. 173, 239 N.W.2d 445 (Minn.1976). Federated's policy provides that its coverage is "primary insurance, except when stated to apply in excess of or contingent upon the absence of other insurance." American Family's "other insurance" clause provides when the policy is used as "insurance for a vehicle you do not own (it) is excess over any other auto liability insurance you can collect." Therefore, *427 since both policies claim to be excess coverage, they are in conflict.
Because the "other insurance" clauses of the two policies are in conflict, the court must determine which policy is closest to the risk. Id. at 447. It must determine which policy had the primary purpose of insuring for the risk that occurred, and which policy was the more incidental. Factors to be considered include:
(1) Which policy specifically described the accident-causing instrumentality?
(2) Which premium is reflective of the greater contemplated exposure?
(3) Does one policy contemplate the risk and use of the accident-causing instrumentality with greater specificity than the other policy  that is, is coverage of the risk primary in one policy and incidental to the other?
Auto Owners Ins. Co. v. Northstar Mut. Ins. Co., 281 N.W.2d 700, 704 (Minn.1979).
Federated's policy covered the car, the "accident-causing instrumentality." The risk for which it collected premiums was that an insured might become involved in an accident while driving an automobile directly insured under the policy. American Family's primary risk was for an insured driving a car owned by Stawarski's father. Incidentally, under American Family's policy, an insured might incur some liability while driving another car. The trial court concluded correctly that Federated's policy was closest to the risk and is primarily liable.
2. Federated seeks indemnity from American Family on the theory that Federated's insured, Ambassador, is only vicariously liable for damages based on the negligence of a joint tortfeasor. Hendrickson v. Minnesota Power & Light Co., 258 Minn. 368, 104 N.W.2d 843 (1960), modified on other grounds, Tolbert v. Gerber Indus., Inc., 255 N.W.2d 362 (Minn.1977). American Family admits its insured, Stawarski, was negligent. Indemnity might well be proper if this was a claim by Ambassador for damages it paid as a joint tortfeasor liable solely by operation of law. Lunderberg v. Bierman, 241 Minn. 349, 63 N.W.2d 355 (1954). Federated argues that, since its insured could be indemnified, Federated is also entitled to indemnity from American Family.
The issue presented here solely concerns two insurance companies who fulfilled their contractual obligations to pay damages on behalf of their insureds.
"The whole doctrine of indemnity rests upon the proposition that, when one is compelled to pay money which in justice another ought to pay, the former may recover of the latter the sum so paid unless the one making the payment is barred by the wrongful nature of his conduct."
Id. at 354, 63 N.W.2d at 359.
While generally resting on contract, "principles of equity furnish a more satisfactory basis for indemnity." Hendrickson, 258 Minn. at 371, 104 N.W.2d at 847. In this situation, the equities correspond to the parties' contractual obligations. Federated collected premiums from Ambassador for an insurance policy. That policy covered the risk that Federated might have to pay damages in a matter in which Ambassador was liable solely by operation of law. Its policy was merely a backup for those the lessees were required to maintain. Wentzell failed to maintain insurance as required in his contract with Ambassador. Notwithstanding this backup nature of Ambassador's insurance, that insurance was the primary source for payment in an accident such as occurred here. Federated clearly contracted for and assumed the risk that it might be required to pay even when its insured was not itself culpable.
We find no support for the proposition that a primary insurer may be indemnified by the excess carrier. The line of cases allowing any indemnity between insurers does so on the theory that the excess carrier is subrogated to the insured's right to require the primary carrier to pay its policy limits first, Michigan Mut. Ins. Co. v. Home Mut. Ins. Co., 108 Mich.App. 274, 310 N.W.2d 362 (1981); Federal Kemper *428 Ins. Co. v. Western Ins. Cos., 97 Mich. App. 204, 293 N.W.2d 765 (1980); or to claim against the primary insurer for wrongful failure to defend. Iowa Nat'l Mut. Ins. Co. v. Universal Underwriters Ins. Co., 276 Minn. 362, 150 N.W.2d 233 (1967); Farmers Ins. Group v. Progressive Cas. Ins. Co., 84 Mich.App. 474, 269 N.W.2d 647 (1978); Farm & City Ins. Co. v. United States Fidelity & Guar. Co., 323 N.W.2d 259 (Iowa 1982); see 31 A.L.R.2d 1324; 19 A.L.R.4th 127.
In Iowa National, 276 Minn. 362, 150 N.W.2d 233, and Nordby v. Atlantic Mutual Insurance Co., 329 N.W.2d 820 (Minn. 1983), the Minnesota Supreme Court considered the respective liabilities of insurance companies for attorney's fees and costs of an action where two coverages overlapped. In Iowa National, the court distinguished the obligation to defend from the insurer's obligation to provide coverage and pay judgments. Iowa National was a suit by the driver's insurer against the owner's insurer for failure to defend the driver in a suit by an injured third party, after a court determination that the owner's insurer was primarily liable. The issue was limited to the costs of defending the suit, not payment of the judgment. The court emphasized that the costs and damages were part of the company's agreement with the insured. Iowa National, 276 Minn. at 369, 150 N.W.2d at 238. The company receives premiums in exchange for assuming the risk of these expenses. The court distinguished these expenses from "payment of a debt for which another was primarily liable." Id. In our case, Federated paid only that debt for which it was primarily liable, not another. Iowa National foresees only the exception where an excess carrier may recover damages it paid for which another carrier is primarily liable.
Nordby involved a declaratory judgment action brought to determine the respective liabilities of two insurance companies who had paid a settlement. The primary insurer requested reimbursement from the excess carrier for the costs of defending the insured. The court ruled that an "insurer has no right of action against another insurer to recover the cost of defending the insured, since there is no contractual obligation between insurers." Nordby, 329 N.W.2d at 824. Since the insurer could not recover a share of defending the insured, the court reasoned a fortiori it could not recover the cost of bringing the declaratory judgment action.
3. As stated in Nordby, absent any contractual provisions between the insurance companies to the contrary, a primary insurer may not recover the costs of defending the insured in a declaratory judgment action to determine liabilities under the policies. This right is a contractual obligation owed to the insureds alone.

DECISION
1. Federated is the primary insurer.
2. Federated is not entitled to indemnity from American Family.
3. Federated is not entitled to attorney's fees and costs.
Affirmed as modified.
