The action is brought by the plaintiff as a subcontractor for the foreclosure of a mechanic’s lien filed by him against certain premises for building material furnished by him to the principal contractor, the W. R. Steinmetz Co., pursuant to its contract with the owner. The appellant’s claim to all moneys due and to become due from the owner is founded upon an assignment to it executed by the W. R. Steinmetz Co. The company last referred to and the owner were served, but defaulted in pleading, and the only party which defended the action is the appellant. The trial justice found for the plaintiff for the amount claimed. His findings of fact are fully supported by the evidence, and they sustain the conclusions of law based thereon. The appellant insists, however, that reversible *324error was committed in the exclusion of evidence offered by it for the purpose of showing that the W. R. Steinmetz Co. had paid to the plaintiff on account of his claim, more than the sum admitted in the complaint to have been so paid. The evidence thus offered was excluded on the ground, that the answer interposed by .the appellant contained no plea of payment or partial payment. This ruling wás correct. Payment is an affirmative defense which must be pleaded. It had its origin under the common lsw practice in the plea of nonassumpsit. The history of the rule is fully set forth in Judge Selden’s opinion in McKyring v. Bull, 16 N. Y. 297. Following the rule thus established under the former practice, the courts of this State have uniformly held, since the adoption of the Code, that payment must be pleaded and cannot be proven under a general denial. McKyring v. Bull, 16 N. Y. 297; Hughes v. Cuming, 36 App. Div. 302; Lent v. New York & Mass. R. Co., 130 N. Y. 504.
Indeed the general rule in the States which have adopted a Code, is that payment must be specially pleaded and that evidence of payment is not admissible in the absence of such a plea under the general denial, a rule which is generally dedueible from statutory provisions requiring a special plea for matter in avoidance of the action or for new matter in defense. 16 Ency. Pl. & Pr. 174, 175. In this State section 500 of the Code of Civil Procedure, expressly provides that any new matter constituting a defense or counterclaim must be set forth by a clear, precise and unequivocal statement in the answer. If a departure from this rule was ever permitted, it was in a case in which the complaint alleged the indebtedness in general terms without stating the grounds thereof. The case at bar is not of that kind.
The judgment should be affirmed, with costs.
Bischoff and Fitzgerald, JJ., concur.
Judgment affirmed, with costs.