
159 Cal.App.3d 1076 (1984)
206 Cal. Rptr. 232
R.H.R. ROKEBY-JOHNSON, Plaintiff and Appellant,
v.
AQUATRONICS INTERNATIONAL INC., Defendant and Respondent.
Docket No. 69157.
Court of Appeals of California, Second District, Division Five.
September 10, 1984.
*1077 COUNSEL
Sedgwick, Detert, Moran & Arnold and William H. King for Plaintiff and Appellant.
*1078 Leff & Mason and Jon A. Longerbone for Defendant and Respondent.
OPINION
HASTINGS, J.
The underlying action to this appeal was a suit by R.H.R. Rokeby-Johnson and other underwriters at Lloyd's, London (hereinafter Underwriters) which sought to recover the sum of $82,523 paid by Underwriters to their assured, Navigation Services Inc. (hereinafter NSI), for loss of equipment caused by a fire on board the vessel Aquasition at sea on June 6, 1976. For reasons hereinafter stated the trial court ruled against Underwriters and this appeal followed.
On June 6, 1976, a fire broke out in the forward engine room of the research vessel Aquasition. The ship burned to the waterline and sank. The ship at the time was being operated pursuant to a charter between Aquatronics and the vessel's owner Oskco Edwards. Aquatronics was obtaining a seismographic profile of the ocean floor off the Southern California coast. In connection with this work on or about June 1, 1976, Aquatronics entered into an agreement with NSI whereby the latter would provide services and furnish equipment for horizontal positioning control in the ocean waters. Approximately three weeks earlier NSI's insurance brokers through Underwriters had bound coverage of the equipment which was lost as a consequence of the fire and the sinking. Although the policy covering the equipment was not issued until July 9, 1976, it was effective as of May 6, 1976, just one month before the sinking.
In its agreement with Aquatronics NSI undertook to provide insurance protection for Aquatronics. Paragraph VI titled INSURANCE in pertinent part and Paragraph VII provided: "A. NSI agrees, at its expense, to obtain the following insurance coverages:
".... .... .... .... .... .... .
"4. Personal Property Insurance covering all equipment required to perform the services per this agreement.

"VII. GENERAL LIABILITY INDEMNITY
"Except as negated by the provisions of Paragraphs I and IV A, NSI agrees to protect, indemnify, and save AQUATRONICS harmless from and against all claims, demands, and causes of action of every kind and character *1079 arising in favor of employees of AQUATRONICS, or third parties on account of personal injuries, death, or damages to property in any way resulting from the willful or negligent acts or omissions of NSI, its agents, employees, and representatives."
Underwriters paid the sum of $82,523 to NSI for the loss of equipment, and then brought the present subrogation action against Aquatronics for negligence and for failure to provide a seaworthy vessel. At the mandatory settlement conference, before trial, Aquatronics advised Underwriters that it would assert as a defense that it was an implied in law coinsured of NSI. This defense if true would deprive Underwriters of subrogation rights. Approximately three weeks after the settlement conference, Underwriters filed a notice of motion in limine to exclude testimony at trial on this defense by Aquatronics contending that it was new matter and should have been pleaded as an affirmative defense. The hearing on this motion was heard by the trial judge assigned the trial. He denied the motion and although he was not persuaded that it was a defense that required affirmative pleading, he permitted Aquatronics to amend its answer. He then continued the trial so that Underwriters could prepare factually and/or legally to meet the affirmative defense. The trial commenced approximately two months later.
The parties stipulated that the June 1, 1976, agreement between Aquatronics and NSI could be entered into evidence. The trial judge then bifurcated the issues and stated he would first rule on whether the wording of the agreement established that Aquatronics qualified as an implied in law coinsured of NSI. Such a finding would preclude a trial on the other issues raised by Underwriters in its action against Aquatronics. The judge then read the agreement and the written briefs of the parties addressing the issue and ruled Aquatronics was an implied in law coinsured.

CONTENTIONS OF UNDERWRITERS ON APPEAL
1. The trial court erred in finding Aquatronics to be an implied in law coinsured of NSI, thus preventing their action in subrogation because the court's assumption of the parties' intention was unsupported by evidence of any kind.
2. The trial court erred in failing to grant Underwriters' motion in limine.
3. The trial court erred in failing to apply applicable provisions of maritime law.


