We find it necessary to consider but one of the two grounds of appeal.
The plaintiff recovered a judgment against the defendants for the sum of $207.10, the complaint having set forth a claim for $163.51, as the amount remaining due for work, labor and services. The answer sets up a counterclaim on its face in favor of one of the two defendants, upon a cause of action arising out of the same transaction. Defendants having succeeded in partly establishing the counterclaim, materially decreased the recovery. Plaintiff is a foreign corporation which has not complied with the requirements of section 15 of the General Corporation Law of 1909 (as amd. by Laws of 1917, chap. 594) and now prescribed by section 110 of the Stock Corporation Law of 1923. We shall refer to testimony which shows that it was doing business within the State. The court at Trial Term was of the opinion that this point could not be taken by a motion to dismiss at the close of plaintiff’s case because defendants had interposed a counterclaim without raising it, that the situation was in effect the same as if defendants had sued to recover for a breach of the contract and plaintiff had interposed a counterclaim based on what is alleged in the complaint, citing Mahar v. Harrington Park Villa Sites (204 N. Y. 231).
The conclusion that plaintiff was doing business in the State follows from the complaint and from the testimony of the president of the plaintiff corporation, on cross-examination: “ Q. You did work around Suffern? A. Around Suffern, thousands of dollars, yes. Q. And in the State of New York? A. Yes.”
Plaintiff declares on a common count and the complaint alleges the work was done within this State. The evidence shows it to have been roofing work. It thus developed that the plaintiff, a foreign corporation, entered into the contract and was doing business in the State of New York without having obtained the statutory certificate. In such a case the plaintiff must plead and prove its right to do business in this State before a recovery may *744be had. In this case plaintiff did neither. The plaintiff contends, however, that the objection should have been taken before the trial by demurrer or otherwise.
A motion was timely made at the end of the plaintiff’s case on the specific ground that it had failed to properly plead or prove its right to do business in this State. The complaint should have been thereupon dismissed.
In Eclipse Silk Manufacturing Co. v. Hiller (145 App. Div. 568, 573) Mr. Justice Woodward said: “If, upon the trial, it should be developed that the plaintiff is a foreign corporation doing business in New York, and that the contract in question was made within this State, the objection that the complaint does not state facts sufficient to constitute a cause of action, or that the facts proved do not constitute a cause of action, is open to the defendant (Wood & Selick v. Ball, 114 App. Div. 743; affd., 190 N. Y. 217), but with nothing before the court to show that the plaintiff is a foreign corporation doing business in this State, or that the contract sued upon was made within this State, there was no justification for dismissing the complaint.”
In the case of Wood & Selick v. Ball (190 N. Y. 217, 225) the court said: “ We think that compliance with section 15 of the General Corporation Law should be alleged and proved by a foreign corporation such as the plaintiff, in order to establish a cause of action in the courts of this State. The cases holding otherwise should be regarded as overruled and the conflict of authority ended.”
In the case of Mahar v. Harrington Park Villa Sites (supra, 234) Judge Willard Bartlett, writing for the court, said: “ The only proposition decided in that case was ‘ that compliance with section 15 of the General Corporation Law should be alleged and proved by a foreign corporation such as the plaintiff, in order to establish a cause of action in the courts of this State.’
In the case of American Can Co. v. Grassi Contracting Co. (102 Misc. Rep. 230) Mr. Justice Lehman said: “ It would seem also that logically such proof would be necessary. The courts have decided that the provision of the statute requiring foreign corporations to obtain a license to do business within the State is not merely a ground for the defense of illegality but is a condition precedent to the bringing of any action on a contract made within the State and that compliance with such condition precedent must be alleged and proven at the trial. It would seem, therefore, to follow that when the evidence shows that a foreign corporation is suing upon such a contract it has not made out its cause of action until it has proven compliance with the condition precedent and *745that the complaint should, therefore, be dismissed even though the answer has not set up such a defense.”
We are of the opinion, therefore, that the motion to dismiss the complaint at the end of the plaintiff's case should have been granted.
The judgment and order should be reversed, with costs, and the complaint dismissed, with costs, but not upon the merits.
Dowling, Meeeell and Finch, JJ., concur; Smith, J., dissents.