¶1delivered the opinion of the court.
¶2On October 1, 1918, Clara E. Johnson, through the plaintiffs, her attorneys, brought an action in the district court of Yellowstone county against John A. Johnson, her husband, for a divorce on the ground of extreme cruelty. Upon filing the complaint, she made an application for an order requiring the defendant to show why he should not pay her alimony pending the action, including suit money and counsel fees. The application disclosed that she was in ill health and without means to support herself or to pay counsel for services necessary to enable her to prosecute the action. It further disclosed that her husband was possessed of considerable property from which he was receiving a monthly income of approximately $500. Before the hearing was had under the order, and without consulting her attorneys, she became reconciled to her husband and resumed marital relations with him. Later she directed the plaintiffs to dismiss the action, and neither she nor her husband appeared at the time set for hearing under the order. Thereafter plaintiffs brought this action against John A. Johnson, the husband, joining the wife as codefendant, to recover $300, the amount of the fees which the latter had requested the court to allow in her application, alleging that the divorce action had been brought in good faith and that this sum was reasonable compensation for their services rendered therein. To this complaint the defendant John A. Johnson interposed his separate general demurrer. After consideration the court sustained it, and, the plaintiffs standing on their complaint, rendered judgment in favor of this defendant for his costs. Plaintiffs have appealed.
¶3The single question presented for decision is whether, under any recognized rule or principle of law, the plaintiffs are entitled to maintain this action.
¶4It is not entirely clear from the argument found in the
¶5We shall not stop to inquire what power the courts in this jurisdiction would have had at common law in divorce cases to require the husband to pay the fees of counsel employed by the wife. The statute declares the extent of the power and, in our opinion, is exclusive; for “in this state there is no common law in any ease where the law is declared by the Code or the statute” (sec. 8060, Bev. Codes), and “the Code establishes the law of this state respecting the subjects to which it relates.” (Sec. 8061.) It requires but a casual reading of section 3677, supra, to ascertain that the object of the legislature in enacting it was to give the courts discretionary power, to be exercised during the pendency of the action upon a proper showing by the wife in an application for that purpose, to compel the husband to provide the means necessary to enable her to prosecute or defend the action. In other words, the power in this behalf conferred by the statute is only ancillary to, or an incident of, an action for divorce. This renders the conclusion necessary that when the main power conferred by this section has ceased to be operative, the ancillary or incidental power also ceases to be operative and cannot be invoked by the wife’s counsel in an independent action to charge the husband.
¶6*23Upon examination of the decided cases in other states which have the same or similar statutory provisions, we find that their courts generally agree that counsel fees may be allowed only while the divorce action is pending. (Loveren v. Loveren, 100 Cal. 493, 35 Pac. 87; Burnham v. Tizerd, 31 Neb. 781, 48 N. W. 823; Clarke v. Burke, 65 Wis. 359, 56 Am. St. Rep. 631, 27 N. W. 22; Isbel v. Weiss, 60 Mo. App. 54; Meaher v. Mitchell, 112 Me. 416, Ann. Cas. 1917A, 688, 92 Atl. 492; Humphries v. Cooper, 55 Wash. 376, 133 Am. St. Rep. 1036, 104 Pac. 606; Beadleston v. Beadleston, 103 N. Y. 402, 8 N. E. 735; Kincheloe v. Merriman, 54 Ark. 557, 26 Am. St. Rep. 60, 16 S. W. 578; Zent v. Sullivan, 47 Wash. 315, 15 Ann. Cas. 19, 13 L. R. A. (n. s.) 244, 91 Pac. 1088.) In some of the states this is held to be the rule independently of the statute, the theory being that the power to allow counsel fees is a mere incident to the general power possessed by the courts to grant divorces. (Kuntz v. Kuntz, 80 N. J. Eq. 429, 83 Atl. 787.) The rule was impliedly recognized by this court in the ease of Bordeaux v. Bordeaux, 29 Mont. 478, 75 Pac. 359; s. c., on rehearing, 32 Mont. 159, 80 Pac. 6. In that case it was held that a district court has no power under the statute to allow counsel fees for past services, even- during the pendency of the divorce proceedings, the only possible exception to this being, perhaps, where the allowance for such past services would be necessary to enable the wife to continue the future prosecution of the action or to make her defense. If the court cannot allow counsel fees for past services, it necessarily follows that it cannot, after the divorce proceeding has terminated, entertain an independent action by counsel against the husband for services rendered for the wife during the pendency of the action.
¶7Nor do we think the action is maintainable on the ground
¶8The legislature in enacting the provisions of the Code—
¶9We think the judgment of the district court was right, and must be affirmed. It is so ordered.
¶10Affirmed.