
436 S.E.2d 182 (1993)
UNISUN INSURANCE COMPANY, f/k/a American Mutual Fire Insurance Company, Respondent/Appellant,
v.
HERTZ RENTAL CORPORATION and Fireman's Fund Insurance Company, William F. York, and Glenda H. York, Appellants/Respondents. and
The HERTZ CORPORATION, Appellant/Respondent,
v.
UNISUN INSURANCE COMPANY, William F. York and Glenda H. York, Respondents/Appellants.
No. 2071.
Court of Appeals of South Carolina.
Heard June 14, 1993.
Decided August 23, 1993.
Rehearing Denied November 1, 1993.
*184 Robert H. Hood, John K. Blincow, Jr., and Joseph C. Wilson, IV, all of Hood Law Firm, Charleston, for appellant/respondent Hertz. Daniel E. Henderson, Ridgeland, for appellant/respondent York.
Marvin C. Jones and Christy Scott Stephens, both of Bogoslow & Jones, Walterboro, for respondent/appellant Unisun.
BELL, Judge:
This is a declaratory judgment action to determine insurance coverage. The Hertz Corporation, a corporation doing business in the State of New York, rented a car to Christopher Hodge, a resident of New York. The rental contract was executed in New York and the car was registered in New York. Two days later Kendall Gilliem, also a New York resident, was involved in an accident with William and Glenda York while driving the rented car in South Carolina. Hertz alleges that Hodge permitted Gilliem to drive the car.
The Yorks sued Hodge, Gilliem and Hertz to recover for their personal injuries. They alleged negligence by Hertz for allowing Hodge and Gilliem to drive the car, and negligence by Hodge in entrusting the car to Gilliem. They also alleged Gilliem was negligent in operating the car. Hertz, a self insurer, and its excess carrier, Fireman's Fund, alleged they had no duty to defend the suit, because Gilliem was an unauthorized and prohibited driver under the car rental agreement. Unisun insured the York's vehicle. The policy included uninsured motorist coverage. Unisun therefore entered the action to provide a defense for Hodge and Gilliem.
Unisun then brought a declaratory judgment action against Hertz and Fireman's Fund seeking determination of the coverage issue. On a motion for summary judgment, the circuit court held that Hertz owed coverage to Hodge and Gilliem. Hertz appeals. The court also held that Unisun was not entitled to reimbursement from Hertz for the cost of providing the defense for Hodge and Gilliem. Unisun cross appeals this ruling. We affirm in part and reverse and remand in part.

I.
Hertz first argues that the court erred in applying the law of New York to determine the issue of coverage. We discern no error.
Unless the parties agree to a different rule, the validity and interpretation of a contract is ordinarily to be determined by the law of the state in which the contract was made. Touro v. Cassin, 10 S.C.L. (1 Nott & McC.) 173 (1818). A contract of insurance is governed by the law of the state in which application for insurance was made, the policy delivered, and the contract formed. Barkley v. International Mutual Insurance Co., 227 S.C. 38, 86 S.E.2d 602 (1955).
In this case, the determinative issue is whether the car rental agreement between Hertz and Hodge excluded insurance coverage for the accident in question  a question of the law of contracts. The agreement was executed in New York by a resident of New York with a corporation doing business in New York. The subject matter of the contract was an automobile registered in New York. Hertz performed the contract in New York by delivering the car there. Since New York was the state in which the contract was made, the law of New York governs the interpretation and legal effect of its provisions.[1]

II.
Hertz next contends that even if New York law applies, the court erred in holding that it provided insurance coverage *185 in this case. The car rental agreement provided:
You and the following persons, with Your permission ("Authorized Operators"), may operate the Car: Your spouse, employer, employees, or fellow employees incidental to their business duties.... No other persons are permitted to operate the Car unless all such persons appear at the time of rental and sign an Additional Authorized Operator form. All Authorized Operators must be at least 25 years old and have a valid driver's license....
The agreement also stated:
ANY USE OF THE CAR AS PROHIBITED BELOW WILL BREACH THIS AGREEMENT ... AND MAKE YOU FULLY RESPONSIBLE FOR ACTUAL AND CONSEQUENTIAL DAMAGES, COSTS AND ATTORNEYS FEES RESULTING FROM THAT BREACH. TO THE EXTENT PERMITTED BY LAW, LDW, PAI AND PEC, LIS AND ALL LIABILITY PROTECTION WILL ALSO BE VOID.

