Opinion by
Mr. Justice Sadler,Frederick Walters was duly committed to the Dixmont Hospital for the Insane in 1905, and, with the exception of a short interval, has remained there until this time. He became possessed of a small amount of personal property, and, in 1922, upon petition, the balance in the hands of the duly appointed committee was awarded to the Commonwealth in part payment of support which had been furnished. By the will of the lunatic’s mother, who died in July of 1912, there was bequeathed to a brother, Charles, a certain sum in trust for the purpose of investment, the income to be used, at his discretion, for the “comfortable support and maintenance” of Frederick, with the right to use part or all of the corpus of the estate for this purpose, if necessary. It was directed that this property and the income arising therefrom should not be subjected to or be in any manner liable for the debts, engagements or liabilities of the cestui que trust. The balance remaining, if any, after his death, was given to other named residuary legatees. Admittedly, this testamentary provision constituted a spendthrift trust, and such a disposition of property is valid in Pennsylvania: Dull’s Est., 137 Pa. 112; Rife v. Geyer, 59 Pa. 393; Moser’s Est., 270 Pa. 217.
It will be noted that the intent of the testatrix was to make proper provision for the care of the lunatic, and prevent the use of the estate for other purposes. With this in mind, the application of the income, and, if necessary, all or part of the principal, is placed in the control of the brother named, yet “his discretion is but a *424legal one, and whenever the law determines that a proper case has arisen in which the trustee’s discretion should have been exercised in a particular way, he will be constrained to act in accordance therewith”: Erisman v. Directors of the Poor, 47 Pa. 509, 514; Stewart v. Madden, 153 Pa. 445; Barrett’s Est., 53 Pa. Superior Ct. 103.
The Commonwealth later presented a second petition setting forth the previous payment on account by the committee of the lunatic, and the discovery of the existence of the trust fund held by the brother. It asked that an order be made directing him to pay from the accumulated income, and, if necessary, principal, the additional amount of $1,718.31, due for support furnished, and to direct that reimbursement for future payments be made as the same might accrue. The application was based on the authority of the Act of June 1,1915, P. L. 661, which permits recovery by the Commonwealth of moneys expended for support of the insane. An answer was filed denying liability, it being contended that the funds sought to be reached were held by virtue of the spendthrift trust, — the expenditure of income and principal being discretionary with the trustee — and, therefore, the trustee could not be compelled to appropriate, against his will, any sum in satisfaction of the claims. The rule granted was made absolute, and a decree entered directing payment.
The only question involved on this appeal is the lia' bility of the particular fund for the payment of sums advanced for the maintenance of the lunatic. An implied contract to repay the amount expended by the State for his benefit arises, and the right to so demand has been frequently declared by this court: Hoffman’s Case, 258 Pa. 343; Com. v. Baum, 250 Pa. 469. There is no reason why property, acquired after the support has been furnished, should not be appropriated for this purpose: Arnold’s Est., 253 Pa. 517; Directors of the Poor v. Nyce, 161 Pa. 82. The trust, in the present instance, was intended to secure the comfort of the insane person: *425and the devotion of the income, or a part of the principal, to the satisfaction of obligations, incurred on his behalf, is the mere carrying out of the testatrix’s directions: Erisman v. Directors of the Poor, supra. It is true that a certain discretion was lodged in the trustee, but, as already noticed, this power must be legally exercised, and his unwarranted refusal to apply the funds for support will not prevent a recovery.
The claim of the Commonwealth here covered the period from the time of the commitment to the presentation of the second petition. From the first date to the death of the mother, by whose will the trust was created, there had accrued an indebtedness of $889.41. There had been received from the committee, by virtue of a previous order, the sum of $712.48, the entire balance of the personal fund belonging to the lunatic in its hands. The present application asks for the repayment of all outlays from 1905, less the credit already referred to. The fund now in controversy was not established until J uly, 1912, and at no time became the absolute estate of Frederick. After its creation, amounts due for support and maintenance were properly demandable from the trustee, but not for any period prior thereto, and the award to the Commonwealth should be so limited, which results in a reduction of $176.93 from the total claim as allowed by the learned court below, and the order entered must be altered accordingly.
The decree of the court below is modified, and Charles A. Walters, trustee for Frederick Walters, under the will of Catherine Walters, deceased, is directed to pay the Commonwealth the sum of $1,541.38, and, as so modified, is affirmed; the costs to be paid from the estate.