
85 N.W.2d 553 (1957)
Matter of the Trust Created by the WILL of Charles Grandlson REYNOLDS, Deceased.
SECURITY-FIRST NATIONAL BANK OF LOS ANGELES, Trustee, Plaintiff and Appellant,
v.
NORTH DAKOTA CHILDREN'S HOME SOCIETY, Defendant and Respondent.
No. 7694.
Supreme Court of North Dakota.
October 21, 1957.
Rehearing Denied November 5, 1957.
*555 Duffy & Haugland, Devils Lake, and Lawler, Felix & Hall, Los Angeles, Cal., for plaintiff and appellant.
Conmy & Conmy, Fargo, for defendant and respondent.
MORRIS, Judge.
Charles Grandison Reynolds a resident of the state of California, died testate December 15, 1928. His estate included nine parcels of land in North Dakota and a number of notes secured by mortgages on North Dakota real estate. His will and two codicils were admitted to probate by the Superior Court of the state of California in and for the county of Los Angeles.
The testator's son Frederic P. Reynolds survived him. After providing for certain bequests the testator left the residue of his estate, which included the North Dakota lands and mortgages, to a trustee for the benefit of Frederic during the latter's lifetime. The trust was to terminate on Frederic's death and the residue of the trust estate was then to be distributed two-thirds to Frederic's issue if any he had and one-third to the North Dakota Children's Home Society. If Frederic died without issue the entire residue of the estate was to go to the Society. Frederic P. Reynolds died without issue on September 8, 1952, at which time he was a resident of California.
On January 4, 1931, Frederic P. Reynolds was appointed testamentary trustee in the place of the Security-First National Bank of Los Angeles. He served as trustee until his death under the jurisdiction of the Superior Court which retained continuing jurisdiction over the trust. Sec. 1120, West's Annotated California Probate Codes.
Ancillary probate proceedings were had in the County Court of Towner County, North Dakota, which resulted in a Final Decree of Distribution dated August 20, 1936, which vested title to the nine parcels of North Dakota real estate in Frederic P. Reynolds as trustee under the last will and testament of Charles Grandison Reynolds, deceased.
Pursuant to the terms of the will, the Superior Court of Los Angeles County entered a "Decree of Partial Distribution" on December 7, 1929, directing the executor of the will of Charles Grandison Reynolds, deceased, to transfer and convey the residuary estate to Security-First National Bank of Los Angeles in trust in accordance with the terms of the will. It provided that the trust should terminate upon the death of Frederic P. Reynolds at which time the trustee should transfer and deliver all of the trust property as follows:
"(a) one-third thereof unto the North Dakota Children's Home Society of Fargo, North Dakota in trust upon the conditions herein stated. So much of said property as necessary shall be used by said Society for the establishment of a surgical ward to be known as `The Charles Grandison Reynolds Foundation in Memory of Minnie McIntosh Reynolds and Leila Doolittle Reynolds.' The purpose of said foundation shall be to benefit unfortunate children under the age of fifteen years who have been residents of North *556 Dakota for at least one year, unless such children are under one year of age, and the benefits of such foundation shall be granted to such children free of charge excepting in cases where the parents or guardians of such children are possessed of means to pay in whole or in part for such services. In the event that there is any property remaining in said trust after the establishment of such surgical ward, then the income from such property shall be used towards paying the fees of surgeons and doctors who shall treat such children while in such ward but no salary shall be paid to any doctor or surgeon as a permanent charge or expense of such ward. Said Society shall have the right to possess, manage, control, sell, convey, lease, rent, assign, transfer, invest and reinvest said trust fund as to it may seem best, provided that such investments and reinvestments shall be made only in securities legal for investment in savings banks in the State of New York and the State of Massachusetts, and shall collect and receive all of the rents, dividends, interest and income from said trust funds and therefrom shall pay all taxes, insurance, assessments and other expenses of the administration of said trust.
"(b) Two-thirds thereof, share and share alike unto the lawful surviving issue of said Frederic P. Reynolds.
"(c) In the event said Frederic P. Reynolds leaves him surviving no lawful issue, then two-thirds of said property shall be distributed in accordance with the last will and testament of said Frederic P. Reynolds, or in the event he leaves no last will and testament, then to his heirs at law in accordance with the then statutes of succession of the State of California."
It will be noted that paragraph (c) of the above decree is contrary to the terms of the will which provided that in event Frederic P. Reynolds should die without issue the whole of the residuary estate should go to the North Dakota Children's Home Society. This departure from the terms of the will was the result of a California statute prohibiting bequests or devises to any charitable or benevolent society or corporation or to any person or persons in trust for charitable uses in excess of one-third of the estate where the testator left surviving issue. See Calif. Civil Codes, Sec. 1313, as amended, West's Ann.Cal.Prob.Code, § 41. While the California court had jurisdiction the record does not show any personal appearance or participation on the part of the North Dakota Children's Home Society in the proceedings which resulted in the Decree of Partial Distribution.
After the death of Frederic P. Reynolds the Farmers and Merchants National Bank of Los Angeles was appointed trustee under the will of Charles Grandison Reynolds in the place and stead and as the successor to Frederic P. Reynolds.
During the administration of the trust by Frederic P. Reynolds six of the nine parcels of North Dakota land owned by Charles Grandison Reynolds at the time of his death were sold and the proceeds amounting to $10,820.75 taken to California by the trustee and invested in securities.
In 1954 the successor trustee rendered a detailed account and report in the Superior Court of California and asked the court to instruct it with respect to the distribution of the trust. On October 18, 1954, an order was entered settling the successor trustee's account and report and instructing the trustee as to the distribution of the estate which included the proceeds of North Dakota lands that had been sold and the North Dakota lands to which title remained in the trustee consisting of three parcels of land of which Charles Grandison Reynolds had died seized together with other land to which the trustee had acquired title through the foreclosure of mortgages after the death of the testator. At a hearing held upon the account and report of the successor trustee the North Dakota *557 Children's Home Society appeared by a firm of California attorneys and participated in the hearing.
The order of the Superior Court directed the trustee to distribute the trust estate including the North Dakota lands one-third to the North Dakota Children's Home Society and two-thirds in accordance with the will of Frederic P. Reynolds, son of the original testator.
After the order of the Superior Court of Los Angeles County had become final under the laws of the state of California, the successor trustee filed in the District Court of Towner County, North Dakota a petition for the administration of the trust to which was attached an itemized inventory giving the description, location and estimated value of North Dakota property embraced in the trust. The petition recited that the will of Charles Grandison Reynolds had been admitted to probate by the Superior Court of the state of California, County of Los Angeles, and a trust established thereunder and that on October 18, 1954, an order was made by that court instructing the trustee as to the distribution of the trust estate, a copy of which order was attached to the petition. Named in the petition were the beneficiaries alleged to be interested in the trust property including the North Dakota Children's Home Society and the persons named as devisees or legatees under the will of Frederic P. Reynolds. It then asked that the real estate situated in North Dakota be vested in accordance with the order of the Superior Court of Los Angeles County and prayed that the District Court of Towner County supervise the administration of the trust and confirm the distribution of the trust estate and make such other and further order as may be proper.
In answering the petition the North Dakota Children's Home Society alleges that the order of the California court under which the trustee seeks to make distribution is not valid or binding upon the courts of North Dakota as to real estate located therein and alleges that the real estate was by decree of the County Court of Towner County, North Dakota dated August 20, 1936, conveyed to a predecessor trustee under the last will and testament of Charles Grandison Reynolds, and that the present trustee is required to convey all of the real estate to the North Dakota Children's Home Society as provided in the will and prays for an order directing the trustee to convey all of the inventoried real estate to it and to require the trustee to pay to it two-thirds of the amount collected on the sale of real estate belonging to the estate in North Dakota as a conditon for granting any relief.
After a trial of the issues the District Court of Towner County reached the conclusion that all of the North Dakota land owned by the testator at the time of his death or the proceeds thereof should be distributed according to the terms of the will of Charles Grandison Reynolds free of the limitations of the California law with respect to bequests to charitable institutions or for charitable purposes. He decided that the California court was without jurisdiction and its decree was wholly void with respect to North Dakota land owned by the testator at the time of his death. He further held that North Dakota land acquired after the testator's death through mortgage foreclosures was governed by the California decree. The latter determination is not challenged on this appeal.
Under the decision of the trial court the North Dakota Children's Home Society would be entitled to all of the proceeds of the six parcels of land owned by the testator at the time of his death and sold by Frederic P. Reynolds as trustee during his administration of the trust. The Society would also be entitled to the net proceeds of the sales of the three parcels owned by the testator at the time of his death and remaining unsold at the time of the termination of Frederic's trusteeship together with the net rentals received from these parcels and all mineral rights in these lands retained by the trust.
*558 The interested parties desired to convert the North Dakota land into cash pending the final determination of this controversy and stipulated that the trustee might sell the land and deposit the net proceeds with the Clerk of the District Court until the rights of the parties should be determined. All of the land has now been sold. Some of the mineral rights are still retained by the trust.
The appellant herein, Security-First National Bank of Los Angeles, trustee, is the present successor to the Farmers and Merchants National Bank of Los Angeles.
The second and last codicil of the will of Charles Grandison Reynolds in part provides:
"It is my will and I hereby direct that all benefits accruing under the provisions of my last will and codicils thereto to said North Dakota Children's Home Society of Fargo, North Dakota, shall go to such Society for the establishment of a ward in such institution to be known as The Charles Grandison Reynolds Foundation, in Memory of Minnie McIntosh Reynolds and Leila Doolittle Reynolds. * * *
"I wish all income accruing upon that portion of my gift remaining after the establishment of such ward has been accomplished, to be used towards paying the fees of surgeons and doctors who shall treat such children while therein and there shall be necessity for such charge and expense, but I specifically desire that no salary is to be paid to any doctor or surgeon as a permanent charge or expense of such ward. It is my desire that as small an amount as can be properly expended to accomplish the purpose I have in mind, is to be used for the establishment of the ward, but that the balance of the fund is to be retained by such society, and that it shall be invested in safe securities and that the income therefrom is then to be used towards the upkeep and expense of such ward and the fees of surgeons and doctors to the exent that it is available."
It is the contention of the appellant trustee that the above provisions worked an equitable conversion of the North Dakota land from the date of the death of the testator and that the land and all proceeds thereof must be considered as personal property within the jurisdiction of the California court subject to California laws with respect to distribution and that the order of the Superior Court of California in Los Angeles County is therefore binding upon the courts of North Dakota with respect to the distribution of the res of the trust situated in North Dakota.
Section 30-2132, NDRC 1943, provides:
"The validity and effect of a testamentary disposition of real property situated within the state, or of an interest in real property so situated, which would descend to an heir of an intestate, and the manner in which such property or such an interest descends when it is not disposed of by will, are regulated by the laws of this state without regard to the residence of the decedent. Except when special provision is made otherwise by law, the validity and effect of a testamentary disposition of any other property situated within the state, and the ownership and disposition of such property when it is not disposed of by will, are regulated by the laws of the state or country of which the decedent was a resident at the time of his death."
In Section 209.1, The Conflict of Laws, Joseph H. Beale, it is said:
"The question whether land can be so far equitably converted into personality as that it is to be treated as personality, must be governed necessarily by the law of the situs of the land; since, irrespective of what any other court might decide, the decision of the court where the land is must determine its fate."
*559 Section 56-0522, NDRC 1943, provides:
"When a will directs the conversion of real property into money such property and all its proceeds must be deemed personal property from the time of the testator's death."
This statute was considered in Penfield v. Tower, 1 N.D. 216, 46 N.W. 413, wherein it was said:
"Where the will directs the sale of real estate expressly, or by clear implication, or where a sale is absolutely necessary to the execution of the provisions of the will, such real estate is equitably converted into personalty from the time of the testator's death; and as such real estate, the trust is a trust of personal property, and its validity is to be determined, not by the laws of the situs of the real property, but by the laws of the jurisdiction in which the testator was domiciled at the time of his death."
The doctrine of equitable conversion arose as a means of implementing the maxim that equity "regards that as done which ought to be done."
In this case the will set up a trust for the benefit of Frederic P. Reynolds during his lifetime and upon his death the residue was to be distributed. How it was to be distributed was contingent upon whether he left issue. He died leaving no issue and under the terms of the will the residue was to go to the North Dakota Children's Home Society. The trustee of this trust was at no time under a direction to convert real property into personal property. It merely had a power of sale which under the authorities does not work an equitable conversion. But it is argued that the direction to the North Dakota Children's Home Society contained in the second codicil with respect to the establishment and maintenance of a ward for certain children brought about such a conversion because it would be necessary to sell the real property in order to carry out the instructions of the testator. To carry out those instructions it undoubtedly would be necessary to sell some of this property but not necessarily all of it. The instructions given in connection with this devise are not sufficiently definite and specific with respect to the disposition of the North Dakota land to require the court to invoke the doctrine of equitable conversion.
We would further point out that the appellant trustee has assumed an inconsistent position with reference to the equitable conversion of a two-thirds interest in the North Dakota land. Even under its theory an equitable conversion of this interest in the land could only occur as the result of a valid bequest to the Society. The trustee denies the validity of that bequest as to two-thirds of the property. It cannot treat the bequest as valid for purposes of conversion and invalid for purposes of distribution. The conversion, if such it may be called, is contingent upon title vesting in the North Dakota Children's Home Society subject to an obligation to sell the land and use the proceeds in establishing and maintaining the children's ward. The happening of that contingency the trustee seeks to prevent by invoking the California statute limiting charitable bequests.
"In order that the doctrine of equitable conversion may apply, it is necessary that there be an absolute obligation to convert, either immediately or at a future time, and it is not sufficient that there is a request or expression of desire to that effect, or a power to convert, with a discretion in the trustee or executor to whom the power is given, or in other persons, as to whether it shall be exercised."
Tiffany Real Property, 3d Ed., Sec. 297. Among the cases cited in support of this text is Penfield v. Tower, supra.
Having determined that there has been no equitable conversion of the North Dakota real estate owned by Charles Grandison *560 Reynolds at the time of his death the validity and effect of his testamentary disposition of this property is governed by the laws of this state without regard to the residence of the decedent unless the devisee under the will as the beneficiary under the trust thereby created is estopped from asserting its claim to this property. Sec. 30-2132, NDRC 1943; Hohn v. Bidwell, 27 S.D. 249, 130 N.W. 837; In re Hills' Estate (Hills v. Hansen), 176 Cal. 232, 168 P. 20, 57 Am.Jur., Wills, Sec. 1039; 11 Am.Jur., Conflict of Laws, Sec. 178. See Conflict of Laws, Beale, Secs. 249.1, 249.2.
The order of the Superior Court for Los Angeles County of October 18, 1954, settling the successor trustee's first and final account and report of administration, instructing the trustee as to distribution of the trust estate and allowing fees to the trustee and attorneys, was entered after a hearing had at which the North Dakota Children's Home Society appeared and in which it participated. No appeal was taken from the order and after it became final the trustee proceeded with the distribution of the residue of the trust in California pursuant to the order.
On February 14, 1955, the North Dakota Children's Home Society receipted for $15,837.04 in cash being one-third of the cash on hand as of the date of the order instructing distribution together with one-third of various stocks and bonds ordered to be distributed as a part of the residue of the trust estate. This receipt states that the cash and other assets therein were:
"ordered distributed to said undersigned by that certain Order Settling Successor Trustee's First and Final Account and Report of Administration, Instructing Trustee as to Distribution of Trust Estate and Allowing Fees to Trustee and Attorneys rendered October 18, 1954, by the above entitled court in the above entitled matter:"
On May 4, 1955, the North Dakota Children's Home Society executed another receipt to the trustee for 1,000 shares of F. W. Woolworth Company stock that contained the same recitation concerning the order of distribution that was set out in the former receipt. These two receipts cover one-third of all the trust estate except the North Dakota lands.
The appearance of the North Dakota Children's Home Society at the hearing before the California court and its participation therein unquestionably gave to that court jurisdiction over the Society in personam. The Society argues that although that be true the land being situated in North Dakota, jurisdiction over the land remains in North Dakota courts and jurisdiction over it cannot be conferred by consent or appearance in the California court. There is respectable authority supporting that contention. See Williams v. Sherman, 36 Idaho 494, 212 P. 971; Clarke v. Clarke, 178 U.S. 186, 20 S.Ct. 873, 44 L.Ed. 1028; Appeal of Clarke (same case), 70 Conn. 195, 39 A. 155. In Taylor v. Taylor, 192 Cal. 71, 218 P. 756, 758, 51 A.L.R. 1074, it is said:
"That the courts of one state cannot make a decree which will operate to change or directly affect the title to real property beyond the territorial limits of its jurisdiction must be conceded. The doctrine that a court, not having jurisdiction of the res, cannot affect it by its decree is firmly established."
On the other hand in Freeman on Judgments, 5th Ed., Sec. 1384, it is said:
"A judgment or a decree may, however, indirectly affect the title to lands situate in another state, because it binds and acts upon the litigants personally. In other words, the litigants, if within the jurisdiction of the court, may be coerced into making such conveyances, or doing such other acts as the court has decreed should be done, and in some states such a personal decree may be enforced against the parties and their privies.

