When I overruled the demurrer to the answer in this case, I considered it very clear that the counter claim of the code was invented and designed for just such cases, and that the controversy between these parties could be, and ought to be, settled and disposed of in one suit, and the expense and trouble of a double litigation *499thereby saved. If this cannot be done, it seems to me very clear that the codifiers and the legislature have entirely failed in accomplishing the object they had in view in the provisions relating to the counter claim. By subdivision two of section 149 it is prescribed that the answer of the defendant must contain “ a statement of any new matter constituting a defense or counter claim, in ordinary and concise language without repetition.” By subdivision one of section 150, the counter claims in actions not upon contract for the recovery of damages must consist of “ A cause of action arising out of the contract or transaction set forth in the complaint as the foundation ■ of the plaintiff’s claim, or connected with the subject of the action.” The plaintiff’s claim or cause of action, as the same is stated in his complaint, is as follows: That on the 11th of September, 1851, he became the owner in fee, by virtue of a sheriff’s deed, of that date, of the premises described in the complaint, and he claims that as such owner he is entitled to pay off, and have assigned to him to protect his title, a prior mortgage on the same premises, held by the defendant, which he states he has offered to pay off and of which he has demanded an assignment. He also states that the defendant is proceeding to foreclose this mortgage and refuses to assign it, and prays an injunction to restrain the sale of the premises embraced in such mortgage, and that by the order and decree of this court the defendant may be compelled to assign the mortgage upon being paid the amount due thereon. This is the complaint. The rights of the plaintiff all depend upon his ownership of the fee of the land in question. Such title is the foundation of the claim set up in the complaint. To protect this title he claims an assignment of the prior mortgage, and the right to pay it off, and asks the aid of this court to compel such assignment. The answer of the defendant, by way of counter claim, to which the plaintiff has demurred, asserts that the defendant’s husband, on or about the 29th of August, 1851, procured the sheriff’s certificate under which the plaintiff acquired his title to be assigned to the *500plaintiff for his (Kevins’) benefit, and furnished the money to the plaintiff to redeem said premises under and from a prior sale thereof by another judgment creditor; and sets out an agreement signed by the plaintiff, of the same date of such redemption, reciting that the plaintiff had that day redeemed the said premises and held a judgment against said Kevins for about $500, and covenanting that on the payment of said sum, then exceeding $600, he, the plaintiff, would reconvey the said premises to the defendant, at any time within five years, on the payment of the amount paid on such redemption, with interest; the defendant to pay off the prior .mortgage and indemnify the plaintiff against the same. The answer also states that the defendant had repeatedly offered to pay off the plaintiff’s debt, and requested him to render a just account thereof, and also states that the plaintiff had rendered an account which the defendant deemed unjust, and she had repeatedly requested him to refer it to some person to settle amicably, which he had refused to do. She asks that such account may be settled, and that she may be permitted to pay the same to the plaintiff and have the premises conveyed to her,-and for affirmative equitable relief.
The instrument of defeasance set out in the defendant’s answer is directly connected with the plaintiff’s title. It de? stroys it as a legal title. It show that it is a mere mortgage. The statements of this answer show that the plaintiff holds the legal title merely as a security for his debt and the sum he paid on the redemption. That the possession, and the equitable title, together with her right of dower (never cut off) in the premises are in the defendant. A deed with an agreement to reconvey, contemporaneously executed, are in equity treated as one conveyance and are considered a mere mortgage. (Peterson v. Clark, 15 John. 205. 2 John. Ch. 189. 1 Washington’s Rep. 21. Clark v. Henry, 2 Cowen, 332.) If this answer does not set up a cause of action as a counter claim arising out of the transaction set forth in the pomplaint “as the foundation of the plaintiff’s claim, or *501connected with the subject of the action,” I cannot imagine a case where an answer would comply with this provision of the statute. If the plaintiff, instead of asking that the mortgage in question he assigned to him, had asked to be let into possession of the premises claimed in his complaint to belong to him in fee, can there be any doubt that the defendant might have set up this defeasance and the facts stated in his answer as a counter claim, and ask for affirmative relief against the plaintiff’s title ? Gould not the defendants show that the plaintiff was a mere mortgagee, and offer to redeem and pay off this mortgage and have a reconveyance ? And what is this answer less, in point of principle, than if such had been the prayer of the complaint ? The codifiers in explaining to the legislature the meaning and intent of this counter claim say, “ The first subdivision of this section (sec. 150) is intended to remove a doubt which has been sometimes expressed, whether affirmative relief can be given upon an answer setting up a defense which heretofore would have been accounted equitable only. For example, in the case of an action to dispossess an occupant of land, the defendant claims to occupy under a contract to purchase, and asks on his part for a judgment that the plaintiff give him a conveyance. It is the intention of the code that the whole controversy between the parties should be settled in one action, and that either plaintiff or defendant should have such relief as the nature of the case requires.” (Rep. of Comrs. 1850, p. 267.) This case is within the principle of the one thus suggested. The subject matter of the controversy is the lot of land. The parties have conflicting or cross claims in respect to it. These claims can be, and should all be, settled in one suit. One decree can be made that will settle the whole controversy. (Hunt v. Farmers’ Loan Co., 8 How. 418. Dobson v. Pearce, 2 Kern. 156.)
In Lemon v. Trull, (13 How. 248,) at general term in the 4th district, Judge 0. L. Allen, giving the opinion of the court, says in respect to the counter claim; “ The cases have, *502I think, settled down to the conclusion that when the defendant has a cause of action against the plaintiff upon which he might maintain a suit, such cause of action is a counter claim. The parties then have cross demands.” This was said, obviously, of the cause of action upon contract, and sounding in damages under the 2d subdivision of section 150. But with the qualification that the cross demands or cause of action must relate to the same subject matter with that stated in the complaint, it is equally true in respect to the cause of action' under the 1st subdivision of said section. The cases cited by Judge Allen, I think, fully sustain his conclusion. It was the obvious intent of the codifiers, and of the legislature, to open the largest door for the settlement of conflicting claims between the same parties in one action. The codifiers say, “ The effect of the code is to open the door to remedies, without disturbing rights. It has not. changed the rights of the parties. It has simplified and shortened their remedies.” (Rep. of 1850, 4th ch, on Practice and Pleadings, 267.) This contrivance of a counter claim in sections 149 and 150 together with the provisions in section 274 for giving affirmative relief to defendants, were in furtherance of this purpose and of this policy. And it is the obvious duty of the court, in my opinion, to construe these sections most liberally to advance the remedy; and in furtherance of this policy. Whenever the court can see that complete justice can be done to the parties in respect to their claims and cross claims as set up in the pleadings^ in one suit and by one decree, it should sustain the pleadings and, amend and perfect the same for that purpose, as may be requisite, rather than turn either party out of court upon a technicality, and compel a double litigation. Under the former system, any action at law to enforce the legal title set up in the- complaint in this action could have been met and restrained by a bill in equity setting up the defeasance stated in this answer and claiming to redeem, and for a reconveyance. And I can conceive of no form of action in equity founded upon the legal title set *503up in such complaint, wherein the defendant might not have set up such defeasance in a cross bill, and have prayed for the same affirmative relief sought in the answer or counter claim covered by this demurrer. (See 2 Cox, 78; 1 Hopkins, 48; White v. Buloid, 2 Paige, 166; 3 Atk. 133.) It is suggested in argument that the defendant was in the wrong in commencing the foreclosure of the prior mortgage; This, I think, is so; but the court can take care of that question on the final decree, as the costs will be in its discretion, and the defendant can be charged with the costs. But this wrong cannot change the plaintiff's mortgage into a legal title, or divest the defendant of her right of redemption and reconveyance ; for the law is well settled that “ once a mortgage always a mortgage.” (Harris v. Harris, 1 Verm. Rep. 190; 2 id. 402. Clark v. Henry, 2 Cowen, 332.)
[Cayuga General Term, June 7, 1858.T. R. Strong, Smith and Johnson, Justices.]
The demurrer is not well taken, in my opinion, and the order of the special term, overruling the same, should be affirmed.
Judgment reversed.