— The appellants Bessie Olive Hillman and Clarence D. Hillman are husband and wife, and the appellant Homer L. Hillman is the brother and business partner of Clarence D. Hillman. The respondents Steele & Brown are attorneys at law. On March 21, 1904, the appellant Bessie Olive Hillman began an action for divorce', and for "a partition of the community property, against her husband, joining her husband’s brother as a party defendant because of the business relations existing between'him and her husband. The respondents Steele and Brown appeared as attorneys for Mrs. Hillman. A preliminary restraining order was applied for and issued, and an application made for temporary alimony and suit money, including attorney’s- fees. Pending this latter application, the Hillmans condoned their differ*596enees, and a stipulation was entered into for a dismissal of the action. This stipulation was signed by Mrs. Hillmar, but not by her attorneys, and when presented to the eouri was opposed by them, on the ground that they had an interest in the action to the extent of their attorney’s fees, and that the parties were without power to dismiss the action without their consent. The court took this view of the case, allowed the attorneys to file a petition in intervention forvtheir fees and costs they had advanced, and ordered a hearing thereon, at the conclusion of which it entered a judgment against the appellants, Bessie Olive Hillman and Clarence D. Hillman, in favor of the attorneys, for one thousand dollars as attorney’s fees, and nine dollars they had advanced as costs, together with the costs of the proceedings.
The warrant for this judgment is thought to be found in § 5722 of the Code (Ballinger’s) which provides that the court in an action for divorce brought by the wife may “require the husband to pay all reasonable expenses of the wife in the prosecution or defense of the action, when such divorce is granted or refused, and give judgment therefor.” But this section contemplates a judgment in favor of the wife, one running in her name, and is not authority for the intervention in the suit by the wife’s attorneys, and the entry of. a judgment against the husband and wife in their favor. The measure and mode of compensation of attorneys and counsellors are^ under our statute^ a matter for private agreement between client and attorney (Bal. Code, § 5165) and controversies between them over such fees have no place in actions whea’e the relation of attorney and client exists. Claims for attorney’s fees, where adjusted by actions, must be in actions brought for their'adjustment, as claims of all other kinds are adjusted. True, the code in all cases makes an allowance for attorney’s fees called costs, and in certain classes of1 cases makes allowances-for attorney’s fees as such. But these do not belong to the attorney by mere operation of law, nor *597is he entitled to judgment for them; they are awarded to the prevailing party, and judgment for them is entered in the name of such party.
There are cases which maintain the doctrine contended for by the respondents, hut we think they are not founded in the better reason. It is the policy of the law to encourage husband and wife to compromise and settle between themselves their domestic troubles, and to discourage actions for divorce. Actions for divorce, therefore, which both parties desire dismissed, should not he kept alive merely to settle the claims of counsel for attorney’s fees. ' Cases supporting the conclusion we have reached are the following: Reynolds v. Reynolds, 67 Cal. 176, 7 Pac. 480; Sims v. Davis, 48 Neb. 720, 67 N. W. 765; Strover v. Strover, 7 Idaho 185, 61 Pac. 462; Thompson v. Thompson, 40 Tenn. 526; McCulloch v. Murphy, 45 Ill. 256.
The judgment appealed from is reversed and the cause remanded with instructions to dismiss the action.
Mount, C. J., Hadley, Dunbar, Rudkin, and Crow, JJ., concur.