
318 N.W.2d 878 (1982)
211 Neb. 419
John L. HOPPE, Jr., Appellee,
v.
PHOENIX HOMES, INC., Appellee, James E. Lintel and Eldon Krugman, Appellants.
No. 44462.
Supreme Court of Nebraska.
April 30, 1982.
*880 John J. Goc and David J. Powers, Lincoln, for appellants.
Ward F. Hoppe of Mattson, Ricketts, Davies, Stewart, Calkins & Duxbury, Lincoln, for appellee Hoppe.
Submitted without oral argument.
KRIVOSHA, C. J., and BOSLAUGH, McCOWN, CLINTON, WHITE, HASTINGS, and CAPORALE, JJ.
KRIVOSHA, Chief Justice.
The appellants, James E. Lintel and Eldon Krugman, appeal from a judgment entered by the District Court for Lancaster County, Nebraska, finding that the appellee John L. Hoppe, Jr., is entitled to a first lien upon certain real estate located in Lancaster County, Nebraska, under the doctrine of conventional subrogation. Lintel and Krugman, judgment lienors, were determined by the court to hold liens subordinate and inferior to the lien of Hoppe. We affirm, except as otherwise modified in this opinion.
Prior to June of 1980, Haugland Development, Inc., was the owner in fee simple of Lots 17 and 18, C. E. Montgomery's Addition to the City of Lincoln, Lancaster County, Nebraska (Lots 17 and 18). This property, together with other property owned by Haugland, was subject to mortgages in favor of First National Bank & Trust Company of Lincoln (First National Lincoln) totaling $37,300. There were no other liens or encumbrances on Lots 17 and 18. Haugland Development, Inc., later changed its name to Phoenix Homes, Inc., although the corporate officers and ownership remained the same. It defaulted in this matter and, for purposes of this appeal, may be disregarded.
On June 2 and 3, 1980, Lintel and Krugman, respectively, were awarded judgments against Phoenix. These judgments were rendered in the District Court for Lancaster County, Nebraska, and constituted judgment liens against Lots 17 and 18, as well as any other property owned by Phoenix in Lancaster County, subject only to the lien in favor of First National Lincoln.
In July of 1980, Phoenix, then being indebted to Hoppe, advised Hoppe that Phoenix was then in default of payment on the mortgage to First National Lincoln. Phoenix proposed that Hoppe pay $18,000 to First National Lincoln and obtain a release of mortgages as to Lots 17 and 18. Phoenix would then convey title to Hoppe who, in turn, could obtain a first mortgage loan on the property. The parties proposed to construct two duplexes on the property and share the profits 50-50. Phoenix would do *881 the construction work and Hoppe would provide the material. The parties further agreed that any profits which Phoenix might realize from the duplexes would be first applied to the debt to Hoppe.
Pursuant to the plan, Hoppe executed and delivered to First National Lincoln an unsecured note in the amount of $18,000 and in return received releases of the mortgages as to Lots 17 and 18. Title to the property was then conveyed by Phoenix to Hoppe, who then proceeded to obtain a construction loan from First Federal Savings and Loan Association of York, Nebraska (First Federal). It was at this point that Hoppe was advised by First Federal that it could not make a loan on Lots 17 and 18 due to the judgment liens of Lintel and Krugman. Suit was then filed by Hoppe seeking to have it declared that Hoppe held a first lien upon Lots 17 and 18, and to foreclose the interests of Lintel and Krugman. Following a trial to the court, the trial court entered a judgment generally in favor of Hoppe. Specifically, the trial court found and decreed that Hoppe held a valid first lien on Lots 17 and 18 to the extent of $18,000 plus interest. The trial court further found that Lintel held a second lien and Krugman a third lien by reason of their judgments. The trial court ordered Lintel and Krugman, or either of them, to pay to Hoppe the amount of his first lien, and in the event of default of payment of the amount due Hoppe within a period of 40 days, ordered the title to the two lots quieted in Hoppe as against the interests of Lintel and Krugman and a final decree entered quieting title in the name of Hoppe and against Lintel and Krugman after the lapse of 40 days if redemption was not made.
In arriving at its decision, the trial court employed the doctrine of conventional subrogation. The trial court was correct in doing so. In the case of Hoagland & Co. v. Decker, 118 Neb. 194, 197, 224 N.W. 14, 15 (1929), we explained the doctrine, saying: "Courts recognize two kinds of subrogation, legal and conventional, and sometimes when the term is used without qualification legal subrogation is meant and may thus give rise to a misunderstanding of some of the court's holdings. The word `conventional' is defined as growing out of or established by convention; that is, an agreement or mutual engagement between persons. As the name implies, conventional subrogation is founded upon some understanding or agreement, express or implied, and without which there is no `convention.' Legal subrogation follows as a matter of legal right without any agreement."
The distinction between conventional subrogation and legal subrogation had earlier been set out in our decision in State v. Holdrege State Bank, 110 Neb. 814, 819, 195 N.W. 120, 122 (1923), where we said: "Conventional subrogation arises where one pays the debt of another under an agreement, existing at the time of the payment, with either the debtor or the creditor, that the person paying shall be subrogated to the liens existing as security for the debt. It differs from legal subrogation which exists only in favor of the surety for the payment of the debt, or one who is compelled to pay the debt to protect his own rights. Conventional subrogation arises by reason of either an express or an implied agreement between the third person paying the debt and either the debtor or creditor." (Emphasis supplied.)
We have acknowledged that the use of conventional subrogation is intended to promote the ends of justice and no clear and concise rules can be laid down concerning its application. In Jones v. Rhodes, 162 Neb. 169, 171-72, 75 N.W.2d 616, 618 (1956), we said: "`No general rule can be laid down which will afford a test in all cases for conventional subrogation. Whether or not the doctrine of conventional subrogation is applicable in any particular case depends upon its particular facts and circumstances, the principle not being enforced as a matter of legal right, but in order to subserve the ends of justice in the particular controversy under consideration.' ...
"`* * * where one having an interest in property pays off an encumbrance on the property in order to protect his interest, he is ordinarily entitled to be subrogated to the rights and remedies of the person paid, provided the debt secured by the encumbrance *882 is not one for which the payor is primarily liable, and the grant of such relief is equitable.'"
In the case of Prudential Ins. Co. v. Qualset, 116 Neb. 706, 218 N.W. 734 (1928), this court was presented with a situation somewhat similar to the instant case. In determining that the doctrine of conventional subrogation should be applied, we said at 709-10, 218 N.W. at 735: "`The right of subrogation for moneys loaned on a mortgage used to pay prior mortgages must be predicated upon some recognized equitable principle, such as mistake, an agreement or understanding that the loan was for the express purpose designed, or the like.'
....
"`... And generally, where one pays or advances money to pay a mortgage debt with the understanding that he is to have the benefit of the mortgage, he becomes the holder of the lien by subrogation, although the creditor is not a party to the agreement.'"
And, likewise, in the case of American Savings & Loan Ass'n v. Barry, 123 Neb. 523, 529, 243 N.W. 628, 631 (1932), when again presented with a case requiring the application of conventional subrogation, we said: "`Where a prior mortgage was released and a new one executed for the same debt, but owing to negligent search intervening judgments were not discovered, the mortgagee was entitled to be restored to the lien of its canceled mortgage as against the judgment creditors; they not having changed their position to their prejudice.'"
We believe that the facts of the case, as generally agreed to by the parties, justify the application of the doctrine of conventional subrogation. It is clear that the mortgage loan to First National Lincoln was already in default. Had no payments been made to First National Lincoln by Hoppe, it is likely that First National Lincoln would have proceeded to foreclose against the property, and the rights of the judgment creditors, Lintel and Krugman, would have been extinguished. It was only because of Hoppe's agreement to make payment on a debt which he did not owe, but which he did nevertheless pay for the purpose of protecting another debt owed to him by Phoenix, that the mortgage of First National Lincoln as to the two lots in question was released. Obviously, the same result could have been obtained had the parties thought to receive an assignment of the mortgage. It cannot be said that Hoppe was a volunteer. Moreover, it is clear that Hoppe would not have assumed the debt to First National Lincoln except for Phoenix' promise that Hoppe would thereby acquire title to Lots 17 and 18 free and clear so that a construction loan could be obtained. No one denies those facts. Just as we applied the doctrine of conventional subrogation in the American Savings & Loan case and the Prudential case, we believe that it should likewise be applied in the instant case. The trial court was correct in doing so in this case.
We are, however, uncertain as to why Lintel and Krugman should be required to pay Hoppe or be foreclosed of any interest in the property prior to an actual sale of the property. Hoppe argues to us, as he apparently argued to the trial court, that by so decreeing the trial court did nothing more than what a sale of the property by the sheriff might bring about. That may be true. On the other hand, the first lienholder may not wish to bid the full value of his lien. We cannot, as a matter of law, say that the first lienholder must bid the full value of his lien, though, to be sure, in most instances that will be the case. Nevertheless, the junior lienholders are entitled to the same treatment as anyone else in a foreclosure of real estate and are entitled to have the property sold at public auction and await the outcome of the purchase price. Hoppe cites no legal authority to us which supports such a rule of law as contended for by Hoppe or granted by the trial court. The action of the trial court in attempting to expedite the legal process is commendable, but apparently without legal authority. We believe that portion of the order requiring Lintel and Krugman to make payment or be foreclosed should be deleted. We therefore affirm the decree of the trial court insofar as it determined that Hoppe has a first lien on Lots 17 and 18 to the extent of the payment made by Hoppe *883 to First National Lincoln, plus interest, that Lintel has a second mortgage by reason of his judgment and Krugman has a third mortgage by reason of his judgment, but we delete any further requirement that obligates Lintel or Krugman to make payment within a specific time. The property should be foreclosed and ordered sold in the normal manner. The judgment of the trial court is affirmed as modified.
AFFIRMED AS MODIFIED.
