If, in any action brought against a trustee of a trust, a foreign court takes any action whereby such court declines to apply the law of this state in determining the validity, construction, or administration of such trust, or the effect of a spendthrift provision thereof, the trustee shall immediately upon the foreign court's action and without the further order of any court of this state, cease in all respects to be trustee of the trust and a successor trustee shall thereupon succeed as trustee in accordance with the terms of the trust instrument or, if the trust instrument does not provide for a successor trustee and the trust would otherwise be without a trustee, the court, upon the application of any beneficiary of the trust, shall appoint a successor trustee upon such terms and conditions as it determines to be consistent with the purposes of the trust and this section. Upon the trustee's ceasing to be trustee, the trustee has no power or authority other than to convey the trust property to the successor trustee named in the trust instrument in accordance with this section.
SDCL 55-3-47