Alvey, J.,
delivered the opinion of the court.
There can be 110 question but that Neidig, by releasing the mortgage from Weddle, reciting payment of the mortgage debt, lost the benefit of the lien or charge created by that mortgage, although the mortgage debt may not, in fact, have been paid. And it is equally certain that the release is *not susceptible of parol explanation in order to connect the released mortgage with that subsequently executed by Lechlider to Neidig, of the same property, for $4,000, and thus to create an equity by which the latter mortgage may be allowed to overreach the judgment in favor of Whiteford, of the 24th of July, 1856, and take precedence of it in the distribution of the proceeds of the mortgaged property. By the release, the *184mortgagee lost the priority of lien created by the first mortgage, and the second mortgage must be postponed to all liens attaching to the property prior to its date. Woollen v. Hillen, 9 Gill, 185. If, therefore, Whiteford’s judgment created a valid lien, and remains unsatisfied, it takes precedence of Neidig’s mortgage, and is entitled to have, under the arrangement made by the insolvent trustee with the purchaser, the proceeds of sale of the mortgaged property applied to its payment.
Upon this judgment two questions arise :
1st. What was the true character and object of the judgment ? and
2nd. Whether it has been paid and discharged by the subsequent course of dealing between the parties thereto.
■ x. It is now settled that a judgment, as well as a mortgage, may be taken to secure future advances and liabilities when such is a constituent part of the original agreement under which it was entered; and any future advances, not exceeding the amount of the judgment made thereunder, will be covered thereby. The question, therefore, is, was there a definite and certain agreement entered into at the time of confessing the judgment by Weddle, that it was to secure future advances or balances on account between the parties? We think this question must be answered in the negative.
The judgment itself furnishes no evidence that such was its character and object. On the contrary, it would rather show that it was rendered to secure a then subsisting debt. It was for $3,500, with interest thereon from the day of its date. Weddle was, at the time of confessing the judgment,*indebted to Whiteford in or about the amount for which the judgment was rendered; and Weddle swears positively that it was not intended to secure future advances, or balances, but was given as collateral security for his then indebtedness to Whiteford. And this is corroborated by the order filed on the 1st of September, 1857, whereby the parties stated, that on settlement of open accounts between them on that day they ascertained a balance of $1,466, to be due to Weddle, “ which is to be credited on the judgment for thirty-five hundred dollars, confessed by said James W. Weddle in favor of the said James Whiteford, for an antecedent indebtedness.” This paper was signed by both parties, and the judgment was released to the *185extent of $1,466, the amount then admitted to be found due to Weddle on settling accounts. If the judgment were really taken to secure future advances or balances, it would seem natural to suppose that the language of this order of the 1st of September, 1857, would have been different, and such as would have aptly characterized the judgment. It is true, Whiteford himself swears that the judgment was taken solely for the purpose of securing balances that might be ascertained to be due from time to time on account current. But his evidence, looking to his relation to these proceedings, cannot be allowed to outweigh all the other facts and circumstances of the case. Besides, he is excepted to as an incompetent witness, and Neidig being dead, and his administratrix a party contestant of the claim, we think the exception well taken, under the Act of 1864, ch. 109; and his testimony, or at least so much of it as was elicited on his own examination, must, therefore, be excluded. And upon the whole evidence, legally before us, we fail to discover any thing sufficient to overcome the prima facie character of the judgment, the positive testimony of Weddle, and the other corroborative circumstances of the case. We conclude, therefore, that the judgment was intended only as collateral security for the indebtedness of Weddle to Whiteford at the time of its rendition.
2. Supposing the judgment to be so intended, and not to secure future advances, or balances on account, the question *then is, has it been discharged. The amount for which it was rendered as security, was kept in the account, and there has been no reference made in ascertaining the balances to the judgment whatever. The account was a continuous one, commencing before the date of the judgment, and terminating in May, 1857. Large and numerous credits were entered in the account between the parties since the date of the judgment, amounting to many times more than sufficient to pay and extinguish the balance due on the account at the time the judgment was rendered. What is the effect of these credits, in the account, on the judgment? The judgment was taken as collateral security only, and it follows, if the principal debt for which it was intended as security be paid, the judgment is functus officio, and is no longer capable of being enforced. This is the legal consequence. The question, therefore, resolves it*186self into one of application of payments. And in reference to the principle governing such a case as this, the law is clear. The general rule is, that the debtor has the right, if he so elects, to make the application of payments in the first instance, and if he omits so to do, the creditor may make the appropriation; but if neither make any appropriation, the law appropriates the payment to the earliest and, generally, the most onerous debt. Mills v. Fowkes, 5 Bing. N. C. 455; Gwinn v. Whitaker, 1 H. & J. 754; Dorsey v. Gassaway, 2 H. & J. 402. Here there has been no appropriation of payments by either debtor or creditor; but the account between them; kept alone by the creditor, has been treated as one entire or continuous account; and, in such case, 'payment is deemed, in legal contemplation, to be made in discharge of the earlier items of the account, so that the-creditor cannot select any particular items and appropriate the payment to their discharge, to the exclusion of the earlier items in the account. This was decided in Bodenham v. Purchas, 2 B. & Ald. 39; and because that case is so analogous to this in many of its facts, it is deemed not inappropriate to state it somewhat at large. *There a bond was given to several persons constituting a banking firm, conditioned for the re-payment of the balance of an account, and of such further sums as the bankers might advance to the obligor. One of the partners died, and a new partner was taken into the firm, and at that time a considerable balance was due from the obligor to the firm. Advances were afterwards made by the bankers, and payments made to them on account by the obligor. The latter was credited by the new firm with the several payments, and charged with the original debt and subsequent advances as constituting items in one entire account, and the balance due at the time of the partner’s death was considerably reduced, and that reduced balance, by order of the obligor, was transferred by the bankers to the account of another customer, who, with his assent, was charged with the then debt of the obligor. The person so charged having become insolvent, the surviving partners of the original firm brought their action upon the bond; and it was held that as they had not originally treated it as a distinct account, but had blended it in the general account with other transactions, they were not at liberty so to treat it at a subsequent period; and that having received, in different *187payments, a sum more than sufficient to discharge the debt due upon the bond at the time of the death of the deceased partner, that the bond was to be considered as paid. Bailey, J., in delivering his opinion, said: “ The parties balance their accounts every three months, and in the next quarterly account, they bring forward the balance of £1,420, and make it an item in one entire account, subsisting between these parties. The account goes on from 1810 till 1813; and the then balance is treated as one entire balance of one entire account, as the result, of all the transactions between the parties in the intermediate time. The plaintiffs were not bound to have so treated it at Havard’s death, but having done so, there is not any authority for saying that they are now at liberty to apply the several payments in reduction of the debt incurred by the subsequent advances, *to the exclusion of the bond debt. It certainly seems most consistent with reason, that where payments are made upon one entire account, that such payments should be considered as payments in discharge of the earlier items.” And Abbott, J., in delivering his opinion, refers to Clayton’s Case, x Merivale, 572, which is a leading case upon the subject, and quotes the language of Sir William Grant, as decisive of the question before him. The passage quoted from the opinion of Sir William Grant, was that in which he said: “ In such a case,” (that is a running account, )“ there is no room for any other appropriation than that which arises from the order in which the receipts and payments take place, and are carried into the account. Presumably, it is the sum first paid in that is first drawn out. It is the first item on the debit side of the account which is discharged or reduced by the first item on the credit side. The appropriation is made by the very act of setting the two items against each other. Upon that principle, all accounts current are settled, and particularly cash accounts.” In this case, as in the case just stated, the balances ascertained at each periodical rest, wrere charged in the subsequent parts of the continuous account, and, at the close, the balance is then ascertained as an entire result of all the transactions between the parties in the intermediate time between the commencement and close of their dealings.
The same principle of appropriation of payments was adopted by the Supreme Court of the United States, in U. S. v. Kirk*188patrick, 9 Wheat. 720, where that court said: “ In cases like the present, of long and running accounts, where debits and credits are perpetually occurring, and no balances are otherwise adjusted than for the mere purpose of making rests, we are of opinion that payments ought to be applied to extinguish the debt according to the priority of time; so that the credits are to be deemed payments pro tanto of the debts antecedently due.” And the same principle was re-asserted, by the same court, in Jones v. U. S. 7 How. 681, after an examination of all the authorities.
*We are of opinion, therefore, that the judgment, having been given as collateral security for such balance as was due to Whiteford on account, at the time it was confessed, is discharged by the subsequent payments on account ; it appearing that such payments or credits greatly exceed in amount the balance for which the judgment was given.
The order appealed from will be reversed and the cause remanded, that further proceedings may be had in the premises.
Order reversed and cause remanded.