*561 "While the courts of one state have no jurisdiction to determine a naked question of title to lands in another state, they probably are competent to enforce a trust, irrespective of the location of the land, and to decree a conveyance, though in so doing they may be compelled to determine the question of title."
In Sec. 1385 we find that:
"Where a court having personal jurisdiction over the parties has made a decree for a conveyance or other action by them with respect to land in another state, which decree is wholly dependent, for its operation against the land, upon its effect against the parties, the question has arisen whether it is res judicata as to the rights or equities as against the parties personally in a subsequent action between them to enforce such rights in the state where the land lies. In other words, admitting the decree cannot ipso facto operate directly against the title or interest in the land, may it nevertheless be made the basis of a new action in personam in the latter state to establish there the rights already adjudicated, and in such action may it be relied upon as an estoppel so far as the parties to it are concerned."
The question with which we are now confronted is whether the Society by participating in the proceedings which resulted in the California decree and in accepting the benefits of the distribution made by the California court under and in accordance with California law is estopped from asserting in the courts of this state that the California court had no jurisdiction over North Dakota land.
A true appraisal of the Society's position in this case requires a consideration not only of the California statute restricting charitable and benevolent devises and bequests, but also the construction placed upon it by the California courts. In re Dwyer's Estate, 159 Cal. 680, 115 P. 242, 245, the court considered whether the restriction provided by the statute applied to such estate of the testator as was located within California regardless of property located elsewhere or to his entire estate wherever located. Noting the general rule that dispositions to charity are looked upon with favor the court determined that the legislative intention was not to declare the policy of the state relative to charitable dispositions by will but to protect the interests of the heirs at law of the testator and that the term "estate of the testator" as used in the statute:
"means, for the purpose of determining the amount of the estate here distributable to charity, not the estate alone over which the court here has control, but has relation to the aggregate estate wherever situated or distributed, and that where it can be shown, as it is shown here, that in the administration of the estate in other jurisdictions the heirs at law have already received two-thirds of the estate of the testator, or that of the estate in this jurisdiction, an amount less than two-thirds of the distributable estate here, added to what has already been received by them in other jurisdictions, will give them two-thirds of the estate of the testator, they will not be allowed to take in this jurisdiction an amount in excess of what is necessary to make up the two-thirds of the estate to which in the legislative judgment and the intention of the testator they are entitled, and which, if it were permitted to do, would give them more than two-thirds of the aggregate estate of the testator."
The California decision cites Paschal v. Acklin, 27 Tex. 173, which involved the application of a statutory restriction upon the power of parents to deprive their children by will of more than one-fourth of their estates and it was held that in applying that statute regard must be had to the whole of the estate of the testator *562 wherever situate and not merely to so much of it as might be in Texas.
Subsequent to the decision In re Dwyer's Estate, supra, the Court of Appeals of New York had before it the question of the application of a statute prohibiting certain persons from leaving over half of their estate to charitable societies. A resident of New Jersey died seized of real estate in both New York and New Jersey. In determining the rule that should govern the application of the restrictive New York statute to the distribution of New York real estate the court said:
"The value of the testator's net estate, no matter where it is, must first be ascertained. If the legal provisions for charity outside of the state amount to half or more than one-half of the entire estate, the property in New York state will go to the heirs, and cannot be given to charity under the will. If such provisions outside of New York state are less than one-half, so much of the New York state property may go to the charity devisees as will make up 50 per cent, and no more." Decker v. Vreeland, 220 N.Y. 326, 115 N.E. 989, 992.
Under the construction of the California statute indicated by these cases had the Society acquired title to or even claimed the North Dakota land prior to the Order Directing Distribution of the Entire Trust Estate the total distribution to the Society would have been limited to one-third of the entire estate by taking into account the property in North Dakota, but the Society apparently made no claim to all of the North Dakota land until it had received one-third of the property available for distribution in California. Thus the trustee was rendered powerless to carry out the mandate of the court under whose directions the trustee was acting or make distribution of the California property according to California law.
Under Article IV, Sec. I of the Constitution of the United States full faith and credit must be given in each state to the public acts, records and judicial proceedings of every other state.
"That clause compels that controversies be stilled so that where a state court has jurisdiction of the parties and subject matter, its judgment controls in other states to the same extent as it does in the state where rendered." Riley v. New York Trust Co., 315 U.S. 343, 62 S.Ct. 608, 612, 86 L.Ed. 885.
In this case the California court had personal jurisdiction of the trustee and of the North Dakota Children's Home Society, but it did not have jurisdiction of the North Dakota land. The full faith and credit clause does not apply to the California judgment insofar as it directly affects the title to this land. Fall v. Eastin, 215 U.S. 1, 30 Sup.Ct. 3, 54 L.Ed. 65, 23 L.R.A., N.S., 924, 17 Ann.Cas. 853; Bullock v. Bullock, 52 N.J.Eq. 561, 30 A. 676, 27 L.R. A. 213, 46 Am.St.Rep. 528.
The non-applicability of the full faith and credit clause is not determinative of the question of whether the Society is estopped from challenging any part of the California judgment by having accepted all of the benefits accruing to it under that judgment and by its acts rendering the trustee powerless to carry out the mandate of the court having jurisdiction and supervision of the trust.
"While a void judgment cannot be validated by consent, ratification, waiver, or estoppel, one may, by his conduct, bar or estop himself from attacking the judgment." 49 C.J.S. Judgments § 452.
"One may not attack a judgment as void where he has accepted the benefits of the judgment." 49 C.J.S. Judgments § 453.
In First Bank of Strasburg v. Schmaltz, 61 N.D. 150, 237 N.W. 644, paragraph I of the Syllabus by the Court, it is said:

