By the Court,
Paine, J.This action was brought to foreclose a mortgage, and the answer set up that it was given for a usurious loan from the plaintiff to the defendant. The transaction occurred while the usury law of 1856 was in force, and, of course, so far as the validity and effect of the contract is concerned, it is to be determined by that law. By that, the contract was only a valid security for the principal sum loaned. But it also contained a provision, that in order for any party to have the benefit of a plea of usury, he should prove a tender of the principal. The answer in this case did not aver any tender, and for that reason the plaintiff demurred, and had judgment on the demurrer, from which the defendant appealed. If the provision of the law of 1856, in respect to a tender, had been in force at the time of the pleading and trial, and applicable to the case, we should have to reverse the judgment, following the case of Platt vs. Robinson, *88decided at last term, in which we held that this provision established the tender only as a condition precedent to the party’s having the benefit of his plea of usury, but did not make it any part of the legal defense, and that it was, therefore, unnecessary to aver it.
But both parties here contend that at the time of pleading in this action, that provision of the law had been repealed, ■ and that being a part relating to the remedy only, it had no application to, or bearing upon this case. We are inclined to think the counsel are right in this position. And that although the provision of the law of 1856, was contained in the Revision of 1858, yet that it was repealed by chapter 160 of General Laws of 1859. This latter act contains a clause providing that it should not be construed to interfere with contracts theretofore made, in accordance with existing laws, which, of course, it could not do. But this particular provision in regard to a tender, does not seem to have had any bearing upon the validity or effect of the contract itself. On the contrary, it was merely an equitable condition which the law required the party to- comply with, before he should have the benefit of an established illegality in the contract. Being repealed, therefore, before this suit was brought, it could have no effect upon it.
The question then remains, what was the effect of an answer setting up usury in a mortgage executed under the law of 1856 ? It would seem to follow, necessarily, though the counsel for the respondent does not so regard it, that the defendant would not be required to either aver or prove a tender of the principal. The law requiring him to comply with this condition, being repealed, he would, of course; be no longer bound to comply with it, but would be at full liberty Avithout it, to insist upon any invalidity of the contract. By the usury law of 1851, usurious contracts were void. By the law of 1856 they were *89made valid to secure the principal loaned, but were left void so far as the interest was concerned. The defendant, therefore, by setting up usury, set forth a good defense to all of the plaintiff’s claim beyond the principal he received.
And supposing the allegations of the answer to be established, and that the plaintiff, as a mere evasion of the usury law, required the defendant as a condition of the loan, to purchase a quantity of wheat at a price, more than double its real value, and to perform services for the plaintiff, the principal received should be estimated at the money actually received, and the actual value of the wheat, less the value of the defendant’s services. For this principal the contract was valid, for all beyond it was void. The court erred, therefore, in sustaining the demurrer to the answer. It should have tried the question of usury, and if established, should have given judgment for the principal only.
The suggestion of the respondent’s counsel that the only remedy of the defendant was to pay the usury, and recover three times the excess under the provision of the act of 1859, is certainly unfounded. That is a remedy given for. those Avho have paid. But it surely furnishes no implication that those who have not paid, cannot set up the invalidity of the contract as a defense, when sued upon it. Nor does it nqed an act of the legislature saying expressly that a man may set up that defense. It is sufficient for the law to declare the contract invalid in whole or in part, and then any one sued upon it may always set up that invalidity. If the law imposes on him any condition, as in the act of 1856, that he must comply with, but in the absence of any such, he is at full liberty to show any illegality in the contract, and when shown, it is the duty of the court to refuse to enforce such illegal provisions.
The judgment is reversed with costs, and the cause remanded for further proceedings.