delivered the opinion of the court:
William S. Pilcher, having a judgment against J. J. Marshall, and a return on an execution which issued thereon, of “ no property,” filed a bill on the 24th of April, 1845, in the Louisville chancery court, against the defendant in the judgment, for a discovery, and for the purpose of subjecting his estate to the payment of the debt.
The complainant filed an amended bill, on the 6th of February, 1846, by which he made Jacob Swigert, the Bank oí Kentucky, and other persons defendants. lie set out various mortgages and liens, that weie asserted by the defendants, or some of them, on the property of Marshall, and prayed that all liens claimed against any of his property might be adjust*281ed, and all improper incumbrances be removed ; and that so much of the property as was not legally subject to any lien, might be applied to the payment of the judgment at law, as set up in his original bill.
Many years before this suit was commenced by Pilcher, J. J. Marshall, being indebted to the Bank of Kentucky in the sum of about five thousand dollars, on which debt Thomas A. Marshall and others were his sureties, executed to his said sureties a mortgage on his farm, called Rosedale, to indemnify them on account of said liability. This farm had been purchased by Marshall from William Pope, to whom, at the date of the mortgage, he still owed a portion of the purchase money.
Pope afterwards instituted his suit in the Louisville chancery court, to enforce his lien for the unpaid purchase money. He made the Bank of Kentucky a defendant, as mortgagee. By the proceedings in said suit the court determined that J. J. Marshall owed Pope $1,010 20, with interest thereon from the 1st of February, 1840, until paid, and to the Bank of Kentucky $4,158 96, with interest from the 7th of September, 1839, until paid, and ordered Rosedale to be sold for the payment of these sums.
On the 6th of December, 1841, J. J. Marshall became the purchaser, at an execution sale, of five hundred acres of land in Boone' county, which then belonged to Fowler, at the price of $2,814 80.
By an agreement between the Bank of Kentucky and Marshall, entered into on the 91 h of March, 1842, the bank paid Pope his debt, and postponed the sale of Rosedale under the decree in chancery, until after the 6th of December, 1842; and, in consideration thereof, Marshall transferred to the bank the benefit of his purchase of the five hundred acres of Boone land, as further and additional security for the payment of the debts in the decree mentioned.
On the 1st of August, 1842, Jacob Swigert became the purchaser of Marshall’s equity of redemption in *282Rosedale, tinder a sale made by execution, and in March, 1844, the sheriff conveyed that equity of redemption to Swigert.
Swigert contends that he made this purchase under an agreement with Marshall, that he was to hold the property as security for the whole amount which Marshall owed him-, and not merely as a purchaser of the equity of redemption. To establish this fact he relies upon a letter written to him by Marshall before the sale, and' also upon a writing which he afterwards executed.
It becomes material in this controversy, to determine the nature and extent of the right acquired by Swigert, by his purchase of the equity of redemption in Rosedale, under the alledged arrangement with Marshall; because if, as it is insisted by the adverse parties, he did not acquire any thing by his purchase but the mere equity of redemption in the property, as that equity then existed, then, so far as he is concerned, the decree of the court below, disposing of the proceeds of the sale of Rosedale and of the Boone land, did not operate to his prejudice; inasmuch as the property did not sell for enough to pay the previous liens that existed upon it.
The conclusion that he made the purchase under an agreement with Marshall, that he was to hold the property as a security for the whole amount due to him from the latter, is, in our opinion, incontmvertibly established by the written documents adduced as evidence on the subject.
A letter written by Marshall to Swigert, previous to the sale, contains the following concluding paragraph :
“I repeat, I wish you to purchase the equity of redemption, and though I pay this debt, to hold the equity as further indemnity against all our transactions.”
And in December, 1844, Marshal executed a writing acknowledging his indebtedness to Swigert on *283settlement, in the sum < f $3,795 14, which writing contains the following statement: “To secure the payment of the above sum of money, Swigert holds a lien on my residence near Louisville, which he purchased under execution.”
Now, the only lien which Swigert held on the property referred to, was that acquired by him under the arrangement made with Marshall previous to the purchase of the equity of redemption therein, and in conformity with which the purchase was made by him. If is, therefore, perfectly evident that the parties regarded that purchase as conferring on Swigert a lien upon the property, to secure the payment of the whole amount that Marshall owed him.
But it is contended that such an agreement, if entered into, could not operate to enlarge the legal effect of the purchase of the equity of redemption, and therefore Swigert can only claim in this controversy the same interest in the property that he would have acquired by his purchase, in the absence of any agreement between him and Marshall.
It may be, as intimated in the case of Addison vs. Crow, 5 Dana, 280, that the equity of redemption cannot be legally sold under execution, after a suit has been instituted by the mortgagee, (as was the case here,) to sell the property mortgaged ; and that the execution creditor must, in such a case, make an application to the court to be made a party to the suit, and be thus placed in an attitude to assert his demand. We do not, however, decide this point at this time, as it is not necessary to do so. The mortgagor, even after a decree of foreclosure and sale, is regarded in equity as the owner of the property. If he should pay the debt, as he would have an undoubted right to do, the property would still belong to him. If a sale be made, only so much of the property will be sold as is required to pay the debt, and the residue, whatever it may be, will still belong to him.
1. A mortgagoi, even after a decree of foreclosure and order of sale, is still regarded in equity as the •owner of the mortgaged property. Be has the right to pay off the debt and hold the property. If a sale is made, only so much wili be sold as will pay the mortgage debt. Consequently the mortgagor has the right to procure another to pay the mortgage debt for liim or to buy the equity of redemption when it is sold under execution, and give such purchaser a lien for the price paid, and for any other liabilities to such purchaser, who will occupy the position of a second mortgagee. 2. A valid lien in eanity maybe created by writing not under seal.Marshall then, at the time he made the agreement with Swigert to purchase the equity of redemption, had an interest in the property, which he had a right to transfer to the latter as an indemnity. The mode which the parties adopted to effect that object, although not the most eligible, was, as between themselves, valid and obligatory in a court of equity. Marshall having consented to a sale of the equity of redemption, for the very purpose of creating a lien upon the property, was estopped from denying the validity of a purchase thereof, made at his own instance. Neither could he have claimed the right to redeem, by the payment merely of the amount of the purchase money; inasmuch as he had agreed that the purchaser should have a lien on the property, by virtue of his purchase, for the whole amount that he owed him. Had he subsequently paid any part of the mortgage debt, the payment would have enured to the benefit of Swigert, by increasing the value of the interest in the property to which his lien had attached. So far as the parties themselves were concerned, Swigert occupied the same attitude precisel}1- that he would have done, if he had been a second mortgagee by a formal conveyance. It was in the power of the parties, by an agreement, to impart to the purchase of the equity, the same effect as between themselves, that would have resulted from the execution of a deed of conveyance on the property, for the purposes contemplated by thier agreement.
It is contended however, that as neither of the papers evidencing the agreement and the lien claimed under it, is under seal, that they are ineffectual to create any lien upon the property. This objection to the writings bears ah.ne upon the question of their legal validity. It is, however, alone in equity that the agreement can have any effect, and an equitable lien on real estate could be created when the writings alluded to were executed, by a written agreement which was unsealed. Indeed, when the *285last writing was executed, a seal to a deed had been dispensed with by the statute. But this is not material in this controversy, inasmuch as the writing, not having been recorded, can only be made available in a court of equity, where it is valid without being under seal.
3. A creditor-having a lien upon two funda may, by a subsequent lien-holder on one of the funds, be compelled to exhaust the fund upon which the hitter has no lien, before resorting to that on which he has a lien also.Considering Swigert, then, as being invested with an equitable lien on Rosedale, valid as against Marshall, the question occurs, did it give him any right in equity to have the interest in the land in Boone, which Marshall transferred to the Bank of Kentucky as additional security, appropriated to the payment of the debts for which the bank held a mortgage on the same property on which Swigert’s lien existed.
The doctrine is well settled, that if one creditor have a lien on two funds, and another have a lien of a younger date upon one only of the two funds, the latter will have an. equitable right to have the debt of the prior creditor paid out o.f the fund to which the lien of the latter-does not extend; or to have th.e lien on that fund assigned to him, and to receive from it all the aid it can afford him. (Bank of Kentucky vs. Vance, 4 Littell, 169; Story's Equity, sec. 633; 1 Johnson's Chancery, 412 )
It is denied, however, that this principle can apply in this case. It is contended that there is an interposing equity, which was acquired by the bank before she had any notice of the equitable lien claimed by Swigert, and that consequently a court of equity will never marshal securities- when, the rights of others, fairly acquired, will be thereby prejudiced.
It appears that, on the 19th of July, 1845, the sheriff of Boone conveyed the five hundred acres of land in Boone county to the bank; and that afterwards, on the 30th of January, 1846, Marshall executed a writing, authorizing the bank to sell the land, and directing the proceeds of the sale, or the greater part thereof, to be applied to the payment of other debts, due by him to the bank, than those for the payment *286of which the property on which Swigert had a lien was liable.
It is contended, on the part of the bank, that she had no notice of the existence of Swigcrt’s lien, when this appropriation of the fund was made by Marshall; and that as she had obtained the legal title to the land, without any notice of his lien, and having sold it, had the fund in her possession, that a court of equity ought not to deprive her of it, to pay it to another creditor, and leave the debts due to her unpaid.
Swigert alledged in his answer and cross bill, that he frequently informed the bank of his claim, and conversed with the president and her attorney on the subject; and he called upon the bank to answer and say, if he did not, long previous to January, 1846, inform them of his lien, and reliance on the Rosedale farm as his security for a large sum of money due from Marshall. In response to this interrogatory, the bank admitted in her answer, that Swigert and Marshall both stated to the president and counsel of the bank that Marshall was indebted to Swigert, and that Swigert was secured, and held the equity of the residence of Marshall, as additionahsecurity for the balance due him. It is true that the bank, in an amended answer to Swigert’s cross bill, denied all knowledge of the existence of the writing, executed by Marshall to Swigert, bearing date the 14th of December, 1844, until it was filed in this suit. But the knowledge of that writing was not material. The bank was apprised that Swigert claimed to hold a lien on Rosedale, to secure him in the payment of a balance due him by Marshall. It is expressly admitted that he informed the bank that he looked to the fund arising from the sale of the Boone land, to come in aid of his lien on the other property. It is perfectly evident, from the answer of the bank, that she was informed by Swigert, long before she obtained the legal title to the Boone land, that he held a lien on the property for the whole balance due to him *287from Marshall, and not merely for the sum bid by him when he purchased the equity of redemption, and therefore her knowledge of the existence of the writing referred to was wholly immaterial. Besides, it is evident that Swigert, in his arrangement with Marshall, looked to the Boone fund as enhancing the value oí his lien on Rosedale. He so informed the bank after his purchase, and as the control of this fund had been acquired by the latter, for the very purpose of contributing towards the payment of the debts for which the Rosedale property was bound, he had a right in equity to have it thus applied.
4. The chancellor will not divest a creditor of a fund which has been transferred to him by an insolvent debtor, for the purposeof bene fitting another creditor of the insolvent, when the equities are equal, until all his just claims against the insolvent aro satisfied. unless such claims were created subsequently to notice of the equity of the creditor seeking to subject it.*287As then, the Bank was apprised of Swigert’s lien before she acquired the legal title to the land, and before the money that might arise from the sale thereof had been directed by Marshall to be applied to other debts due by him to the bank, the rights of Swigert cannot be prejudiced, either by such subsequent acquisition of the legal title, or by the directions afterwards given by Marshall in relation to the disposition of the fund.
At the time that Marshall transferred to the bank his interest in the Boone land, under the agreement already referred to, he owed the bank, besides the debts therein mentioned, another debt of $1000, for which Fowler and Scott were his sureties. It is therefore now insisted, that as to this debt, at least, the bank has an equity on this fund superior to that of Swigert. As Marshall’s interest in this land was transferred to the bank, for the express purpose of being applied to the payment of the balance of the $5000 debt, and the debt paid to Pope by the bank, to pay which debts a decree to sell Rosedale had been rendered, it is conceded by all the parties to this controversy that those twm debts have to be first paid, and the only contest between them is in regard to the residue of the two funds.
The debt referred to, of one thousand dollars, was owing to the bank by Marshall, before Swigert became interested in the Rosedale property. But as *288the terms of the transfer of the Boone land were explicitly set forth, and did not embrace this debt, Marshall still had an equity in that property, which he could have disposed of, unaffected by it, unless the fact of his insolvency would have given to the bank a right in equity to have insisted on its payment, as well as the payment of the debts specified in the agreement of the parties, before she should be deprived of the possession oí the fund. We think it is a very clear proposition, that Marshall himself would not, under the circumstances, have been aided by a court of equity to withdraw the fund from the hands of ihe bank, until this debt, as well as the others, had been paid. Swigert’s equity on the fund cannot be stronger or more available than that of Marshall himself. Being a mere creature of equity, it must be subject to such just and equitable regulations as will prevent it from operating unjustly on the rights of others. The bank had a transfer of Marshall’s right to the land, which did not, .it is true, invest her with the legal title, until the sheriff’s deed was executed, but it conferred on her a right in equity to refuse to surrender the title she had acquired, until the debt for one thousand dollars was paid, inasmuch as her debtor was insolvent. If an assignee of- Marshall had acquired the legal title, a different question altogether would have been then presented. The bank would have been compelled to seek the aid of a court of equity, and having no specific lien upon the property for the debt, could not have made it liable for its payment. But where one creditor is seeking the aid of a court of equity to reach a fund in the hands of another creditor, the defendant will not be compelled to surrender the fund, until his debt be first paid out of it. So, also, where the plaintiff sets up and relies upon a mere equity; that equity will not be allowed to prevail against an equal equity asserted by the defendant. Besides, the legal title, after the execution of the sheriff’s deed, was by relation vested in the bank from, if not prior to, the *289time of the transfer by Marshall; so that, previous to the assertion of this equity by Swigert, the bank had acquired the legal title to the property, and had, also, an elder and superior equity to the fund arising from its sale.
5. Mbrtgageg and deeds of trust,not recorded, are not valid at law against creditors, -nor against any legal right to the property which. credit ors acquire in good faith; but when the parties contesting all claim under equities, courts of equity decide upon equitable prin.ciples. (Bank iof Kentucky vs. Vance, 4 Littett, 169; Bailey & Carter vs. Welch, 4 B. Mon. 244.)*289But although the bank has a valid equity, to the extent of this debt, yet as she had notice of Swigert’s claim, before the creation of the subsequent debts due to her, she has no equity on the fund to secure their payment. To create debts to operate as a charge upon a fund, with a knowledge that a third person was equitably entitled to it, would involve a violation of good faith, and could not be sanctioned in a court of equity,
The Boone land was subject to some liens which we do not understand to he controverted. The Rose-dale property was also subject to the incumbrance of a dower right, which, after deducting the amount of the debt due to Pope, the original vendor, should attach to, and be estimated alone on, the balance of the purchase money.. After the debts due to the bank, including the one thousand dollar debt, for which Scott and Fowler were sureties, have been satisfied, Swigert will, so far as the bank is concerned, be entitled to the residue of the funds arising from the sale of Rosedale, and the land in Boone county. And unless Pilcher, as a general creditor, can intervene and deprive him of it, he, has a clear equitable right to this part of the fund;
On the part of Pilcher it is argued that the agreement between Marshall and Swigert, not having been recorded, is wholly invalid as to creditors; and consequently that it must yield to the claim of the complainant, who is a judgment creditor.
This whole argument is based on a misconception of the rights of the parties in a court of equity. Mortgages and other deeds of conveyance, and agreements creating liens, which are not recorded, are not valid in a court of law, against creditors, nor against any legal right to the property which they *290may in good faith acquire.. But this doctrine has no application where the parties are all asserting and relying upon mere equities, and are in a court of equity, seeking its aid on equitable principles. (Bank of Kentucky vs. Vance, 4 Littell, 169; Bailey & Carter vs. Welch, &c., 4 B. Monroe, 244.)
6. A general -creditor coming into a court of equity for relief, -cannot, in general, claim anything which the •debtor could not claim, unless in cases of fraudulent disposition by the debtor. He can claim no equitable right which the debtor himself could not assert.A general creditor, when he comes into a court of equity to obtain satisfaction of his debt out of the estate of the debtor, cannot, as a general rule, successfully assert any claim to his debtor’s property, unless indeed where a fraudulent disposition of it. has been made, which the latter could not himself render available. If the debtor have only an equitable interest in property, any lien or incumbrance on that equity, if not fraudulent, that would be valid against the debtor, will also be valid against the creditor, in a court of equity. The creditor has only an equity on his debtor’s estate, and that equity does not exist until he commences his suit to subject some specific part of the estate to the payment of his debt. This equity cannot prevail against an elder equity, for as between mere equities, that which is prior in time is regarded as best, and takes precedence over any which may be subsequently created.
From this doctrine it results that Pilcher, asa general creditor, cannot subject, to the payment of his debt, any part of the Boone fund, or the fund arising ■from the sale of Rosedale, against the rights of Swigert, whose equity thereto existed long prior to the commencement of the present action. Nor has he ¡any right to the fund against the claim of the bank, •all of whose debts were due before his bill was exhibited, and whose equity is equal to that of any attaching creditor. Indeed the bank had acquired the legal title, and converted the land into money before he obtained any' lien whatever on the property. In his original bill he sought a discovery, and the payment of his debt out of the estate of his debtor, but did not proceed against any specific property, nor make any person .a defendant but the debtor himself. *291The matters contained in the original bill were, therefore, insufficient, to create a lien upon the fund in controversy, and that fund had all been appropriated by an arrangement between Marshall and the bank before he filed his amended bill. But this view we consider immaterial, inasmuch as the bank had, when the original bill was filed, an equity to the fund, which a court of equity would not deprive her of in favor of a creditor who had no equity until he filed his bill, and who by that act did not acquire any legal advantage, but only a right in equity to have so much of his debtor’s estate subjected to the payment. of his debt, as could be done without doing injustice to other creditors, or to the claimants of the property.
As the court below has not made any final disposition of that part of the controversy that relates to the lots in the city of Louisville, that branch of the case is not now before us for revision. But we would remark, that, whatever interest Marshall had in the ground conveyed to Swigert, at the time he executed to him the deed of mortgage, passed by that deed to the mortgagee.
The slaves embraced by the mortgage did not belong to the mortgagor, and consequently so much of Swigert’s cross bill as sought to subject them to sale for the payment of his debt, was properly dismissed. But as a contingent interest in the land passed by the mortgage, the cross bill of Swigert, so far as the land that was transferred by James Birney Marshall to J. J. Marshall, was concerned, should have been dismissed without prejudice, and not absolutely.
"Wherefore, the decree of the court below is reversed on the appeal of Swigert against the Bank of Kentucky and Pilcher, and also on the appeal of the Bank of Kentucky against Pilcher, and cause remanded, that a decree may be rendered in conformity with this opinion.
[Chief Justice Marshall did not sit in this case.]