I find it impossible to distinguish this case from Irwin v. Curie, 171 N. Y. 409. There must therefore be judgment for the plaintiff unless the defendant succeeds upon his special defense that the matter is res adjudicata. The contract out of which the action arises was made between the parties in 1886, and provides that defendant shall pay plaintiff one-half of the net fees or compensation realized by defendant in prosecuting claims against the Federal Government for a rebate of duties paid by importers, whose business had been solicited and obtained by plaintiff. ' In 1886 the plaintiff sued defendant in this court upon the same contract, but for the moiety of other fees than those included in this action. The defendant demurred for insufficiency of the complaint and the demurrer was sustained at the Appellate Division, leave being given to amend the complaint. • Hirshbach v. Ketchum, 5 App. Div. 324. The com*307plaint having been amended was again demurred to and the demurrer sustained at Special Term, the judgment reciting that the complaint was dismissed “ on the merits,” and no leave being given to further amend. This judgment was not appealed from, but in December, 1902, after the decision of Irwin v. Curie, supra, the plaintiff moved to amend the Special Term judgment sustaining the second demurrer by striking out the words “ on the merits.” This motion was granted at Special Term, but the order granting it was reversed by the Appellate Division. Although the plaintiff challenges the jurisdiction and power of the Appellate Division I am not at liberty to consider that question since that branch of this court, having assumed jurisdiction in the premises, must be deemed to have decided that it had such jurisdiction. Assuming then that the judgment in' the former action stands as one dismissing the complaint on the merits, the question is presented as to its efficacy as res adjudicata. The precise meaning to be given to the words “ on the merits ” in an order or judgment has never been very clearly defined. Judge Selden said that they were to be regarded as referring to the strict legal rights of the parties, as contradistinguished from mere questions of practice (St. John v. West, 4 How. Pr. 329), and this definition has frequently been cited with approval. It is, however, not of controlling importance whether or not the judgment is declared to be upon the merits. The real question is whether it was in fact an adjudication upon the merits. It is well settled that a judgment sustaining a demurrer, if it goes to the merits of the controversy, is as conclusive as an adjudication of the matter litigated as in any other judgment. Gould v. Evansville, etc., R. R. Co., 91 U. S. 533; Alley v. Nott, 111 id. 472. An examination of the judgment-roll in the former action between these same parties shows that the validity of the agreement between them was directly and necessarily an issue. There was no formal or technical defect or omission in the amended complaint, and it is obvious upon reading it that it contained every allegation necessary to establish a cause of action in the plaintiff’s favor, if the agreement between himself and the defendant was lawful and valid. Hence the judgment sustaining the demurrer must have proceeded upon the ground that the contract was illegal and void, and that, undoubtedly, was the ground upon which it rested. That judgment, not having been appealed from,, *308was a final and 'conclusive adjudication between the parties that the contract relied on in that action was void and unenforceable. The present action is founded upon the same contract. It is true that the present complaint differs somewhat in form and construction from that in the former action, hut in every essential particular it is the same, and the contract relied upon is identical. The correspondence which passed between the parties in 1887 did not create or constitute a new contract and did not purport to do so. It merely expressed the understanding of the parties as to the precise terms of the contract which they had made in the previous year. Hor is it of moment that the plaintiff does not now sue for the identical moneys which he sought to recover in the former action. He seeks now to recover another instalment of fees received from the same client and under the same agreement. It is precisely like a second action for rent under a lease where the validity of the lease, the Lability of the defendant and the amount of the rent had been adjudicated in a former action. In' such a case no one would doubt for a moment that the judgment in the first action was conclusive in the other. Of course the fact that it now appears, by. the decision of the Court of Appeals in Irwin v. Curie, supra, that the judgment sustaining the demurrer was erroneous does not affect the. efficacy of that judgment as a bar to this action. De Puy v. Strong, 37 N. Y. 372.
In my opinion the judgment pleaded by the defendant is a bar to this action, and he is, therefore, entitled to judgment.
Judgment for defendant.