The Chancellor.
If the decree of the vice chancellor an this case was right in other respects, it was clearly wrong in requiring the complainant, upon redeeming under the valid mortgage, to pay to the adverse party the costs of the statute foreclosure. In the case of Benedict v. Gilman, (4 Paiges R. 58,) this court decided that the purchaser, under the statute foreclosure, was only entitled to the amount due on the mortgage under which he purchased; and that the subsequent encumbrancer, coming to redeem, was not bound to pay the -costs of a proceeding which as to his rights was wholly inoperative. The effect of a statute foreclosure is to transfer to the purchaser the rights of the mortgagee, so far as he has any claim or interest in the mortgaged premises for the security of his debt, and also to transfer to him so much of the equity of redemption as was not bound by the lien of a junior mortgage or judgment. The title which Bacon acquired in this case, under the sale to him, was therefore precisely the same as if he had taken an assignment of Watsonss mortgage, and a deed from Bitmas and wife of all their interest in the premises ¡ subject of course to the right of any intermediate encumbrancer by mortgage or judgment, to redeem the premises by the payment of the amount due on the Watson mortgage at the time of the sale, with the interest thereon, if the legal claims of such subsequent encumbrancers were not paid.
The purchase of the premises from Bacon, by the defendant Van Home, and his subsequent conveyance to Smith, with covenants of warranty, operated as a release or extinguishment of Van Home’s right to redeem by virtue of his judgment against Bitmas; so that Smith had the whole legal and equitable title and interest in the premises, subject only to the complainant’s right to redeem if his intermediate liens were not paid. From the view therefore which I have taken of other points in this case, in connection with this fact, it is not necessary that I should express any definitive opinion upon the question whether the testi*532mony showed the $590 mortgage to be usurious. I am inclined to think, however, if the testimony of Kline is to be relied upon as showing the real nature of the transaction, that it was not a case of usury. It appears that Brundage held a mortgage upon the premises for rising of $1200, which was not yet due, and that being in great want of money, he was willing to part with his mortgage for about one half of the amount which was to become due thereon. The substance of the agreement between Vroom and Ditmas was, that the former should furnish the means to buy in that mortgage, and take an assignment thereof to himself; and that he should let Ditmas have the benefit of the discount made by Brundage, except one hundred dollars, provided Ditmas would give a new bond and mortgage on the premises, for the amount actually paid by Vroom on the purchase, and the one hundred dollars of the discount which Vroom was to retain for his own benefit. Even from the testimony of Ditmas himself, I do not understand that Brundage made this large discount as a personal favor to him. But that he made it for his own convenience, because he was pressed for money which he could not otherwise obtain. Vroom unquestionably could have purchased the mortgage for the same discount, and might have retained thewhole nominal amount due thereon, for his own benefit, if he had not been willing to give his brother-in-law the principal benefit of the discount. If Vroom, therefore, had retained the original bond and mortgage, which he bought from. Brundage under this agreement, and which was assigned to him for the full amount due thereon, there can be very little room to doubt that he might have retained those securities as a valid claim upon the land, to the extent of the $690 and the interest thereon. Indeed, I know of no principle either of law or of equity, which could have prevented him from enforcing the assigned mortgage against the land, to that extent. And if he had the right to do that, it would be very difficult to maintain that the subsequent discharge of the assigned securities, and the taking of a new bond and mortgage for the same sum, would be usurious; although such change of securities took place in conformity with the arrangement made between the parties at the time of the sale or transfer of the mortgage from Brundage,
*533Where the usurious security, on which a suit or proceeding is instituted, is a bond and mortgage, or other specialty, the defence of usury cannot be given in evidence under the general issue, or a general answer denying the complainant’s right as claimed by the bill. But the defence of usury must be distinctly set up in the plea or answer of the defendant; and the terms of the usurious contract and the quantum of the usurious interest or premium must be specified, and distinctly and correctly set out. (Comyn on Usury, 203.) The defendant must also prove the usury as laid; and if he fails in proving the usurious contract in the way and manner in which he has charged it in his plea or answer, he must fail. (Tate v. Willings, 3 Durn. & East’s Rep. 538.) The contract for usury in the present case, as charged in the answer of the defendant Van Horne, is materially different from the contract proved by Kline and Bitmas, even if the contract as testified to by them is to be deemed usurious. A more substantial objection, however, to such a defence in the present case is, that Smith, the owner of the land upon which the complainant claims an equity of redemption by virtue of his mortgage, has not set up the defence of usury, or even alluded to it in his answer. He cannot therefore object to the complainant’s mortgage on that ground, or be benefitted by the defence set up in the answer of a defendant who had no interest or subsisting lien upon the mortgaged premises, and against whom the complainant had no legal or equitable claim. Although Van Home had conveyed to Smith with warranty, that did not authorize the latter to insist upon a defence, under the answer of a co-defendant, which he had not thought proper to suggest or to put in issue by bis own answer. I presume Van Horne was made a party, upon the supposition that his judgment against Ditmas was a subsisting lien upon the equity of redemption, and that if the complainant redeemed from Smith, Van Horne would have the right to redeem from the complainant. But, as 1 have before said, the conveyance to Smith, with warranty, was a release or extinguishment of the lien upon the equity of redemption which was conveyed, so far as that judgment was concerned. And it was not necessary to keep the lien of the judgment in force for the pro*534lection of the rights of Smith, as he could at any time obtain a perfect title to the land by paying off the prior liens of the complainant. If the defence of usury against the $690 mortgage actually existed, and Smith was apprised of the fact before he put in his answer, he may have lost his remedy against Van Home upon the covenants of warranty, by his neglect to set up such a defence. That is a question, however, between the defendants, with which the complainant has nothing to do; and the necessary facts are not before me to enable the court now to settle the rights of the defendants as between themselves. That part of the decree of the vice chancellor which adjudges the mortgage for $690 to be usurious and void and that the mortgaged premises are exempt and released from the same, is therefore erroneous and must be reversed. The decree was also erroneous in directing the account to be taken between the complainant and Van Horne as to what was due upon the Watson mortgage. Under the statute foreclosure, and the several conveyances which have been made under the same, whatever was due upon that mortgage passed to Smith ; and it now belongs to his heirs and devisees as the owners of his real estate. For every purpose, except as to the right of the complainant to redeem if his ¿ mortgages are not paid, the original debt to Watson was merged in the real estate, by the statute foreclosure ; and passed as real estate to the subsequent grantees, and was transmitted to the heirs or devisees of Smith upon his death. And if the complainant redeems, they alone are entitled to any portion of the redemption money. The complainant has a right to offset, against the amount due on the Watson mortgage, the rents and profit of the premises since the conveyance thereof to Smith, after deducting from those rents and profits the present value of any permanent improvements made upon the lands by Smith, or those claiming under him, before they had notice of the complainant’s intention to redeem the premises under his mortgages. And if the amount due on the Watson mortgage has been .fully paid, and the value of the mortgaged premises is not sufficient to pay the amount due on the complainant’s mortgages, including the interest thereon, the estate of Smith, in the hands of his personal representatives, is liable for the surplus of the rents and profits received by *535Smith in his lifetime, after his refusal to permit the complainant to redeem. His devisees or heirs, who have received the rents and profits since his death, are also liable, to the extent of the rents and profits received by them.
As a general rule, a party coming into this court to redeem pays costs to the defendant, although he succeeds in obtaining the relief asked for, unless the defendant has improperly resisted his claim; in which latter case the defendant will not only be refused his costs, but may be compelled to pay costs to the complainant, in the discretion of the court. In this case, it is pretty evident that the defendant Van Horne intended to take advantage of the sale under the statute foreclosure, supposing that he could thereby overreach and defeat the lien of both of the complainant’s mortgages. And if he had not parted with all his interest in the land at the time of the formal application to redeem, I should probably have considered his refusal to do justice to the complainant a sufficient reason for charging him with the costs, to which the complainant has been unnecessarily and improperly subjected. But as he had parted with all his interest in the premises before the commencement of the present suit, I can do no more than to leave him, where he is placed by the decree of the vice 'chancellor, to pay his own costs in the suit. As he has not appealed from the decree, I cannot award costs to him, against the complainant, or order the bill to be dismissed as to him, although he does not appear to have been a necessary party to the bill to redeem. The defendant Smith was in a different situation from Van Horne, as he had purchased the premises at their full value, or nearly so, supposing that he was obtaining a perfect title thereto under the conveyance from Van Horne ; and he could not permit the complainant to redeem, except under a decree of the court, without impairing his rights against his grantor upon the covenants of warranty. The vice chancellor was therefore right in not charging his representatives with costs.
The decree of the vice chancellor must be modified so as to declare that the two mortgages of the complainant are a lien upon the equity of redemption, notwithstanding the statute foreclosure, and that he is entitled to redeem unless the pres*536ent owners of the premises shall elect to pay off and satisfy the amount due on those mortgages. It must be referred to a master residing in the county of Seneca, to take an account of what is due to the complainant for principal and interest on his two mortgages, and also to ascertain whether any thing is due upon the Watson mortgage, over and above the rents and profits of the premises since the conveyance thereof to Smith, in February, 1822 ; and if the Watson mortgage and interest have been fully paid by such rents and profits, the master, if requested by the complainant, is also to take an account against the executors of Smith of the surplus rents and profits, if any, received by their testator in his lifetime, after the application to him by the complainant to redeem ; and also an account against such of the defendants as became entitled to the premises upon the death of Smith, as his heirs or devisees, for the rents and profits after that time. And the master is to deduct from the rents and profits the present value of any permanent and beneficial improvements made upon the premises by Smith, or those claiming under him, previous to the application of the complainant to redeem, and also the expenses of ordinary repairs. The master is also to allow interest as shall be equitable, in taking such account. If he is requested by the complainant to take an account against the executors and the heirs or devisees of Smith, as above directed, he is to make a separate report of the amount due to the complainant on his mortgages, and the amount, if any, which remains due upon the Watson mortgage over and above the rents and profits of the premises. And upon the coming in and confirmation of the said separate report, or of the general report, in case no such separate report is made, if the owners of the premises do not, within twenty days thereafter, give to the solicitor of the complainant a written stipulation to pay off the amount due to the complainant on his two mortgages, with the interest thereon, and actually pay the same within sixty days thereafter, then the complainant, upon paying the amount, if any, which is reported due on the Watson mortgage, may have a sale of the premises by a master, upon the usual notice, and with the usual directions for the delivery of the possession upon the production of the master’s deed. And *537out of the proceeds of such sale, the master is to refund to the complainant the amount, if any, which has been paid by him for the redemption of the Watson mortgage, and the amount due upon his two mortgages, with the interest thereon, and to bring the surplus, if any, into court; or if there is a deficiency, he is to report the same to the court. All further questions and directions are to be, reserved until the coming in and confirmation of the said several reports; together with all questions of costs not before disposed of, including the costs of this appeal and of all subsequent proceedings in this suit. The decree also is to be without prejudice to the rights of the heirs or devisees or other representatives of Smith, as against Van Home, under the covenants of warranty, if any such rights exist*