
33 Cal.2d 202 (1948)
Estate of JOHN C. FERRALL, Deceased. ALEX C. HAMILTON, as Guardian, etc., Respondent,
v.
BANK OF AMERICA NATIONAL TRUST AND SAVINGS ASSOCIATION et al., as Cotrustees, etc., Appellants.
L. A. No. 20562. 
Supreme Court of California. In Bank.  
Dec. 15, 1948.
 Earle M. Daniels, Burdette J. Daniels and Hallam Mathews for Appellants.
 Potter, Potter & Rouse and Bernard Potter for Respondent.
 TRAYNOR, J.
 John C. Ferrall died on October 9, 1940, leaving a will, by which he bequeathed one-half of the residue of his estate in trust. Following the administration of the estate a decree of final distribution was entered distributing one-half of the residue to appellants, Bank of America National Trust and Savings Association and George D. Ferrall, son of the trustor, as cotrustees and incorporating the provisions of the will creating the trust. After making provision for the payment of the trust income to Faye F. Hamilton, daughter of the trustor, the will provided: "If at any time the income from the corpus of the trust herein created is insufficient to meet the needs of my daughter, Faye F. Hamilton, then and in that event, in the sole discretion of the trustees herein, the trustees may pay to my said daughter, Faye F. Hamilton, such amounts from the principal or corpus of the trust sufficient to meet her needs, care and comforts." The will further provided for the distribution of the trust corpus to her in the event that her husband predeceased her, or became divorced from her, and for its distribution one-half to George D. Ferrall and one-half to his three children in the event that she predeceased her husband.
 Faye F. Hamilton, an invalid for many years confined to a sanitarium, petitioned the probate court for an order requiring the trustees to pay her the sum of $10,231.46, which she had expended for her care and maintenance, and the sum of $450 per month until further order of the court. Notice was given to the trustees and all beneficiaries pursuant to section *204 1200 of the Probate Code. The probate court made findings that the estate was presently valued at $27,000, that Faye F. Hamilton had received approximately $50 per month from the trust income, and that her expenses while confined to the sanitarium amounted to $400 per month. The court also found that her husband had an annual income sufficient to support her. The probate court denied her reimbursement for funds already expended by her, but ordered the trustees to pay her $400 per month from the income and corpus of the trust until further order of the court. The trustees appeal from this order. During the pendency of the appeal Alex C. Hamilton, guardian of the person and estate of Faye F. Hamilton, was substituted as petitioner and respondent in this proceeding.
 Respondent moved to dismiss the appeal on the grounds that the order is not appealable and that the trustees are not "aggrieved" parties entitled to appeal within the meaning of section 938 of the Code of Civil Procedure.
 [1] The order directing the monthly payments is clearly appealable within the meaning of section 1240 of the Probate Code as an order "instructing ... a trustee." (See Estate of Keet, 15 Cal.2d 328, 333 [100 P.2d 1045].)
 Respondent contends that only the contingent remaindermen, George D. Ferrall and his three children, are aggrieved by the order directing that the payments be made out of the corpus. He therefore relies on the rule that trustees acting in their representative capacities cannot by an appeal litigate the conflicting claims of beneficiaries. This rule has generally been limited, however, to prohibiting appeals by a trustee from orders merely determining which beneficiaries are entitled to share in a particular fund. (Bryant v. Thompson, 128 N.Y. 426, 434-435 [28 N.E. 522, 13 L.R.A. 745]; In re Reeves' Estate, 62 S.D. 618 [256 N.W. 113]; Alberts v. Steiner, 237 Mich. 143 [211 N.W. 46]; In re Musser's Estate, 341 Pa. 1, 8 [17 A.2d 411]; State ex rel. St. Louis Union Trust Co. v. Sartorius, 350 Mo. 46, 55 [164 S.W.2d 356].) Since a trustee must deal impartially with beneficiaries (see Scott on Trusts  183), he should not be allowed to participate in the adjudication of their individual claims. Under such circumstances the trustee is therefore to be regarded as a mere stakeholder with no duties to perform other than to pay out funds to the various claimants as ordered by the proper court, and the beneficiaries must then protect their own rights. On the other hand, it is generally *205 held that a trustee may appeal in his representative capacity if it is necessary to protect the interests of those whom he represents. Thus, since it is the duty of the trustee to defend the estate against attacks by third persons (see Scott on Trusts, 940), he may appeal from an order in their favor that affects the estate as a whole. (Stringer v. Young, 191 N.Y. 157, 166 [83 N.E. 690]; Clay v. Hamilton, 116 Ind.App. 214, 221 [63 N.E. 207]; Hendrick v. Mitchell, 320 Mass. 155, 159 [69 N.E.2d 466]; Scott on Trusts, 940; Restatement of Trusts  178, com. a, and 177, com. d; see Estate of Kessler, 32 Cal.2d 367 [196 P.2d 559]; In re Heydenfeldt, 117 Cal. 551, 553 [49 P. 713].) Moreover, a trustee may appeal from a decree determining the relative rights of beneficiaries if some of them are unascertained or without representation (District Bond Co. v. Cannon, 20 Cal.App.2d 659, 665-666 [67 P.2d 1090]; Garrison v. Garrison, 354 Mo. 62, 66 [188 S.W.2d 644]; Peoples Bank of Bloomington v. Trogdon, 276 Ill.App. 373, 385-386; In re Luscombe's Will, 109 Wis. 186, 193 [85 N.W. 341]; Wolf v. Uhlemann, 325 Ill. 165, 185 [156 N.E. 334]), or are not competent to act for themselves. (In re Stevens, 114 App.Div. 607, 614 [99 N.Y.S. 1070].)
 It has also been held that a trustee may appeal from an order terminating a trust (Waterbury Trust Co. v. Porter, 130 Conn. 494, 500 [35 A.2d 837]; Ripley v. Brown, 218 Mass. 33, 35 [105 N.E. 637]; see Estate of Hubbell, 121 Cal.App. 38, 40 [8 P.2d 530]; Fletcher v. Los Angeles Trust & Savings Bank, 182 Cal. 177, 185 [187 P. 425]; Peoples Bank of Bloomington v. Trogdon, supra, 276 Ill.App. 373, 387) or from an order dissolving a spendthrift trust, even though all the beneficiaries consent to the immediate distribution of the trust estate. (Stein v. La Salle Nat. Bank, 328 Ill.App. 3, 5 [65 N.E.2d 216].)
 The considerations involved in the decisions permitting a trustee to appeal from an order terminating a trust or dissolving a spendthrift trust are also applicable here. The trustee is permitted to appeal from an order of termination in order to give effect to trust purposes that can be served only by the continued administration of the trust. An appeal by a trustee may be necessary in order to determine whether the trial court properly ordered its termination. If such an appeal were not allowed, the trial court, when all beneficiaries consent, could completely disregard the provisions of the trust, even though there is no justification for a deviation from its *206 terms. There is no substantial difference in this respect between an order that terminates a trust and an order that modifies it contrary to a specific provision. In either case the litigation does not involve merely the conflicting claims of beneficiaries to a particular fund, but concerns the performance of a duty by the trustees to protect the trust against an attack that goes to the very existence of the trust itself.
 [2] The will in the present case provided that Faye F. Hamilton receive the income from the corpus during the continuance of the trust, with power vested in the trustees, in their sole discretion, to provide her with funds from the corpus to take care of her needs. It further provided that in the event her husband predeceased her, or became divorced from her, then the entire corpus of the trust was to be distributed to her. Thus, so long as she remained married to her husband she was to receive only such funds in addition to the trust income as were deemed necessary by the trustees to meet her needs. To deny the trustees an appeal under these circumstances would render them helpless to prevent invasions of the corpus that might defeat the plan of the trustor or even destroy the trust itself.
 The motion to dismiss the appeal is denied.
 Gibson, C.J., Shenk, J., Edmonds, J., Carter, J., Schauer, J., and Spence, J., concurred.
