Macomber, J.
This action was trespass, and was brought in a justice’s court, in the county of Livingston, where, upon a trial by jury, a verdict of five dollars was rendered for the plaintiff, and thereupon, under the statute, treble damages were awarded by the court, and judgment for that sum was accordingly entered, together with five dollars costs. The defendant appealed to the county court, but such appeal was subsequently dismissed, and *333nothing arising upon such appeal appears to be material to any question existing in the record before us. The plaintiff also appealed and asked for a new trial in the county court, which was accordingly had. On such trial in the county court, a jury being waived, the county judge, at the close of the-plaintiff’s case, dismissed the complaint upon the ground that under the-plaintiff’s own showing title to real estate came in question, holding, as we-infer, that as, in like circumstances, the justice of the peace had not jurisdiction, so, on appeal, the county court likewise had no jurisdiction to try that issue under section 2956 of the Code of Civil Procedure. By reference to-the pleadings in the justice’s court it appears that the complaint of the plaintiff alleged that in the month of October, 1889, the defendant wrongfully and unlawfully entered upon the lands of the plaintiff, and did then and there, without the leave of the plaintiff, “who was in possession, and the owner of said premises aforesaid,” maliciously cut down a large number of trees, etc. The answer was—First, a general denial; and, secondly, an allegation that the land, upon which were the trees which were alleged to have been cut down and removed by the defendant, was owned by the defendant; that he had been in possession of the same for upwards of 20 years. It will thus be-seen that there was an allegation of title in the plaintiff made by the "complaint, and in the answer a general denial of such title, and an affirmative-allegation that such title belonged to the defendant. By section 2863 of the-Code of Civil Procedure, subd. 2, a justice of the peace cannot take cognizance-of a civil action “where the title to real property comes in question, as prescribed in title 3 of this chapter. ” By sections 2951 and 2952, which are in-title 3 above referred to, the defendant may, either with or without other-matter of defense, set forth in his answer facts showing that the title to real-property will come in question. The justice must thereupon counter-sign the answer and deliver it to the plaintiff. The defendant must also deliver to-the justice a written undertaking, executed by one or more sureties, approved by the justice, to the effect specially prescribed in the statute. Under- section 2954, if these two acts are done, that is, a written answer made containingsueh facts and undertaking given, the action before the justice becomes discontinued. By section 2955, “if the undertaking is not delivered to the justice, he has jurisdiction of the action, and must proceed therein; and the-defendant is precluded, in his defense, from drawing the title in question.” In the record before us the defendant failed wholly to avail himself of the-provisions of the statutes by which he was enabled, if he saw fit, to oust the-justice of jurisdiction, and have the cause tried either in the supreme court or the county court. Failing in that, he waived all objections to the jurisdiction of the justice, and submitted his rights to that tribunal upon the question in issue raised by the pleadings, even though facts were alleged in the pleadings showing that title to real estate did in reality come in question. The question of title to the real estate upon which the growing trees were-was tendered to the defendant by the complaint. It was so drawn that the-defendant could set up his own title in the answer, and, on giving the requisite security, oust the justice of jurisdiction; but, failing to give the security, he was precluded at the trial from drawing the title in question. Such was-the provision of the Code of Procedure. Adams v. Rivers, 11 Barb. 390. So much applies, however, only to the proceedings before the justice. Upon the trial in the county court the plaintiff’s own testimony showed that title-to real estate did come in question, and accordingly the county judge, acting-apparently under section 2956 of the Code of Civil Procedure, dismissed the case upon the motion of the defendant’s counsel. Section 2956 is as follows: “If, however, it appears upon the trial, from the plaintiff’s own showing, that the title to real property is in question, and the title is disputed by the-defendant, the justice must dismiss the complaint, with costs, and render judgment against the plaintiff accordingly.” The learned county judge as*334■sumed, as we think, erroneously, that he was hearing the same ease that ■had been tried before the justice of the peace. But there is contained in the printed record before us the return made to the county court by the justice ■of the peace of the proceedings before him; and from such record it does not ■appear that the title of real property was in question and was disputed in that tribunal at the trial. The return, it is true, does not purport to give all of -the testimony taken before the justice, nor does it say that it does not contain all of the testimony. The only inference which we can draw from it is that •the trial did proceed before the justice of the peace without the question of title to real estate being raised by the plaintiff on his own showing, as it well might have been, notwithstanding the issue raised by the pleadings. The defendant, at the trial, might have relied, and presumably did'rely, upon other •defenses than that of title; for he seems not to have raised any question, except by his pleadings, which would tend to oust the justice of jurisdiction. What, then, the important question is, was the duty of the county court in a case like this, appealed from the judgment of the justice for a new trial? The •county court has jurisdiction to try questions of title to real estate, and could have tried this case had the action originally have been brought in that court. The fallacy of the learned counsel for the. defendant, in making his application for a nonsuit,.lay in the assumption which, as above seen, has no existence in the statutes, that the county court was obliged to dismiss the ease if title to real estate appeared upon the trial there just as though it was acting in the place of the court of the justice of the peace. But we think that upon the return of the justice, which does not show that title to real estate came in question on the trial before him, it was incumbent upon the county court ■to hear such evidence as was offered, and to pass upon it, notwithstanding any rights or privileges which were secured to the defendant by the provisions of the Code relating to trial of cases before justices of the peace, but which appear to have been waived by his omission to file an undertaking. Code Civil Proc. § 2955. Any other conclusion, as it seems to. us, would enable a defendant, where the pleadings showed that title to real estate might come in question before a justice of the peace, to reap all the benefits of the provisions of law for removal of cases without incurring the hazards of giving the undertaking. If this conclusion is correct, the judgment appealed from ■should be reversed, and a new trial granted.
Judgment appealed from reversed, and a new trial granted in the county -court, which costs to abide the event. All concur.