*563 "A party who accepts and retains benefits arising out of or accruing under a judgment may not be heard to say thereafter that the judgment is invalid."
It may be argued that this rule is applicable to judgments that are void for lack of jurisdiction in personam but does not apply where the judgment is void for a lack of jurisdiction of the subject matter. It is a general rule that parties cannot by consent or waiver give a court jurisdiction of subject matter of which it would otherwise not have jurisdiction. 14 Am.Jur., Courts, Sec. 184. The question here, however, is not, so far as the subject matter is concerned, one of consent or waiver of jurisdiction but rather one of estoppel by acceptance of the full benefits of a judgment that is void as to the subject matter. In Burgess v. Nail, 10 Cir., 103 F.2d 37, 44, the applicable rule is stated this way:
"One who accepts and retains the benefits of a void judgment is estopped to assert its invalidity. The principle applies to cases where the invalidity arises from want of jurisdiction over the person or over the subject-matter of the action."
In Bledsoe v. Seaman, 77 Kan. 679, 95 P. 576, 578, it is said:
"A party cannot invoke the jurisdiction and power of a court for the purpose of securing important rights from his adversary through its judgment, and, after having obtained the relief desired, repudiate the action of the court on the ground that it was without jurisdiction. The question whether the court had jurisdiction, either of the subject-matter of the action, or of the parties, is not important in such cases. Parties are barred from such conduct, not because the judgment obtained is conclusive as an adjudication, but for the reason that such a practice cannot be tolerated."
This statement is quoted in Freeman on Judgments, 5th Ed., Section 1438.
"Even where one who did not procure it accepts the benefits of a void judgment, he is estopped to assert its invalidity." Scheper v. Scheper, 125 S.C. 89, 118 S.E. 178, 184.
The last two quotations involve the application of estoppel where the judgments were rendered in states other than the one in which the rule was applied.
If the Children's Home were to receive all of the proceeds of the North Dakota lands it would be entitled only to so much of the California estate as would make up the difference between the proceeds of that land and one-third of the entire estate. Having accepted and retained one-third of the California estate, the Home is estopped from claiming more than one-third of the proceeds of the North Dakota land. While the appearance of the North Dakota Children's Home Society before the California court may not have conferred jurisdiction of the North Dakota land on that court the conduct of the Society, by participating in the hearing and accepting all of the avails and benefits accruing to it under the Order of Distribution to the detriment of the trust estate and in contravention of the duties of the trustee, estops it from challenging in the courts of this state a part of the same Order by virtue of which it received one-third of the property under the jurisdiction of the California court. It is therefore the duty of our district court to respect the order of that court and direct distribution of North Dakota property in accordance therewith.
The trustee, in the District Court of Towner County, asked that it be allowed $800 compensation for ordinary services and $2,500 for extraordinary services. The court allowed only the request for $800 for ordinary services. The trustee asserts that it is entitled to pay for extraordinary services. Sec. 59-0421, NDRC 1943, provides that:

