Opinion by
Mr. Justice Sterrett :It will be apparent, we think, from a brief statement of the facts, that the decree from which this appeal is taken was rightly entered.
In October, 1880, Philip J. Dauber borrowed from the company, appellant, $35,000, and gave as security therefor a mortgage of certain real estate in the city of Philadelphia. About a week thereafter, in accordance with his agreement to do so, he assigned to appellant as additional security the policies of insurance, amounting at their face value to $40,000. The purpose of this assignment and its conditions are clearly expressed in the paper contemporaneously executed and delivered by the company to Dauber, in which it covenants and agrees that it “holds the said policies of insurance only as collateral security for the payment of the said mortgage debt of $35,000, and that upon the payment and discharge of said debt, the Pennsylvania Company for Insurance on Dives and Granting Annuities shall and will reassign and transfer all the said nine policies of insurance, amounting to $40,000, to him, the said Philip J. Dauber.” About a. year thereafter appellant loaned to Dauber the further sum of $20,000, upon the security of a second mortgage of the same premises. The policies of insurance were not pledged as security for this loan, nor is it alleged by appellant that they were.
*411In November, 1884, Lauber applied to tbe company appellee and obtained from it a loan of $6,000, secured by an assignment of same policies of insurance subject to the prior assignment to appellant. Shortly afterwards appellant, having obtained judgment on each of its mortgages, issued a levari facias on the first, sold the mortgaged premises, and in January, 1885, purchased the same at sheriff’s sale for $44,000, a sum more than sufficient to pay the first mortgage debt, but not enough to pay both in full.
The appellee, claiming that the first mortgage debt was fully paid and satisfied by the proceeds of sale, and the conditions of the first assignment thereby fulfilled, demanded the policies of insurance, and appellant refused to surrender them. Thereupon the bill reciting substantially the foregoing facts was filed, praying among other things that appellant be ordered to assign, transfer, and deliver the policies of insurance.
The ground of appellant’s refusal to surrender the policies is disclosed by the answer, wherein it says, after referring to the two loans: The second “loan was made by us in the belief that we could apply the collateral then in our hands in such manner as would give us the full benefit of the margin of value of the premises mortgaged a second time, with the least possible diminution, by reason of the first loan and the collateral we then held. . . . We are advised that the first loan was not fully paid by said sale; but that it was our right to first appropriate the proceeds of said sale in payment of the second loan, which was least secured. We have done this and we have appropriated said proceeds toward the payment of said second and least secured loan, and have appropriated the policies of insurance towards the payment of the loan first made.”
The court below rightly concluded that the defense thus set up was wholly insufficient, and accordingly decreed that the mortgage debt, for which appellant held the policies of insurance as collateral security, had been paid and discharged, and directed appellant to assign, transfer, and deliver said policies to the appellee.
It is a principle too well settled to require the citation of authorities, that personal property, pledged specifically as security for a certain loan, cannot be held as security for subsequent advances without an agreement to that effect.
It is not even claimed that there was any such agreement in this case. The sheriff’s sale under the first mortgage dis*412charged the lien of both, and, there being no prior lien creditors, the law appropriated the proceeds, first, to the payment and satisfaction of the first mortgage debt, and the residue on account of the second mortgage debt The legal effect of this was just the same as if Lauber, the debtor, had voluntarily paid the first and taken up his bond. The general rule undoubtedly is that one who owes money upon several distinct securities or accounts has a right to apply his payment to either, as he pleases; but, if he makes a payment generally and without specifically appropriating it, the creditor may apply it as he pleases. If neither debtor nor creditor makes any specific application of the money so paid, the law will appropriate it according to the equity and justice of the case. But this principle applies only in cases of voluntary payments. It has no place in payments in invitum or where the money to be applied is the proceeds of judicial sale of real estate. In such cases the law applies the proceeds in order of their priority, to such liens as are devested by the sale.
Decree affirmed and appeal dismissed, at costs of appellant.