¶1A notice had been given of an application to this court for a writ of mandamus, but it was not prosecuted nor any motion made upon it. The party to whom the notice *140was given appeared for the purpose of resisting it; and, having attended during the term, on the last day of it moved a rule to dismiss the proceedings with costs. The motion was granted and the rule entered accordingly.
¶2We are now moved to vacate so much of the rule as relates to costs.
¶3The question presented is, whether the party who fails to pursue his notice of a proceeding in this court is liable for costs ?
¶4By the common law, costs eo nomine were not given to either party in any action. The statute of Gloucester, 6 Ed. I., ch. 1, a. D. 1278, has usually been considered as creating the right to recover costs, and hence the maxim that “ costs are recoverable only by statute.” That the right to costs is the creature of the statute, is generally but not exclusively correct — for even before the statute of Gloucester, in cases where damages were recovered, a compensation equivalent to costs was assessed by the jury and included in the quantum of damages. The Justices in Eyre, who were constituted in the year 1176, 22d Henry II., assessed a reasonable sum for costs to the plaintiff, over and above his damages.
¶5Subsequently, when that itinerating court had been superseded by the Justices of Assize and Nisi Prius, which is supposed to have been derived from the statute of Westminster 2d, 13 Ed. I., ch. 3, a. d. 1285, the practice was introduced of taxing costs at bar and not at the circuits. But this was entirely ex gratia until the passage of the statute of Gloucester.
¶6Thus it appears that at common law the courts exercised the right of giving to the successful party, a reasonable compensation for the expense he had incurred in establishing his claim. Aller v. Shurtz, 2 Harr. 188, and the authorities there referred to. See, also, Caines’ Pr. 52; Williams v. Smith, 2 Caines’ R. 253; Page v. Lansing, 9 Wend. 464; Butler v. Kelsey, 14 Johns. 342; Philips v. Peck, 2 Johns. Cas. 104.
¶7In the same spirit the statute of Gloucester was, by liberal construction, extended beyond the terms of its provisions. *141It speaks only of the costs of “ the writ purchased,” yet this is held to extend to the whole costs of suit. 2 Inst. 288 ; 2 Jacob’s L. Dic. 106, tit. Costs 1. It is in terms limited to cases wherein damages are givén, yet to meet its beneficent design, damages are allowed in nearly every form of action ; and even in the action of debt, which is for the recovery of a sum certain, interest is allowed by way of damages for its detention. Verdicts frequently are rendered for nominal damages and nominal costs; and upon them full costs are taxed, and this is said to be the origin of the costs of increase.
¶8In this state it is also said that costs are allowed only by statute. Yet the practice of giving costs in many cases not expressly included in the statute, has become inveterate. In the exercise of an equitable power, courts habitually order costs to be paid on granting new trials, on motions to postpone and amend, and other interlocutory proceedings. In some of such cases the court relieves the party upon terms imposed, not in pursuance of any statute, but in their own discretion. So where a party fails on his application to the legal and discretionary power of the court, he is usually required to pay the costs to which he has subjected his adversary.
¶9Although the statute, Nix. Dig. 402, pl. 70
¶10In the case of The State v. Allen, 2 Dutcher 147, costs were allowed to a party who had succeeded on a motion to relax a bill of costs.
¶11In Stille v. Jenkins, 3 Green 312, they were refused to a plaintiff against a defendant who had made an unsuccessful motion in arrest of judgment; but that was not in the exercise of a discretionary power, but in pursuance of the statute which forbids costs to a plaintiff in the Supreme Court who fails to recover more than two hundred dollars.
¶12*142In the case before us the party had notice of a motion which, if granted by the court, might have prejudiced him. He was obliged to appear for the purpose of resisting it and of protecting himself, and it is but common justice that he should be reimbursed for the charges to which he was unnecessarily subjected.
¶13If the party who gave the notice had succeeded in his motion and obtained an order for the mandamus, he would have claimed and perhaps been allowed the costs of his motion and proceedings.
¶14Such an order would not have been in pursuance of the act concerning costs, for he would not have come within the terms of the act by recovering damages.
¶15It must have been upon the equity of the statute and the practice of the court. On the same principle, the equity of the subsequent section of the act would apply to the party who successfully resisted the motion. The section provides, that where the plaintiff in any action might have recovered costs if he had prevailed, he shall pay costs to the defendant if he fail.
¶16Here the applicant for the writ of mandamus failed to pursue his notice and to procure his rule for the writ. He failed in his action.
¶17For his own safety the adverse party moved a disnfissal of the proceedings, and, in that respect, was the party prevailing ; and upon the equity of the statute and the practice of the court long settled, might properly, in the discretion of the court, recover his reasonable costs.
¶18The court did exercise its legal discretion and granted the rule for dismissal with costs, and I can see no reason for vacating the rule.
¶19The motion must therefore be denied, with the costs accrued by it.
¶20Ogden and Vredenbubgh, Justices, concurred.
¶21Rev., p. 556, § 99.