UNDER THIS AGREEMENT YOU AND/OR ANY AUTHORIZED DRIVER MAY NOT:
(a) PERMIT THE USE OF THE CAR BY ANY ONE OTHER THAN AN AUTHORIZED OPERATOR....
Finally, the agreement provided:
Hertz will indemnify, hold harmless, and defend You and any Authorized Operators FROM AND AGAINST LIABILITY TO THIRD PARTIES....
For bodily injury and property damage the limits of this protection, including owner's liability, are the same as the minimum limits required by the automobile financial responsibility law of the jurisdiction in which the accident occurs... (not to exceed $100,000 per person and $300,000 each accident and $25,000 for property damage for each accident,) which accident results from the use of the Car as permitted by this Agreement. * * * * In the event that such coverage is imposed, by operation of law, then the limits of such coverage shall be the minimum required by the law of the jurisdiction in which the accident occurred. Hertz warrants that the protection described in this paragraph is primary with respect to any insurance coverage You or any Authorized Operators may have.
It is undisputed that Gilliem was 17 years old and did not have a valid driver's license. He did not appear at the time of the rental and sign an Additional Authorized Operator form. Hertz, therefore, contends that he was not authorized to operate the car and that Hodge breached the car rental agreement and voided all insurance coverage by permitting him to drive it.
This case is controlled by the decision of the New York Court of Appeals in Motor Vehicle Accident Indemnification Corporation v. Continental National American Group Co., 35 N.Y.2d 260, 319 N.E.2d 182, 360 N.Y.S.2d 859 (1974). In that case, the Court of Appeals held that an insurer issuing a standard liability policy to an automobile rental company may not disclaim coverage for the negligence of a person operating a rental car with the permission of the lessee, even though the car rental agreement forbids any person except the lessee or an adult member of his immediate family from operating the vehicle. The Court held that, even though the negligent driver was not a permitted user of the car under the rental agreement, as a matter of law, the accident was covered and the insurer had a duty to defend and to pay the judgment.
This case is indistinguishable from the Continental National American case. Accordingly, the circuit court properly held that, under the law of New York, the restrictive terms of the car rental agreement were of no legal effect and the agreement afforded insurance coverage for the accident in which the rental car was involved.

III.
Unisun cross appeals, claiming Hertz should reimburse it for the cost of providing a defense for Hodge and Gilliem in the York suit. The question presented on cross appeal is: If a primary insurer has a duty to defend its allegedly negligent *186 named insured and the allegedly negligent driver in a personal injury action but refuses to tender a defense, and the defense is provided by the plaintiff's uninsured motorist carrier, is the uninsured motorist carrier entitled to recover its expenses for attorney's fees and the costs of defending the action from the primary liability insurance carrier who had the duty to defend?
An insurer that breaches its duty to defend and indemnify the insured may be held liable for the expenses the insured incurs in providing for his own defense. United States Fidelity and Guaranty Co. v. Copfer, 48 N.Y.2d 871, 400 N.E.2d 298, 424 N.Y.S.2d 356 (1979); Fuller v. Eastern Fire & Casualty Insurance Co., 240 S.C. 75, 124 S.E.2d 602 (1962). Similarly, one who is required to pay a legal obligation which ought to have been met by another is entitled to be equitably subrogated to the rights of the obligee against the obligor. See Town of Winnsboro v. Wiedeman-Singleton, Inc., 307 S.C. 128, 414 S.E.2d 118 (1992), aff'g 303 S.C. 52, 398 S.E.2d 500 (Ct.App.1990). This rule rests on the principle of equity that a party should not be made to bear a loss that rightfully belongs to another. Ranger Insurance Co. v. Travelers Indemnity Co., 389 So.2d 272 (Fla.Ct.App.1980). If an insurance company that is not obligated to provide primary insurance coverage assumes the defense of a claim because the primary insurer breaches its obligation to defend, then the company assuming defense of the claim is equitably entitled to assume the rights of the insured in that position. Fidelity General Insurance Co. v. Aetna Insurance Co., 27 A.D.2d 932, 278 N.Y.S.2d 787 (1967); cf. Home Insurance Co. v. Royal Indemnity, 68 Misc.2d 737, 327 N.Y.S.2d 745 (Sup.Ct.) (unreasonable refusal to settle), aff'd, 39 A.D.2d 678, 332 N.Y.S.2d 1003 (1972); Ranger, supra. In other words, it may recover from the primary insurer the expenses of the defense which rightfully should have been borne by the primary insurer. See General Accident Assurance Corp. v. Motorists Mutual Insurance Co., 2 Ohio App.2d 234, 207 N.E.2d 670 (1965); cf. Copfer, supra (insured may recover from insurer for breach of duty to defend).
In this case, Hertz's coverage was primary; Unisun provided uninsured motorist coverage. Because Hertz refused to defend the York action, although it had a legal duty to do so, Unisun was forced to assume the expense of providing a defense to Hertz's insureds. Accordingly, under the principle of equitable subrogation, Unisun may recover from Hertz its expenses resulting from Hertz's refusal to provide a defense. We reverse the holding of the circuit court to the contrary and remand for a determination of the amount which Hertz must reimburse to Unisun.[2]
AFFIRMED IN PART, REVERSED AND REMANDED IN PART.
CURETON, J., and LITTLEJOHN, Acting J., concur.
NOTES
[1]  On the facts of this case, the same result would obtain if we applied either the "most significant relationship" test or the "principal location of the insured risk" test of the Restatement of Conflict of Laws. See RESTATEMENT (SECOND) OF CONFLICT OF LAWS §§ 188, 193 cmt. a (1971). Moreover, we do not conceive S.C.Code Ann. § 38-61-10 (1989) to require a different result, since, at the time the contract was made, the property and interests insured were in the State of New York.
[2]  The case of Sloan Construction Co., Inc. v. Central National Insurance Co. of Omaha, 269 S.C. 183, 236 S.E.2d 818 (1977), is distinguishable. In that case Liberty, the party seeking reimbursement, was a primary insurer with an independent contractual obligation to defend the insured and to indemnify him for any judgment.
