N.M. Stat. § 46A-4-416
Modification to achieve settlor's tax objectives.
To achieve the settlor's tax objectives, the court may modify the terms of a trust in a
manner that is not contrary to the settlor's probable intention. The court may provide
that the modification has retroactive effect.