T. H. Brown instituted proceedings to contest the election óf W. J. Hilliard to the office of probate judge. In compliance with the statute, he gave *322security for the cost of the contest. The undertaking is set out in the statement of the facts of the case. On the trial before the circuit judge the contestant was successful. The case was brought to this court by writ of certiorari and judgment here rendered, reversing and annulling the judgment in favor of contestant by the circuit court judge, and quashing the contest proceedings. This court adjudicated that the averments of facts contained in the petition of contestant, were not sufficient to give the trial judge jurisdiction of the cause of contest. The judgment by this court was that “T. PI. Brown pay the costs herein taxed.” The contestee, Hilliard, brought the present action against the contestant, Brown, and his sureties upon their undertaking to secure the cost of the contest. The case was tried upon an agreed state of facts. These show that no part of the cost of the contest have been paid by any one ; that the several items constituting the bill of costs are proper charges, and that every item, except the cost incident to the writ of certiorari by which the cause was brought to this court, was incurred for and at the instance of the contestant Brown. The final judgment rendered in this court quashing the contest' proceedings was in evidence. The contestant was unsuccessful, and he and his sureties became liable on their undertaking to secure the cost. It is contended that as the facts show a large proportion of the cost was incurred by contestant Brown, and that as Hillard is not responsible for such cost, and can not be made to pay the same, these costs can not be recovered in this action. We are of opinion the law is otherwise. The undertaking covers all the costs of the contest before the trial judge. In the case of Pryor v. Beck, 21 Ala. 393, where the sureties were sued on their undertaking to secure the costs of the suit, the same defense was interposed, and it was held that the bond covered all the cost, and the obligee should recover “all the costs, without regard to the question whether he could be made liable to pay all or not; * * that he must recover to the extent of all who are designed to be protected by the bond.” In the case cited, it appears that judgment for the cost was rendered, as in the case at bar, against the principal alone, and the suit was brought upon the undertaking to secure the cost of the suit. We do not doubt'that if the defendant had paid'' *323any part of the cost to the person entitled to receive it, or had obtained a release or aquittance from such person, such payment or acquittance, would be a good defense “pro tanto” to the present action.
It is further contended, that the parties entitled to the cost should sue in their own names. Doubtless an action could be maintained in his' name by any witness attending, or officer performing the service, against the party, in whose behalf the witness attended or for whom such service was performed, and such parties might sue T. H. Brown to recover such cost, but neither witnesses nor officers in their own names could maintain separate actions on the undertaking against Brown and his sureties to recover these costs. Unless authorized by statute the cause of action given by the undertaking of defendant and his sureties can not be split up into as many actions as there are persons interested in, and secured by its provisions. — Smith v. Mutual Loan & Trust Co., 102 Ala. 282. . One suit of recovery will be a bar to any other suit. An action is maintainable oñ a judgment to recover cost. — 4 Amer. & Eng. Encyc. of Law,’ p. 320. Costs in civil cases are awarded in favor of the successful party, (Code , § 2837),'and execution runs in his name, and not in the napie of the parties to whom the costs are payable.
It is further contended by appellee, that as the • trial court had no jurisdiction of the subject matter, it could not render a judgment awarding cost. There are some cases which recognize the rule as thus asserted. — Burk v. Jackson, 22 Ohio St. 268. We are of opinion the sounder rule, and that which is supported by the great weight of authority is, that the court must decide whether it has jurisdiction or not, and the decision of that question, is a judicial act, — an exercise of jurisdiction, — and that costs are a proper and necessary incident .of such a judgment. — King v. Poole, 36 Barb. Sup. Ct. Rep. 242; Jordan v. Dennis, 7 Metcalf 590; Hawes on Jurisdiction of Courts, § 19 and note ; 1 Freeman on Judgments, § 120.
By our statuteshosts are awarded to the successful party. Code, supra. The fact that final judgment, quashing the proceeding was pronounced in this court, instead of a mandate to the trial judge, to render such judgment, in no manner affects the liability of the unsuccessful. party. The judgment rendered here was the judgment' *324which should have been rendered in the first instance. The security given for cost, for instituting an action or contest proceedings does not include the cost for an appeal to this court, or if the cause is brought here by writ of certiorari instead of appeal. To recover the cost awarded the appellant, by the judgment of this court quashing the contest, the plaintiff may have his remedy upon the judgment rendered in this court against the contestant. It is only the costs before the trial court or judge which are recoverable from the contestant and his sureties by an action on the undertaking. These the plaintiff was entitled to recover. The court erred in giving the affirmative charge for the defendant.
Reversed and remanded.