
128 Cal.Rptr.2d 742 (2002)
104 Cal.App.4th 1221
Joyce L. WHITTLESEY, Plaintiff and Respondent,
v.
Dorian M. AIELLO, as Trustee, etc., Defendant;
Timothy H. Stearns, Movant and Appellant.
No. C038739.
Court of Appeal, Third District.
December 27, 2002.
Review Denied April 9, 2003.
*743 Timothy H. Stearns, Mount Shasta, for Movant and Appellant.
Richard L. Kimbell and Lauren E. Leisz, Yreka, for Plaintiff and Respondent.
HULL, J.
Timothy H. Stearns (Stearns) appeals from that portion of a final judgment denying his request for attorney fees and costs incurred in representing the trustee in litigation over the validity of a trust amendment. Stearns contends the court erroneously based its denial on his lack of success in the litigation. We conclude that, because this was a dispute between competing trust beneficiaries and not a challenge to the trust itself, the trial court properly denied litigation expenses. However, we reverse the denial of compensation in connection with earlier litigation in which the trustee prevailed.

FACTS AND PROCEDURAL HISTORY
This is the fourth time this matter has come before us. The underlying litigation began as a challenge to a restated and amended trust executed by decedent James Bertram McAdams shortly before his death in June 1996. In 1990, decedent and his then wife, Anna McAdams, created a revocable trust (the trust), which named their niece, petitioner Joyce Whittlesey, as the trustee and primary beneficiary. After Anna's death, decedent married Margaret McAdams, nee Thomson (Margaret), *744 and amended the trust to confirm a gift to Margaret of $100,000 as provided in a prenuptial agreement. However, in the weeks leading up to his death, decedent amended the trust to make Margaret and her son, Thomas Thomson (Thomas), the primary beneficiaries.
After decedent's death, Dale E. Carlson, the successor trustee under of the trust, initiated a challenge to the amendment. The matter was eventually dismissed for lack of standing, and we affirmed the dismissal. (Carlson v. McAdams (Apr. 15, 1997) C024561 [nonpub. opn.] (case No. 24561).)
In January 1997, Whittlesey initiated her own challenge to the amendment. On April 1, 1997, Margaret died and Dorian M. Aiello became the successor trustee of the amended trust. The matter proceeded to a bench trial, after which the court entered judgment finding the amendment void as a product of undue influence by Margaret and Thomas. On May 25, 2000, we affirmed the judgment. (Estate of McAdams (May 25, 2000) C028847 [nonpub. opn.] (case No. C028847).)
Aiello thereafter prepared a complete accounting of the trust assets, and the trial court entered an order which, among other things, surcharged Aiello for potential tax liability and mismanagement of trust property in amounts to be determined later. The court also denied Aiello's request for attorney fees and costs in defending the trust contests. Both Aiello and Thomas appealed. We dismissed this appeal as premature. (Estate of McAdams (Oct. 26, 2000) C030809 [nonpub. opn.] (case No. 30809).)
Thereafter, the trial court, Aiello and Whittlesey entered into a settlement that resolved all claims among the parties except "any claims that Timothy H. Stearns, trustee's attorney, may have against The McAdams Trust for attorney services per-formed on behalf of AIELLO and/or any predecessor trustee of The McAdams [Trust] at the trial court and appellate court levels and/or for litigation costs advanced by Timothy H. Stearns...." On May 7, 2001, the court entered an order pursuant to the settlement.
Thereafter, the court entered final judgment, incorporating the settlement agreement and that portion of an August 13, 1998, ruling that read: "The fees requested by Mr. Timothy Stearns for legal services rendered in connection with the administration of the trust estate and the accounting total $5,350. The Court finds these fees are unreasonable due to the condition [of] the account prompting the surcharge order of Mr. Aiello, the court allows Mr. Stearns the sum of $2,500.00 for legal services rendered in connection with the administration of the trust estate and the accounting only...."

