In an action for a judgment declaring that an agreement dated December 23, 1971, entered into by the decedent Elizabeth T. Battcock, prohibited her from creating Totten trusts which transferred the bulk of her estate outside of her will, the plaintiffs appeal from a judgment of Surrogate’s Court, Westchester County (Brewster, S.), entered June 9, 1989, which (1) granted the motion of the Church of the Immaculate Conception for leave to serve an amended answer pleading the Statute of Frauds and for summary judgment dismissing the plaintiffs’ action as against it, (2) granted the motion by the Salvation Army—Yonkers Branch for summary judgment dismissing the action as against it, (3) denied the plaintiffs’ cross motion for summary judgment and to compel the Manhattan Savings Bank to turn over to them the balances on hand in the remaining Totten trust accounts, and (4) directed the Manhattan Savings Bank to turn over the balances on hand in the remaining Totten trust accounts to their named beneficiaries.
Ordered that the judgment is reversed, on the law, with costs payable by the respondents Church of the Immaculate Conception, Salesians of St. John Bosco, and Salvation Army —Yonkers Branch, appearing separately and filing separate briefs, the motions are denied, the cross motion is granted, and it is declared that the balances on hand in the remaining Totten trust accounts which are the subject of the instant action pass to the estate of Elizabeth T. Battcock.
On December 23, 1971, the decedent Elizabeth T. Battcock entered into a written stipulation of settlement of her claimed right of election against the estate of her late husband. The stipulation provided, inter alia, that (1) the decedent would receive $3,600, in full settlement of any and all claims she had against her husband’s estate, and (2) she would "leave intact and without change her Last Will and Testament dated December 1, 1969,” which left the bulk of her estate to her children, or to her grandchildren per stirpes in the event her children predeceased her.
*591Subsequently, the decedent created Totten trust accounts transferring the bulk of her estate outside her will. In addition, two subsequent wills were prepared in which she excluded her daughter. Following her death, her daughter Patricia Battcock Blackmon and grandchildren, sought a declaratory judgment that the Totten trusts were invalid. They claimed that the stipulation that the decedent had signed precluded the use of Totten trusts to transfer the bulk of her estate outside the will. The Surrogate’s Court rejected their claim and granted summary judgment in favor of the beneficiaries of the various trust accounts. The court held that the Statute of Frauds precluded reading an implied term into the stipulation which would bar the creation of Totten trusts. We disagree.
The stipulation of settlement wherein the decedent agreed not to modify her then existing will is sufficient to satisfy the Statute of Frauds (see, EPTL 13-2.1; Rubin v Irving Trust Co., 305 NY 288). What remains is the question of whether, under that writing, she was precluded from passing the bulk of her estate outside the will. We reject the appellants’ claim that to imply such a restriction is violative of the Statute of Frauds. Terms of a contract implied "by reasonable construction and necessary implication” are deemed to be in the writing for purposes of the Statute of Frauds (see, Cohon & Co. v Russell, 23 NY2d 569, 575).
While the precise question of whether a contract not to modify a will applies to the creation of Totten trusts is apparently a question of first impression, joint wills have been construed as imposing a contractual obligation on the surviving spouse not to modify the will. In a number of those cases it has been held that the surviving spouse cannot make a gift in the nature, or in lieu of, a testamentary disposition to defeat the purpose of that agreement (see, Rastetter v Hoenninger, 214 NY 66 [transfer of real property]; Matter of Hassan, 98 Misc 2d 80 [Totten trusts]; see also, Schwartz v Horn, 31 NY2d 275). Likewise, we conclude that where an agreement is entered not to modify an existing will, the decedent cannot use a Totten trust to defeat the purpose of that agreement (see, Schwartz v Horn, supra; Rastetter v Hoenninger, supra; Matter of Hassan, supra). Mangano, P. J., Thompson and O’Brien, JJ., concur.