An irrevocable trust may be modified or terminated by judicial action or by written agreement entered into by all beneficiaries, if continuance of the trust on its existing terms is not necessary to carry out a material purpose. Whether or not continuance of the trust on its existing terms is necessary to carry out a material purpose, an irrevocable trust may be modified or terminated by judicial action or by written agreement by the trustor and all beneficiaries. Upon termination of a trust under this section, the trustee shall distribute the trust property in accordance with the trustor's probable intention or in any other manner as agreed by all the beneficiaries. No person is required to seek court affirmation of a nonjudicial settlement agreement made pursuant to this section. The provisions of chapter 55-18 apply to this section.
Thirty days prior to the effective date of a modification or termination of a trust under this section, the trustor or beneficiaries shall provide notice in writing of the modification or termination, including a copy of the modification or termination, to all fiduciaries as defined in subdivision 21-22-1(3) serving as of the date of the notice. The modification or termination shall be effective no earlier than thirty days after the notice is given, unless the notice is waived.
SDCL 55-3-24