The plaintiff sued in the City Court for the sum of $2,000, due upon a promissory note. The answer, besides certain obviously sham denials, pleaded as a separate defense that prior to the matu*594rity of the note an agreement had been entered into between plaintiff and defendants whereby plaintiff agreed to release defendants from all liability on account of said note, and to cancel and surrender the same. Although it does not appear on the face of the answer, the fact was afterwards disclosed that what defendants really claimed was that in the. course of and as a result of certain real estate transactions the plaintiff had received all that was due him upon the note and in consideration thereof had agreed to cancel the indebtedness. Under the pleadings the mere production of the note established plaintiff’s prima facie cause of action, and all that was left to be tried was the affirmative defense. When the cause came on "for trial the defendants made the following proposition: c< Counsel for the defendant has offered that there be an accounting between the parties to this action in the manner provided by law, and that the amount, if any, due to the plaintiff from any of the defendants be then ascertained and determined, and that the collateral be properly applied and that a proper judgment be rendered under the circumstances. ” The plaintiff accepted this proposition, whereupon the court appointed a referee, who proceeded to try the issues tendered by the separate defense. Upon the coming in of his report, which was adverse to the defendants, a judgment was entered in favor of plaintiff for the amount claimed. Upon appeal to the Appellate Term (76 Misc. Rep. 452) this judgment was reversed, but no direction given for a lew trial. On a motion to amend the order of reversal, it was amended by adding a provision dismissing the complaint, so that plaintiff having a perfectly good cause of action of which the City Court admittedly had jurisdiction, and to which there is no valid defense, has his complaint dismissed and finds himself saddled with a large bill of costs, incurred because he accepted an apparently fair proposition by the defendants. This is not an appropriate time to criticise the methods and motives of the defense. Our duty will be done if we are able to prevent an injustice from resulting therefrom.
The Appellate Term appears to have been of the opinion that the effect of the stipulation and order of reference was to convert the action into one in equity for an accounting, and, therefore, that the City Court had no jurisdiction to proceed *595with it. We think that this view was erroneous. The character of the action is to be determined by the complaint, and, so tested, it was from the beginning and remained throughout, a common-law action upon a promissory note, of which the City Court concededly had jurisdiction. That the defense involved or might involve the taking of an account did not change the character of the action, nor oust the City Court of jurisdiction to determine the controversy, for the interposition of an equitable defense does not transform a legal action into an equitable one. (New York & Brooklyn Brewing Co. v. Angelo, 144 App. Div. 655, 656.) Section 507 of the Code of Civil Procedure, made applicable to the City Court by subdivision 4 of section 3347 of the Code, permits equitable defenses to be interposed in common-law actions, and it has been held repeatedly that the City Court has jurisdiction to entertain and dispose of equitable defenses interposed in common-law actions, except that it may not give affirmative judgment for a defendant upon a counterclaim which demands only equitable relief.
No doubt the order of reference in the present case was inaptly phrased, but it affords no ground for the contention that its effect was to transform the action into an equitable one. As the pleadings stood the court could have tried the issues raised by the pleadings, and what it could try itself it could, by consent, refer, and this was all that was done. The attempted defense having failed, left the plaintiff entitled upon the undisputed facts to a judgment upon his legal cause of action.
The determination of the Appellate Term must, therefore, be reversed, and the judgment of the City Court affirmed, with costs to the plaintiff, appellant, in all the courts.
Ingraham, P. J., McLaughlin, Laughlin and Clarke, JJ., concurred.
Determination reversed and judgment of City Court affirmed, with costs in all courts. Order to be settled on notice.