It is apparent from the petition that the injunction granted in the proceeding for a new trial was ancillary only, and not the object of the proceeding. From this fact, and the averment that the petition was dismissed, at the same term in which the injunction was dissolved, the-general language used in the petition does not leave it entirely clear but that the liability, which is the basis of the recovery sought, was incurred in defeating the proceeding, and not alone in procuring a dissolution of the injunction. But we think the latter is the fair construction of the petition. The demurrer, therefore, raises the question,, whether necessary expenses, incurred alone in procuring a dissolution of an injnnotion, may be recovered in an action on an injunction bond or “undertaking.”
To effect an injunction, section 242 of the code requires the party obtaining it, to give an undertaking, with sureties, “to secure the party enjoined the damages he may sustain,, if it be finally decided that the injunction ought not to> *270have been granted.” The undertaking in this case was given in accordance with, and in the. language of the statute.
It is the undoubted privilege of the party to procure a dissolution of an injunction which has been wrongfully obtained. To the extent of the attorney fees and expenses necessarily incurred for that purpose, he is damaged by the injunction. The express undertaking, is to pay “the damages he may sustain by reason of the injunction,” if it ought not to have been granted. Such expenses, then, come within the damages he is entitled to recover upon the undertaking.
This view is sustained by the weight of authority in the cases where the language of the instrument in suit is similar to that of the undertaking in this ease, and in other analogous cases. Edwards v. Bodine, 11 Paige, 223; Corcoran v. Judson, 24 N. Y. 106; Behrens v. McKenzie, 23 Iowa, 333; Langworthy v. McKelvey, 25 Iowa, 48; Thaie v. Quan, 3 Cal. 216; Prader v. Grim, 13 Cal. 585; Morris v. Price, 2 Blackf. 457; Derby Bank v. Heath, 45 N. H. 524; Ryan v. Anderson, 25 Ill. 372; Garrett v. Logan, 19 Ala. 344.
But as already intimated, a distinction is to be taken between expenses incurred only in procuring a dissolution of :au injunction, and such as are incurred in the defense of an. action, to which the injunction is merely auxiliary, and is not essential to the relief sought.
While, as already stated, we regard the expenses, including reasonable attorney fees, necessarily incurred in procuring a dissolution of an injunction wrongfully granted, as recoverable in an action on the undertaking, when it is finally decided that it ought not to have been granted, we are equally clear that this can not be done, when the expenditure or liability is incurred in defending an action, to which the injunction is only ancillary, and not essential to the relief sought by the action; for it could not then be regarded as damage sustained “by reason of the injunction.”
The true rule would seem to be, under an undertaking *271like the one in this case, that where reasonable attorney fees and expenses are necessarily incurred alone in procuring the dissolution of an injunction, when it is the sole relief sought by the action, or is merely ancillary thereto, and it is finally decided that it should not have been granted, such fees and expenses may be recovered in an action on the undertaking; but where the injunction is only auxiliary to the object of the action, and the liability is incurred in defeating the action, and the dissolution of the injunction is only incidental to the result, no recovery can be had on the undertaking for the attorney fees and expenses occasioned thereby.
But it is urged that the demurrer is well taken, because it is not averred in the petition that the attorney fees and expenses were paid, and that without such averment it does not appear the plaintiff had sustained damage. It is true, payment of the expenses is not averred; but it is alleged that the plaintiff had incurred a liability for the several items named in dissolving the injunction.
An indebtedness incurred — a liability to pay — is a damage and we think it. is sufficient to constitute a cause of action on the undertaking.
The demurrer to the petition, therefore, was not well taken. To the extent of the items for attorney fees and costs of witnesses, at least, the petition was good. Whether the other items are recoverable, it is not necessary to decide.
It follows that the judgment of each, of the courts below, sustaining the demurrer, was .erroneous, and must be reversed. The cause will be remanded to the Court of Common Pleas for further proceedings.