*564 "When there is no provision in the instrument for the compensation of a trustee, such compensation shall be fixed and allowed by the judge of the district court who has supervision of the administration of such trust and shall be no more than in the judgment of the court will reasonably compensate him for such services as may have been rendered."
Under this statute the allowance of compensation for services rendered by the trustee is primarily within the discretion of the district court. It does not appear that the court has abused its discretion in this instance and the allowance of compensation made by the trial court is therefore affirmed.
The trustee challenges an allowance of attorneys' fees made by the court to the attorneys for the North Dakota Children's Home Society. Sec. 59-0421, NDRC 1943, provides for the allowance of reasonable attorneys' fees in connection with the administration of a trust. In this instance the fees allowed were not incurred on behalf of the trust but on behalf of a beneficiary who was seeking to control for its own benefit the action of the trustee in connection with the distribution of the trust estate. The beneficiary has been unsuccessful. Under such circumstances it is not entitled to attorneys' fees.
The order appealed from is reversed with respect to the distribution of the trust estate in North Dakota and the allowance of attorneys' fees to the Society and the case is remanded to the district court of Towner County for further proceedings conformable to this opinion, including an allowance of additional attorneys' fees for services rendered to the trustee subsequent to the entry of that order.
GRIMSON, C. J., and SATHRE, JOHNSON, and BURKE, JJ., concur.
