Taylob, J.The only important question in the case is whether the justice’s court erred in hearing the evidence of *399the defendant as to his counterclaim on the adjourned day, when the plaintiff failed to appear in the action, and rendering judgment in favor of the defendant on such counterclaim. We think it very clear that the only judgment the justice could legally render in the action, upon the default of the plaintiff, was a judgment of nonsuit, with costs in favor of the defendant. A justice’s court acquires its jurisdiction from the statute, and, when the statute explicitly directs what must be done under certain circumstances no other thing can lawfully be done. Sec. 3659, E. S., upon the subject of judgments in justices’ courts, says: “ Judgment of nonsuit shall be rendered against the plaintiff prosecuting an action before a justice of the peace in the following cases: (1) if he discontinue or withdraw his action; (2) if he fail to appear on the return of any process, within one hour after the same is returnable; (3) if, after an adjournment, he fail to appear within one hour after the time to which the adjournment shall have been made; (4) if ho becomes nonsuited on the trial.” The statute is very plain, and there are no exceptions to the rule laid down. It does not say he shall be nonsuited unless the defendant has set up a counterclaim, but that he shall be nonsuited if he fails to appear on the adjourned day at the proper time. The rule established by courts of record that a plaintiff shall not be permitted to dismiss his action without leave of the court, where the defendant in his answer has set up a counterclaim, has no bearing upon the question. A counterclaim is not mentioned in the statute regulating the proceedings in justices’ courts; and it may be doubtful whether a defendant would be permitted, if objected to, to set up in his answer matter simply constituting a counterclaim, except such counterclaim be in fact a setoff. The section regulating pleadings in justices’ courts does not mention counterclaim as a pleading in such court. See sec. 3626, E. S. Subd. 1 of said section says: “ The pleadings *400in these cases are (1) the complaint of the plaintiff; (2) the answer of the defendant.” Subd. 3 says: “The complaint shall state in a plain and direct manner the facts constituting the cause of action.” Subd. 4 saj^s: “ The answer may contain a denial of the complaint, or of any part thereof, and also notice in a plain and direct manner of any facts constituting a defense.” There is certainly nothing in these provisions of the statute which authorizes a defendant to plead a counterclaim in an action in justice’s court. Secs. 4258-4263, R. S., undoubtedly give the defendant the right to plead a setoff in a justice’s court; and sec: 4264, R. S., would seem to imply that a counterclaim can only be pleaded in a court of record. It is only in the statute regulating the practice in courts of record that the counterclaim is mentioned as a proper pleading in an action. Our statute regulating proceedings in justices’ courts is literally the same as the New York statute was previous to 1867. In that year the legislature of that state amended the provision declaring what the answer may contain, by adding at the end thereof and after the word “defense” the words “ or counterclaim.” This was pretty clear legislative declaration that previous to that amendment no counterclaim could be set up in the defendant’s answer. See 2 Edmond’s Stats, at Large (N. Y.), p. 240, sec. 64; 3 R. S. of N. Y. (6th ed.), p. 470, sec. 64; Williams v. Bitner, 1 Lans. 200-202.
In New York, under a statute like ours in regard to non-suits in justices’ courts, it was decided by the New York common pleas, in Norris v. Bleakley, 3 Abb. Pr. 107, that when the parties had appeared and partly tried the case, and the defendant had introduced some proof to sustain his setoff, and then adjourned by consent, and on the adjourned day the plaintiff failed to appear, it was error for the justice to hear the evidence of the defendant to prove his setoff; and a judgment rendered in favor of the defendant *401for the amount of his setoff was reversed. It was also held in that case that the provision of the Code in regard to affirmative relief to defendant in courts of record did not apply to justices’ courts. See 3 'Wait’s Law & Pr. (5th ed.), 240. Sec. 3571, E. S., among other matters, provides “ that all laws of a general nature are to apply to justices’ courts, so far as the same may be applicable.” The statute has made no express provision for pleading a counterclaim in a justice’s court, and, the law which treats of counterclaims being a law regulating courts of record only, that law cannot be applicable to a justice’s court, especially when the application of such general law would conflict with an express provision of the statute regulating the proceeding in such court.1
By the Qourt.— The judgment of the county court is affirmed.
Note by Taylor, J. Since filing the foregoing opinion my attention has been called to ch. 197, Laws of 1882, which amends subd. 4. sec. 3626, E. S., and permits a counterclaim to be pleaded in justices’ courts. But the case is governed by the provisions of sec. 3659, ft. S., and what is said in the opinion upon the theory that a counterclaim was not authorized by law is npt essential to the decision.