*1080 DISCUSSION
1. The trial court's decision that Aquatronics was an implied in law coinsured of NSI was based almost exclusively on the law as stated in Liberty Mut. Fire Ins. Co. v. Auto Spring Supply Co. (1976) 59 Cal. App.3d 860 [131 Cal. Rptr. 211]. Liberty Mutual had issued an outstanding fire insurance policy covering a commercial building in which Title Insurance and Trust Company (T.I.T.) was the named insured. Auto Spring Supply Co. (Auto) was a sublessee of T.I.T. and was operating a manufacturing plant in the building. Auto did not take out and maintain any fire insurance of its own on the building. It looked to T.I.T.'s policy with Liberty for this purpose and a portion of the rent that Auto paid to T.I.T. was applied toward the premium on Liberty Mutual's policy.
A fire damaged the building and Liberty Mutual paid T.I.T. $47,488.00 which was the cost for repairing the fire damage. Liberty Mutual initiated a subrogation action against Auto to recover the $47,488.00 paid to T.I.T. The trial court found that Auto intended and understood that neither it nor its employees would have any liability for fire loss to the building and would look solely to the proceeds of Liberty Mutual's policy to pay for any such loss. The trial court found that Liberty Mutual had no right of subrogation against Auto. The Court of Appeal affirmed. The opinion first notes that both T.I.T. and Auto intended Liberty Mutual's fire insurance policy as the sole coverage in case of fire to the property. With this in mind the opinion states: "This was the commercial expectation of these parties. Stated otherwise, under the facts of this case, we regard the subtenant, Auto, as an implied in law co-insured of T.I.T., absent an express agreement between them to the contrary. They both had insurable interests in the fire damaged building. [Citation.]
"If subrogation were permitted here, Auto, rather than the proceeds of Liberty's policy, would become the source of the funds used to repair the fire damage. This would be contrary to the just-expressed intent and expectation of T.I.T., Liberty's named insured. Under both the lease and the sublease T.I.T. did not look to Auto for payment of fire damage to the building, but instead looked only to the proceeds of Liberty's policy and not beyond. The right of subrogation is governed by equitable principles [citation] and it would be most inequitable to hold Auto responsible for a fire loss which it thought it had completely avoided through its indirect payment over some nine years of the premiums due on Liberty's policy and had also acted in reliance upon this belief by failing to take out corresponding fire insurance of its own. It would also be a windfall for Liberty to have collected these premiums over the years for its assumption of this risk and *1081 then when the risk actually occurred, by means of this litigation, to transfer the risk wholly to Auto  the entity which paid Liberty's premiums for years to avoid this very risk....
"It is the overall intention and expectation of T.I.T. as to where it would look for compensation for fire loss that is crucial, and it is clear from what we have already said that its intention and expectation in this respect was to look only to the proceeds of Liberty's policy and neither to Auto nor to its employees. This being so, no liability to T.I.T. for this loss by fire existed on the part of Auto and therefore there was no liability on the part of Auto in favor of T.I.T. to which Liberty could be subrogated." (Liberty Mut. Fire Ins. Co., supra, 59 Cal. App.3d at pp. 865, 866.)
Based upon the above legal reasoning the trial judge in our present case explained his decision as follows: "The issue that is raised in this case is whether that subrogation right has been lost because of the contractual provision in the contract between Navigation Services and Aquatronics with reference to covering this equipment by insurance.
"Now, the language of the contract is completely clear, no ambiguity, it specifically provides that Navigation Services will at its own expense obtain insurance coverage and then lists a number of coverages and includes a personal property insurance coverage which would apply to the equipment that we are concerned with here now.
"I have concluded that the plaintiff has no right of subrogation under the circumstances as against defendant Aquatronics.
"I have so concluded because I believe that the reasoning of the Liberty Mutual[1] case applies and that pursuant to that reasoning the defendant, Aquatronics, was an implied in law co-insured along with Navigational Services.
".... .... .... .... .... .... .
"Now, the court has to assume that under the usual rules of construction that the language regarding the providing of insurance was put into the agreement for some kind of a purpose and the only reasonable purpose that I can see here and that I think is reasonable under the circumstances bearing in mind what we know about the transaction was that it was to assure defendant *1082 Aquatronics that the equipment would be insured, otherwise there would really be no reason to include that language in the contract.
".... .... .... .... .... .... .
"I have to assume that the purpose of providing for the insuring of the equipment was to assure the defendant that the defendant would have no liability in the event there was a loss of that equipment, and that the carrier would take care of that loss.
"It has to follow from that that the clear purpose of the provision was for the benefit of the defendant, otherwise there really would have been no point in including it in the agreement.
"Now, I think because of that the Liberty Mutual case clearly applies here.
"The court said in that Liberty Mutual case that it was obvious that the parties to that agreement, that was a lease in that case, all intended the proceeds of the fire insurance policy be for the protection of the parties, all the parties, and that was the commercial expectation of the parties, and that is exactly what I think happened here.
"Now, I recognize that one argument that has been made by Mr. King [counsel for Underwriters] is that in the Liberty Mutual case the lease provided the premiums were to be paid from the rent paid by the lessee but I don't think that makes any difference at all because there was a consideration.
"In our case clearly the consideration for the agreement to provide the insurance was the execution of the agreement by Aquatronics and its agreement to pay the sums required for the use of the equipment.
".... .... .... .... .... .... .
"In a nutshell, what I am saying is the purpose of the insurance provision was to protect not only Navigational Services but the defendant Aquatronics, as well and therefore it makes that defendant implied in the law a co-insured along with Navigation Services, and of course being a co-insured, there cannot be a right of any subrogation against the carrier's own insured."
Although Underwriters concedes that the language of the agreement is unequivocal in requiring NSI to insure its equipment against loss, they maintain *1083 they are still entitled to subrogation because (1) Aquatronics is not named as an additional insured; (2) there is no waiver in the contract or agreement of Underwriters' right to subrogation; (3) the agreement does not absolve Aquatronics from the consequences of its own negligence nor (4) absolve Aquatronics from the consequences of its failure to furnish a seaworthy vessel.
(1a) At first blush, Underwriters' argument appears plausible; however, after careful analysis we have determined that the trial judge was correct. The answer to this interesting issue is found in the legal meaning of subrogation. (2) "A surety making payment has been held to be subrogated to all the rights and remedies which were available to the creditor, to obtain payment from any person or property of any person who, as to the surety, is primarily liable for the debt. And it has been stated that both gratuitous and paid sureties have all the rights, remedies, and priorities of the party to whom they have paid the debt of the principal." (11A Appleman, Insurance Law and Practice, Claims Against Third Persons, § 6551, pp. 2-4.) "A surety, which is subrogated to the rights of the principal against a third person, takes the rights subject to all defenses which the third person had as against the principal." (Id., p. 7, italics added.)[2]
These principles were applied by the appellate court in the Liberty Mutual opinion. The court recognized that T.I.T. had no cause of action against Auto, or stated another way Auto had a complete defense to any action by T.I.T. and therefore subrogation was denied to Liberty Mutual. The court stated: "If subrogation were permitted here, Auto, rather than the proceeds of Liberty's policy, would become the source of the funds used to repair the fire damage. This would be contrary to the just-expressed intent and expectation of T.I.T., Liberty's named insured. Under both the lease and the sublease T.I.T. did not look to Auto for payment of fire damage to the building, but instead looked only to the proceeds of Liberty's policy and not beyond." (59 Cal. App.3d at p. 865.)
(1b) In the case before us, the trial judge applied the same concept. The court noted, supra, "I have to assume that the purpose of providing for the insuring of the equipment was to assure the defendant that the defendant would have no liability in the event there was a loss of that equipment, and that the carrier would take care of that loss.
*1084 "It has to follow from that that the clear purpose of the provision was for the benefit of the defendant, otherwise there really would have been no point in including it in the agreement." The court then concluded that the commercial expectation of the parties was that NSI's insurance would cover any loss of the equipment. Accordingly, if subrogation were permitted, Aquatronics could become the source of the funds used to cover the lost equipment and this would be contrary to the expressed intent of NSI, Underwriter's named insured.[3]
(3) In subrogation litigation California follows the doctrine of superior equities. When a surety seeks recovery against a third person in weighing the equities, which includes consideration of the negligence of its insured and the third person, the burden is upon the surety to establish its superior equity. (Myers v. Bank of America, etc. Assn. (1938) 11 Cal.2d 92, 103 [77 P.2d 1084].) Underwriters in its opening brief has suggested that Aquatronics' remedy should be against NSI for indemnification should Underwriters prevail in its suit against Aquatronics. Not only would this provide a windfall to Underwriters who took the benefit of the premiums and now declines to suffer the loss, but is suggesting that NSI, its insured, should or may be liable to stand the loss that it had insured against. We fail to see how the doctrine of subrogation comes to the aid of Underwriters in this situation.
(1c) Underwriters claims that Aquatronics cannot prevail because there is no waiver of its rights to subrogation. They claim that the decision of the court deprives them of "an existing right." The law and the cases do not support this concept. An insurer does not have an independent or automatic right of subrogation in all situations. As in our present case it is the insurer's burden to establish that it can stand in the shoes of its insured. It is not a question of waiver. A waiver would occur if the contract of insurance addresses the subrogation issue and seeks to protect the insurer in similar situations or limits the rights of the insured. There was no such provision in the insurance contract here. The Liberty Mutual opinion, supra, suggested such a provision (see Liberty Mut. Fire Ins. Co., supra, 59 Cal. App.3d at p. 866, fn. 5), but absent any reference to subrogation, the law as outlined in this opinion must prevail.
(4) 2. Appellant's second argument on appeal is that the trial court erred in failing to grant Underwriters' motion in limine. It is Underwriters' contention that Aquatronics did not raise the alleged waiver of subrogation *1085 defense until shortly before trial and that it should have been pleaded as an affirmative defense.
Appellant was required to show that there was an abuse of discretion on the part of the trial court which resulted in prejudice. (Eastwood v. Froehlich (1976) 60 Cal. App.3d 523, 529 [131 Cal. Rptr. 577].) We find no prejudice and therefore no abuse of discretion for several reasons. First, as explained above, this was not a waiver situation as urged by appellant, therefore, an affirmative defense based on such a concept was not required. Second, the basic issue was appellant's right to subrogation and the court was able to base its decision on the agreement between NSI and Aquatronics and the briefs submitted by the parties. As the court noted in Parson Manufacturing Corp., Inc. v. Superior Court, supra, 156 Cal. App.3d 1151, 1163, the agreement alone is generally sufficient in such cases to support the judgment because it clearly states the party responsible for providing the insurance for all parties. Further evidence that could have enlightened the court on this issue was most unlikely. Third, the court out of an abundance of caution did permit a continuance to enable Underwriters to respond and prepare a defense to this issue.
3. Underwriters' final argument is that the trial court erred in failing to apply applicable provisions of maritime law. The only maritime law that might benefit Underwriters, even if we accepted this argument, would be that the law of subrogation is substantially different from the law outlined in this opinion and benefits Underwriters. Cases cited by Underwriters do not support a material distinction that would require the trial court to rely on maritime law rather than California law. More important on a key requirement for subrogation, a maritime law case, Atlas Assurance Co. Ltd. v. Harper, Robinson Ship. Co. (9th Cir.1975) 508 F.2d 1381, is in direct agreement with Liberty Mutual. The insurer, Atlas Assurance Co., Ltd. (Atlas), provided the shipper with "warehouse to warehouse" property loss coverage but no liability coverage. The shipper shipped to the consignee on an FIO basis and agreed to indemnify the carrier for any damage caused by the stevedoring company unloading the ship. Such a loss occurred and Atlas paid the consignee and sued the carrier. The carrier then impleaded the shipper for indemnity.
The Ninth Circuit held this was tantamount to a direct suit by Atlas against its insured, the shipper: "Atlas is clearly attempting to sue its Assured, albeit in a circuitous manner, and the equity of subrogation will be denied to Atlas under the familiar doctrine that subrogation does not invest the underwriter with a right to override its obligation to its Assured....
*1086 "The equitable doctrine of subrogation passes to the insurer only those rights which the assured has and, if the rights of the assured have been limited by lawful contract, the rights of the insurer are likewise limited. [Citation.]" (508 F.2d at p. 1389; Also see Wager v. Providence Ins. Co. (1893) 150 U.S. 99, 108 [37 L.Ed. 1013, 14 S.Ct. 55], italics added.)
We find no merit to Underwriters' third argument.
The judgment is affirmed.
Stephens, Acting P.J., and Ashby, J., concurred.
NOTES
[1]  Liberty Mut. Fire Ins. Co. v. Auto Spring Supply Co., supra, 59 Cal. App.3d 860.
[2]  See also Liberty Mut. Fire Ins. Co. v. Auto Spring Supply Co., supra, 59 Cal. App.3d 860, at page 864 stating, "A subrogation as applied to an insurer is its right to be put in the position of its insured against third parties legally responsible to its insured for the loss which the insurer has both insured and paid."
[3]  In accord is the recent case of Parsons Manufacturing Corp. Inc. v. Superior Court (1984) 156 Cal. App.3d 1151 [203 Cal. Rptr. 419].