DISCUSSION
Stearns contends the trustee under the amended trust had a fiduciary duty to the beneficiaries to defend against the challenges by Carlson and Whittlesey and, therefore, has a right to reimbursement for expenses incurred in that defense, including reasonable attorney fees. Stearns further contends this duty and right of reimbursement is independent of his success in the litigation.
Whittlesey contends most of Stearns's claims are barred by res judicata. Whittlesey points out that in its judgment finding the amendment invalid, the trial court denied attorney fees, and we affirmed that judgment on appeal. (Case No. C028847.) Therefore, so the argument goes, Stearns is barred from recovering any attorney fees incurred prior to the judgment, which would include all fees *745 connected with the trust litigation. We are not persuaded.
"The doctrine of res judicata precludes parties or their privies from relitigating an issue that has been finally determined by a court of competent jurisdiction. [Citation.] `Any issue necessarily decided in such litigation is conclusively determined as to the parties or their privies if it is involved in a subsequent lawsuit on a different cause of action.'" (Levy v. Cohen (1977) 19 Cal.3d 165, 137 Cal.Rptr. 162, 561 P.2d 252.) Three elements must be met: "(1) Was the issue decided in the prior adjudication identical with the one presented in the action in question? (2) Was there a final judgment on the merits? (3) Was the party against whom the plea is asserted a party to or in privity with a party to the prior adjudication?" (Ibid.) A sister doctrine of res judicata is collateral estoppel, under which a prior judgment between the same parties operates as an estoppel as to those issues actually and necessarily decided in the prior action. (Rohrbasser v. Lederer (1986) 179 Cal. App.3d 290, 296-297, 224 Cal.Rptr. 791.)
Neither res judicata nor collateral estoppel applies here. Besides the fact Whittlesey is attempting to preclude relitigation of a matter involved in this same litigation rather than a prior proceeding, the issue involved was not decided by this court in case No. C028847. In that appeal, Aiello alleged error in the denial of attorney fees. However, because the same issue was raised in case No. C030809, we deferred its determination until resolution of that matter. Later, we dismissed the appeal in case No. C030809 as premature. Hence, the issue was never decided on appeal, and Stearns is not barred from challenging the denial of attorney fees in this proceeding.
"A trustee is entitled to the repayment out of trust property for the following: [¶] (a) Expenditures that were properly incurred in the administration of the trust. [¶] (b) To the extent that they benefited the trust, expenditures that were not properly incurred in the administration of the trust." (Prob.Code, § 15684.) "[A]mong the ordinary powers and duties of a trustee of a private trust are those of doing all acts necessary and expedient to collect, conserve and protect the property of the trust, to maintain and defend the integrity of the trust for the benefit of the beneficiaries and to employ such assistants as may be necessary for said purposes." (Evans v. Superior Court (1939) 14 Cal.2d 563, 574, 96 P.2d 107.) "[W]here litigation is necessary for the preservation of the trust, it is both the right and duty of the trustee to employ counsel in the prosecution or defense thereof, and the trustee is entitled to reimbursement for his expenditures out of the trust fund." (Metzenbaum. v. Metzenbaum (1953) 115 Cal. App.2d 395, 399, 252 P.2d 966.) "If the trustee acts in good faith, he has the power to employ such assistants and to compensate such assistants out of the assets of the trust even though he may not ultimately succeed in establishing the position taken by him as such trustee." (Evans v. Superior Court, supra, 14 Cal.2d at p. 574, 96 P.2d 107.)
The foregoing rules, of course, presuppose that the litigation was for the benefit of the trust estate. (Metzenbaum v. Metzenbaum, supra, 115 Cal.App.2d at p. 399, 252 P.2d 966.) For example, the defense of a lawsuit that has the potential for depleting trust assets would be for the benefit of the trust, justifying the employment of counsel. However, litigation seeking to remove or surcharge a trustee for mismanagement of trust assets would not warrant the trustee to hire counsel at the expense of the trust. Such litigation would be for the benefit of the trustee, not the trust.
*746 We have found no reported cases in this state where legal expenses were sought for the unsuccessful defense of a trust amendment that changed the allocation of trust benefits. However, a closely analogous situation may be seen in contests over the validity of a will. In Estate of Hite (1909) 155 Cal. 448, 101 P. 448, the state high court explained that where opposition to a will was sustained and the will was denied probate, counsel for the executor who resisted the will contest was not entitled to litigation expenses, even where the resistance was in good faith. (Id. at p. 455, 101 P. 448.) While recognizing the executor's right to present the will for probate, the court explained: "[T]here are many cases in which the executor named in the will would not be warranted in engaging in litigation at the expense of the estate for the purpose of establishing the paper offered by him for probate, even though he believed that it should be admitted and that a trial of the contest would so establish. Mr. Woerner says: `Whether the executor is entitled to credit for the expenses incurred in the litigation to establish a will depends on circumstances in several directions. In so far as he simply performs a duty, the expenses fairly incurred by him in a contest with the heirs at law are payable out of the estate, whatever be the consequences to the successful contestants; but if he voluntarily assume] the burden of a contest which properly belongs to the legatees or devisees, he must look to them, and not to the estate for reimbursement. It is held to be the duty, or at least the privilege, of the person named as executor in a paper purporting to be a last will, to propound the same for probate in the proper court; but the executor is not bound to become a party to an issue of devisavit vel non, unless he be secured for the expenses by the persons interested in the will.... If, therefore, an administrator or executor incur expense at the request or in the interest of a legatee or devisee, in the fruitless attempt to establish a will, the parties are liable therefor, but not the estate. If the will is established, however, the costs and counsel fees, being chargeable against those who are benefited by the litigation, may be charged against the estate, if it go to the parties so benefited; otherwise, the executor's remedy is by action for contribution.' (2 Woerner on Administration, 2 ed. sec. 517.)" (Estate of Hite, supra, 155 Cal. at pp. 455-456,101 P. 448.)
In Estate of Higgins (1910) 158 Cal. 355, 111 P. 8, the executor, who was also a beneficiary, opposed the contest of a will that benefited the executor over another beneficiary. The court concluded that under such circumstances, an award of the executor's fees from the estate would be inequitable. The court explained that "[t]o hold otherwise would simply be to enable him by reason of his position as executor to subject the whole estate to such expenses as were incurred by him in litigation defended by him for his own sole benefit as a devisee and legatee under the assailed will." (Id. at p. 358, 111 P. 8.)
In the present matter, a trust was created that named Whittlesey as the trustee and primary beneficiary. Later, an amendment was executed that named Margaret as the trustee and primary beneficiary. The amendment was challenged, and Margaret hired Stearns to defend it. After Margaret died, Stearns was kept on by the successor trustee, Aiello. The essence of the underlying action was not a challenge to the existence of the trust, it was a dispute over who would control and benefit from it. Whether or not the contest prevailed, the trust would remain intact. On one side of this dispute were Margaret and her heirs, on the other, Whittlesey and her heirs. Whittlesey initiated the litigation to have the amendment voided and to establish *747 her rights in the trust. Margaret defended the action to retain her competing rights in the trust.
In support of his claim for attorney fees under the circumstances of this case, Stearns relies primarily on Estate of Duffill (1922) 188 Cal. 536, 206 P. 42. There, the court said, "Unquestionably, when proceedings are commenced attacking the validity of a trust, it is the right ... of the trustee to secure legal assistance, and it is equally beyond doubt that the facilities to command such assistance should not be narrowed, if not entirely destroyed, by any such restriction as that compensation for such assistance is wholly dependent upon, and measured by, the degree of success." (Id, at pp. 556-557, 206 P. 42.)
Stearns's reliance on Duffill is misplaced. Duffill involved a challenge to a testamentary trust in which the trustee largely prevailed. The court indicated that the efforts of the attorneys for the trustee "were in this instance directed to the preservation of the trust in its entirety, a duty imposed upon the trustee, whom they represented, irrespective of whether, if upheld or only partially upheld, the result might be more beneficial to some than to others who are interested therein...." (Id. at pp. 554-555, 206 P. 42.) The court continued: "The appellant assailed the validity of the entire trust, against which attack it was the duty of the trustee to defend, and which it did defend, with the result that though some of [the challenger's] contentions were sustained, the general scheme of the trust was nevertheless preserved. Under such circumstances we can see no good reason for holding that the attorneys for the trustee should not be compensated for the entire service." (Id. at p. 555, 206 P. 42.)
In reaching the foregoing conclusion, the court expressly distinguished an earlier decision by the New York Court of Appeals, Bailey v. Buffalo Loan, Trust & Safe Deposit Co. (1915) 214 N.Y. 689, 108 N.E. 561, in which attorney fees associated with a trust challenge were denied. The plaintiff, a trust beneficiary, challenged the validity of the trust, and the trustee sided with the other beneficiaries and fought the challenge. After the plaintiff prevailed, the New York high court ruled that the trustee was not entitled to recover its litigation expenses. The court explained that while the trustee had an obligation not to allow a default, "[i]ts interest as trustee would be preserved, had it remained neutral as between the parties, while they sought in good faith a determination of the question of the validity of the trust provision of the will. It chose to join in the litigation, and to defeat the plaintiff, who was a cestui que trust under the terms of the instrument in litigation, while the remaining defendants in their individual behalf sought the same end and purpose. As the plaintiff was finally successful, we determined that the action of the trust company did not justify an award of costs or an allowance to it to be paid by plaintiff, the successful party." (Id. at pp. 690-691, 108 N.E. at p. 562.)
In Duffill, the court found Bailey distinguishable for several reasons. First, in Bailey the trust was wholly abrogated; in Duffill the trust was preserved. In Bailey, because the trust was abrogated, the trust funds passed to the plaintiff under the will; in Duffill, the funds remained in the trust, available to be paid as fees. Finally, in Duffill, the court explained that the "fundamental difference" between the two cases is, in Bailey, the action of defending the trust did not justify an award of expenses to be paid by the plaintiff, the prevailing party, whereas in Duffill, the trustee was successful in preserving the trust. (Estate of Duffill, supra, 188 Cal. at pp. 558-559, 206 P. 42.)
*748 As the Duffill court explained, the fundamental distinction between that case and Bailey is that, in the latter, it would have been inequitable to charge the trust with the defendant's litigation expenses. Because the trust was abrogated and the trust assets passed to the plaintiff under the will, a charge on the trust would have been, in effect, a charge on the prevailing plaintiff. Because the underlying dispute was essentially between trust beneficiaries and the prevailing plaintiff had already been required to incur his own litigation expenses, it would have been unfair to saddle him with the defendants' expenses as well. In Duffill, the trust was preserved largely intact after the litigation, such that a charge on the trust was, in effect, a charge on the trust beneficiaries. In other words, the trust beneficiaries were required to foot their own litigation costs, not those of the losing defendants.
Allowance of litigation expenses rests in the sound discretion of the trial court, whose ruling will not be disturbed on appeal absent an abuse. (Estate of Vokal (1953) 121 Cal.App.2d 252, 260, 263 P.2d 64.) "The underlying principle which guides the court in allowing costs and attorneys' fees incidental to litigation out of a trust estate is that such litigation is a benefit and a service to the trust." (Dingwell v. Seymour (1928) 91 Cal.App. 483, 513, 267 P. 27.) Consequently, where the trust is not benefited by litigation, or did not stand to be benefited if the trustee had succeeded, there is no basis for the recovery of expenses out of the trust assets.
In this instance, because the trust amendment was voided and Whittlesey's status as the primary trust beneficiary was restored, an award of fees to Stearns from the trust would be, in effect, an award from Whittlesey. In other words, Whittlesey would be required to finance her own trust litigation and that of her opponent, despite the fact she prevailed. There can be no equity in that.
Stearns contends he is entitled to compensation for representing the trustee, if the trustee is acting in accordance with his fiduciary duties. According to Stearns, "[t]he trustee acts in accordance with his fiduciary duties where (1) the trustee has subjective good faith and (2) the trustee's decision to participate in the litigation is objectively reasonabl[e] given the facts and circumstances available to the trustee at the time of the decision." Here, according to Stearns, there was ample evidence available at the time of the trust litigation to lead the trustee to believe the trust amendment was valid.
Assuming soundness of the principle of law stated by Stearns, the existence of facts that would have led the trustee to believe the trust amendment was valid does not establish the objective reasonableness of the trustee's defense of the trust amendment. While it would not have been proper for the trustee to have allowed a default in the litigation, there was no basis for the trustee to have taken other than a neutral position in the contest. As indicated previously, the parties primarily interested in the outcome of the litigation were Whittlesey on the one hand and Margaret, and later Thomas on the other. To the extent Stearns defended the amendment, he was representing the interests of one side of the dispute over the other, not representing the interests of the trust or the trustee.
Stearns contends the conclusion we reach in this matter will result in fewer attorneys being willing to defend a trust for fear of being denied fees if the trust defense is unsuccessful. We disagree. In situations such as that presented here, counsel must seek compensation from the *749 parties who stand to gain from the litigation, not the trust.
Finally, Stearns contends he is at least entitled to the remaining fees unpaid for his defense of the amendment in the aborted litigation initiated by Carlson. We agree. Although, in that litigation, Stearns was again representing the interests of one beneficiary over another, this time he prevailed. Under Duffill, he was entitled to compensation from the trust, as amended. Such an award is equitable because, had the litigation by Whittlesey never been initiated, the amended trust would have remained in effect, and an award of fees from the trust would have been, in effect, an award from Margaret, the prevailing beneficiary.

DISPOSITION
The judgment is reversed in part and the matter is remanded to the trial court with directions to enter a new judgment consistent with the views expressed in this opinion. The parties shall bear their own costs on appeal.
We concur: SCOTLAND, P.J., and BLEASE, J.
