The opinion of the Court was drawn up, and delivered at a subsequent day of the same term, by
Wells J.This action was commenced before the municipal court, for the city of Portland. After a default in that court, the defendant appealed, and entered his appeal in the district court, in which court, it was continued one term, and then dismissed with costs for the plaintiff. It comes to this Court on exceptions. By c. 98, § 3 and 7, Rev. Stat., the judge of the municipal court can exercise jurisdiction “over all such matters and things” as appertain to the jurisdiction of a justice of the peace, and an appeal may be taken from his determination, “ as from a sentence or judgment of a justice of the peace.”
By c. 116, § 7, it is provided, that if a person, duly served with process, shall not appear and answer thereto, his default shall bo recorded, and the charge in the declaration shall be considered as true, and the justice shall enter judgment and issue execution.
In § 9 it is also provided, that any party aggrieved by the judgment of the justice, may appeal. If this section is to be construed, so that there may be an appeal from a default, it would not be in harmony with § 7. By considering the right of appeal, as taken away, in cases of default, there is no disagreement in the two sections.
It would present an anomoly in judicial proceedings, that a *104party should have an execution, while the question was in litigation, whether he was entitled to one. .
The judgment of the justice, in § 9, must be construed to mean, a determination of the cause, where the defendant appears and answers. The entering of judgment mentioned in § 7, relates to the mode of recording it, as well upon default, as where the action is on trial, maintained.
The phrase in the statute 1821, c. 76, § 10, “ where both parties have appeared and plead,” must have been omitted in § 9, Rev. Stat., not for the purpose of changing the law, but because it was not deemed necessary to insert it.
It is contended, that the objection to the appeal, should have been taken, at the first term of the district court, agreeably to a rule of that court, in relation to pleas in abatement and to the jurisdiction. The rule does not embrace motions, the time of making which, must be under the control of the court to which they are addressed: but if in the exercise of such control, the rights of parties, established by law, are taken away, a remedy can be had, by appeal or exceptions. Rathbone v. Rathbone, 4 Pick. 89. It does not appear, that the defendant was deprived of a right to which he was legally entitled. The action could not be tried in the district court because it was defaulted, and if the court had possessed the power to allow the defendant to plead to the action, no such request was made. In Bailey v. Smith, 3 Fairf. 196, the writ was abated on motion, for want of a proper seal, after the action had been pending in court more than four years. The proper .course was pursued, in dismissing the action.
The Rev. Stat. c. 115, § 56, contains the provision, that “ in all actions the party prevailing shall be entitled to his legal costs.”
There is no exception of any kind in the statute. Where there is an action and a decision of it, the party prevailing is entitled to his costs. It is said, that where the court has not jurisdiction, the action must be dismissed, without costs to either party.
In Greenwood v. Fates & trustee, 6 Greenl. 405, the Court *105decided, that the action was not brought in the proper county, and upon demurrer to a plea in abatement, awarded costs to the defendant.
The court had jurisdiction over the subject matter of the action, but not over the defendant.
In Reynolds v. Plummer et al., 19 Maine R. 22, in addition to the action having been brought in the wrong county, the plaintiff’s writ bore the seal of another court. On motion of the plaintiff, the Judge of the district court ordered, that the writ abate, and awarded costs to the defendant. Upon exceptions, the decision of the Judge was sustained. In Bailey v. Smith, no question was made concerning the costs. The cases, in Massachusetts are conflicting. In Williams v. Blunt, 2 Mass. R. 214 ; Clark v. Rockwell, 15 Mass. R. 221 ; and Osgood v. Thurston, 23 Pick. 110, costs were disallowed,, for want of jurisdiction. But in Cary v. Daniels, 5 Met. 239; Turner v. Blodgett, in note, ibid. 240; Jordan v. Dennis, 7 Met. 590; Hunt v. Inhabitants of Hanover, 8; Met. 343, although the court had not jurisdiction, costs were-allowed. In the last case, it is said to be immaterial, whether the want of jurisdiction is more or less apparent.
In Hunt v. Inhabitants of Hanover, the plaintiff had omitted to take the necessary oath, required by the statute and to have the same indorsed on his writ. That case, and also Reynolds v. Plummer et al., were defective in the process. If these two cases had been rightfully brought, the courts would, have had jurisdiction of the subject matter of the actions.
In the present case, if the action had been properly appealed, the district court would have had jurisdiction. But the-defendant procures an appeal, in a case, where he is not entitled to it, and the record which he introduces, exhibits a bar to his-proceeding. Whether from defect or inaptitude of process, or a want of jurisdiction, over the parties, arising from commencing the suit in the wrong court, or the subject matter of' the suit, an action is dismissed, the defendant must be considered as the prevailing party. The same principle must *106govern in the present case, the defendant is the appellant, the moving party ; he comes into Court with a record and proceedings of such a character, that they are properly dismissed, and therefore the plaintiff is entitled to recover his costs.
Exceptions overruled.