prepared the opinion for the court.
This is an application for a writ of mandate to- compel tiie district court to enter an order substituting attorneys.
It appears that one Calvin P. Davis, by virtue of contracts of settlement and decrees of court entered in accordance therewith, became and is. entitled to a certain distributive share of the estate of Andrew J. Davis, deceased; that he had been represented during all the time of this settlement by the law firm, of Logan, D'e Mond & Harby, of New York, and C. P. Drennan, of Butte, Montana, and that they still appear as attorneys of record in said cause. It was agreed by Galvin P. Davis that all money coming to- him should be distributed to said attorneys, and by them paid to Davis. On December 2, 1901, said Calvin P. *10Davis was adjudged incompetent, and George W. Davis was ap^ pointed guardian'of his estate. He qualified as such guardian January 3, 1902, and letters of guardianshipi were issued to him. Thereafter the attorneys, Logan, De Mond & Harby and O. P. Drennan, assumed to act as such attorneys for the estate of such incompetent, and are by the district court adjudged the right as attorneys to control the distribution of said estate. On January 24, 1902, said Calvin P. Davis, by his said guardian, after notice to Logan, De Mond & Harby and C. P. Drennan, applied to the district court for an order changing the attorneys by substituting W. A. Clark, Jr., and Jesse B. Boote in lieu of said C. P. Drennan and the firm of Logan, De Mond & Harby. The last-named attorneys contested this application. No order had been made by the court with reference to this application up to November 14, 1903, and on that day relator, by his guardian, applied to this court for a writ of mandate commanding the district court to make the order of substitution demanded. The district court, by its answer filed January 19, 1904, alleges, among other things, that on December 5, 1903, the court denied the application for such substitution, and that the said attorneys, Logan, De Mond & Harby and O. P. Drennan, “have never at any time had their ñafies entered nor are they attorneys of record for George W. Davis as guardian of Calvin P1. Davis, an incompetent person, nor said attorneys have not been, nor do they assume to be, the attorneys of said guardian in any manner whatsoever.”
Neither Calvin P. Davis, an incompetent person, nor his estate, can make any appearance whatsoever, except by and through the legally appointed guardian; and if these attorneys are not the attorneys for the guardian it is not apparent by what authority they can make any appearance whatsoever in any action or matter affecting the interests of this estate. They, however, by their affidavits filed, protest against any order being made removing them as attorneys and substituting any one else, so that there may be no question that they will receive the balance of their fees.
*11The statute leaves parties to the exercise of their own judgment in making' contracts with attorneys at law, as in the employment of other agents, and the mere fact that a party becomes insane or dies while he is indebted to the attorney who was at the time representing him with respect to' his property interests does not give that attorney the right per se to appear as- such for the guardian or administrator appointed, and who, by reason of such appointment, becomes responsible for the estate and the proper conduct of its affairs. (Section 3151, Civil Code.) Neither does such appointment divest the attorney of any lien or security which he at the time had to secure him in the amount due. In this case the guardian could not pay the attorney fee claimed to be due to this firm of attorneys out of the funds of the estate until the same had been allowed by the court, and when allowed by the court it becomes a valid ’charge against the estate, which the guardian canot refuse to pay. ' (Section 2810 et seq., Code of Civil Procedure.)
Section 399, Code of Civil Procedure, so far as-applicable to> this, proceeding, provides that the attorney in an action may be changed “upon the order of the court upon the application of either client or attorney, after notice from one to the other.” The general rule under similar statutes appears, to be that a party has an absolute right to change his attorney at will, and without assigning any cause therefor, unless it appears that some good reasons exist which justify- the court in refusing to make the order. (Weeks, Attorneys- at Law, par. 250; Lee v. Superior Court, 112 Cal. 354, 44 Pac. 666; 20’ Ency. Pl. and Prac. 1013.)
It is claimed by the respondents that the action of the court in refusing to make this order of substitution was- a, judicial act, and that such acts cannot be controlled • by mandamus. It is elementary that mandamus will not lie to interfere- with the exercise of a court’s discretionary power. (State ex rel. Harris v. District Court, 27 Mont. 280, 70 Pac. 981.)
A different rule, however, prevails in matters where the court cannot exercise any discretion.
*12In Rundberg v. Belcher, 118 Cal. 589, 50 Pac. 610, the court says: “While mandate will lie to compel judicial action, and in some instances even specific action ( Wood v. Strother, 76 Cal. 545, 18 Pac. 766, 9 Am. St. Rep. 249), and is an appropriate remedy in a proper case to obtain the relief here sought (People v. Norton, 16 Cal. 436), it may not be invoked to require a judicial officer to act in a particular way except it appear by necessary legal deduction fre-m the facts stated that the aggrieved party has been denied a right which it was the plain legal duty of the officer to- grant, and without his proper discretion to refuse (Keller v. Hewitt, 109 Cal. 146, 41 Pac. 811).” The court in that case, which was a proceeding for substitution of attorneys under a similar statute, denied the writ, because it did not appear from the record why the court had refused to grant the order.
In Lee v. Superior Court, supra, which was also an application for a writ of mandate to compel the substitution of attorneys, the record contained the reasons why the court had refused the order. The appellate 'court reviewed these reasons, and held that they were not sufficient, and ordered the writ to issue.
So; in this case, it appears from the record that the only reason why this application was denied was based upon the fact that the contract of employment with the contesting attorneys was coupled with an interest, and this interest was that (1) they had a right to have the money of the estate pass through their hands; (2) that they had not yet been paid their fees.
The first of these propositions is not involved in this proceeding. The second is untenable for the reasons above stated. (Muth v. Goddard, 28 Mont. 231, 72 Pac. 621; Matter of Prospect Avenue, 85 Hun. 257, 1 N. Y. Ann. Cas. 347, 32 N. Y Supp. 1013; Matter of Mitchell et al., 9 N. Y. Ann. Cas. 224, 67 N. Y. Supp. 961; Hunt v. Bousmanier's Adm'rs, 8 Wheat. 174, 5 L. Ed. 589.)
We therefore recommend that the peremptory writ of mandate be issued as prayed for.
*13Per Curiam.Por the reasons stated in the foregoing opinion, it is ordered that the peremptory writ of mandate issue as prayed.