
    EASTERN NATIONAL BANK, Appellant, v. GLENDALE FEDERAL SAVINGS AND LOAN ASSOCIATION, Appellee.
    No. 86-1925.
    District Court of Appeal of Florida, Third District.
    June 23, 1987.
    Weintraub & Rosen and Michael A. Ro-sen, Miami, for appellant.
    Mershon, Sawyer, Johnston, Dunwody & Cole and Dennis M. Campbell and S. Austin Carr, Miami, for appellee.
    Before BASKIN, DANIEL S. PEARSON and FERGUSON, JJ.
   FERGUSON, Judge.

Plaintiff Eastern National Bank (Eastern) appeals from a final summary judgment entered on defendant Glendale Savings and Loan Association’s (Glendale) counterclaim. Eastern contends that Glendale is not entitled to be equitably subro-gated to an existing debt according to the terms of its contract with the borrower because Glendale took no reasonable precautions to ascertain that there were no liens recorded ahead of its mortgage.

The borrowers, Mr. and Mrs. Valenti, applied on January 1, 1985, for a loan from Glendale to pay off the second of two mortgages on their home held by AmeriFirst Savings and Loan Association. Glendale agreed to step into AmeriFirst’s position as a second mortgagee for the loan. The loan was approved on April 25,1985, and funded and recorded on April 30, 1985.

On April 8, 1985, Eastern closed a business loan for Tom Valenti Construction Corp. for $125,000, also secured by a mortgage on the Valenti home. In its agreement with the borrowers, Eastern expressly agreed to a third mortgage subordinate to AmeriFirst’s first and second mortgages. The Valentis’ did not inform Glendale of the third mortgage. Eastern, however, got to the courthouse on April 16, 1985, to record its third mortgage, fourteen days ahead of the recording of Glendale’s second mortgage. Tom Valenti Construction Corp. defaulted on its loan, and Eastern instituted foreclosure proceedings against the construction company and the Valentis for $86,985.47, plus interest. Eastern named Glendale a party defendant in the action on the basis that Glendale holds, on the same home, a subordinate and inferior mortgage because Glendale’s mortgage was recorded after Eastern’s mortgage. Glendale’s answer denied that its mortgage was inferior to Eastern’s mortgage, and counterclaimed for a judgment against Eastern. Glendale moved for summary judgment on its counterclaim against Eastern, asserting its mortgage was superior by virtue of the doctrine of equitable subro-gation. After a hearing on the motion, the trial court ruled that there were no genuine issues of material fact and that Glendale, as a matter of law, was entitled to priority over Eastern’s mortgage loan. Summary judgment was entered for Glendale on its counterclaim.

Eastern argues that its mortgage is superior by virtue of an earlier recordation, notwithstanding the terms of its contract, and, that equity cannot alter that fact because Glendale was negligent in failing to update a title examination before closing on its loan. We disagree and affirm on the theory that conventional subrogation applies to subrogate Glendale’s mortgage to the extent of AmeriFirst’s second mortgage.

Subrogation is the substitution of one person to the position of another with reference to a legal claim or right. It is an equitable doctrine founded on the principles of equity and justice and is applied to prevent forfeiture and unjust enrichment. The doctrine of subrogation is generally invoked when one person has satisfied the obligations of another and equity compels that the person discharging the debt stand in the shoes of the person whose claim has been discharged, thereby succeeding to the rights and priorities of the original creditor.

Traditionally, subrogation has been divided into two categories: equitable or legal subrogation and conventional subrogation. There are important differences between equitable and conventional subrogation.

Equitable subrogation arises when the person discharging the obligation is under a legal duty to do so or when the person discharges the obligation to protect an interest in, or a right to, the property. The doctrine of equitable subrogation does not apply to mere volunteers. Boley v. Daniel, 72 Fla. 121, 72 So. 644 (1916). It is governed by the operation of equitable principles rather than legal rules and will not be applied where it would work an injustice to innocent third parties. Some courts have refused to apply the doctrine where the party seeking to invoke it is negligent, stating that to do so would be to reward negligence. Fort Dodge Bldg. & Loan Ass’n v. Scott, 86 Iowa 431, 53 N.W. 283 (1892). However, two grounds are recognized for permitting subrogation against intervening interests even where there is a negligent failure to discover a prior recorded junior lien. First, negligence which has not resulted in harm to anyone will not be invoked to permit unjust enrichment of the later lienors through their fortuitous advancement in priority by reason of mistake. See Federal Land Bank v. Joynes, 179 Va. 394, 18 S.E.2d 917 (1942); Banta v. Vreeland, 15 N.J.Eq. 103, 107 (1862). Second, the function of constructive notice is to preserve an existing advantage and not to gain a new one. Martin v. Hickenlooper, 90 Utah 150, 59 P.2d 1139 (1936); Note, Equitable Substitution of Mortgages, 26 Harv.L.Rev. 261 (1913).

Conventional subrogation, on the other hand, is a right flowing from a contract. It is based on an agreement between the parties that the party paying the debt will be subrogated to the rights and remedies of the original creditor. It arises when a party “having no interest in or relation to the matter pays the debt of another, and by agreement is entitled to the securities and rights of the creditor so paid.” Boley v. Daniel, 72 Fla. 121, 123, 72 So. 644, 645 (1916).

The agreement between the Valen-tis and Glendale that Glendale’s mortgage would take the place of AmeriFirst’s mortgage is classic conventional subrogation under Florida law. Furthermore, subro-gation of Glendale’s mortgage to Ameri-First’s second mortgage does not prejudice the rights of Eastern because Eastern received what it bargained for.

Where the relative positions of the parties are clearly fixed by terms of contracts, and enforcement of the contracts will not prejudically affect the rights of innocent persons or otherwise work an injustice, there is no need to resort to equity.

On a theory of conventional subrogation the trial court was correct in holding that as a matter of law Glendale’s mortgage had priority over Eastern’s mortgage.

Summary Judgment is Affirmed and modified in that subrogation only applies to the amount of the original $48,000 second mortgage held by AmeriFirst. The cause is remanded for further proceedings. 
      
      . Glendale’s mortgage loan was for $61,000; $48,000 of which was used to satisfy Ameri-First's second mortgage.
     
      
      . Conventional subrogation arises from an agreement between the party seeking to be sub-rogated and either the debtor or the creditor. If the agreement is with the creditor, then it is essentially an assignment. However, when the agreement is between the subrogee and the debtor, critics have questioned how such an agreement can transfer the creditor's rights to the subrogee. Actually, that agreement does not transfer the creditor’s rights, but rather acts as a "circumstance which equity will take into consideration in determining whether or not it will allow subrogation.” G. Osborne, On Mortgages § 277, at 783 (1951). In either situation, the intervening lienor’s security interest is not affected by the change of mortgagees on the original debt.
     
      
      . The doctrine of subrogation applies only to the amount of the original $48,000 second mortgage held by AmeriFirst. The amount by which Glendale’s mortgage exceeds the original mortgage is junior to Eastern’s mortgage. Accordingly, the doctrine of subrogation leaves Eastern in the same position it would have been in if AmeriFirst had assigned the mortgage to Glendale.
     