It is well settled by the decisions of this court that, in cases where the jurisdiction of the court is regulated by the amount of damages demanded by the plaintiffs, the question as to the amount so claimed is to be decided solely by the ad damnum set forth in the writ. Hapgood v. Doherty, 8 Gray, 373. Ladd v. Kimball, 12 Gray,
*522This action was originally instituted in the police court of Haverhill, and the damages demanded in the writ were one hundred and fifty dollars. The police court had jurisdiction only in cases where the damages alleged did not exceed one hundred dollars. The jurisdiction of the court of common pleas as an appellate court' was wholly dependent upon the fact of jurisdiction of the police court, and it could only entertain the appeal when such jurisdiction existed.
The motion to dismiss for want of jurisdiction was seasonably made. A motion to dismiss an action for want of jurisdiction does not fall within the rules applicable to ordinary pleas in abatement. The provisions of St. 1852, c. 312, § 22, declaring that, “ when the defendant has appeared and ariswered to the merits of the action, no defect in the writ or other process, by which he has been brought before the court, or in the service thereof, shall be deemed to affect the jurisdiction,” are limited to defects in the writ of a different nature from the present, and do not apply to a case where the court had no jurisdiction of the case under the provisions of the statutes defining and limiting the jurisdiction of the several courts. Judgment affirmed.