This is an appeal from an order denying appellant’s motion for a change in custody of a minor child. We reverse.
Appellant Sandra Louise Larson (mother) and appellee Robert James Larson (father) were married on December 3, 1976. One daughter was born during the marriage. Late in 1979, father commenced an action for divorce, which was granted by default. Custody of the child was awarded to father pursuant to an agreement between the parties. The agreement also provided that the child could live with Pamela and James Lind, the sister and brother-in-law of father, who reside in St. Cloud, Minnesota. Mother was not represented by counsel when executing the custody agreement or *63at any point during the divorce proceedings.
In June of 1980, then represented by counsel, mother filed a motion seeking modification of custody. During a recess in the hearing on the motion, the parties entered into a second child custody agreement. It provided for a split custody arrangement, with father to have custody from August through January and mother to have custody from February through July; this arrangement would continue until the child reached school age, at which time custody would revert permanently to father.
On March 18,1983, mother filed a motion to vacate the Linds' guardianship of the child and to change the permanent custody arrangement. A full hearing was held before the trial court, resulting in an order dissolving the Linds’ guardianship but denying mother’s request for custody. Mother appeals the custody decision.
The first issue presented on appeal is whether the trial court applied the appropriate burden of proof in a motion for change of custody when the original custody decree was based on an agreement of the parties. The general rule in South Dakota is that a parent seeking modification of custodial rights has the burden of proving 1) that there has been a substantial and material change of circumstances since the decree of divorce was entered, and 2) that the welfare and best interests of the children require the modification. Hanks v. Hanks, 334 N.W.2d 856 (S.D.1983); Masek v. Masek, 90 S.D. 1, 237 N.W.2d 432 (1976). An exception to this rule is that when the original decree was based on an agreement of the parties, the party seeking modification is not required to show a substantial change of circumstances; the moving party is left with the burden of showing that the welfare and best interests of the child require modification. Flint v. Flint, 334 N.W.2d 680 (S.D.1983); Hansen v. Hansen, 327 N.W.2d 47 (S.D.1982); Kolb v. Kolb, 324 N.W.2d 279 (S.D.1982).
In this case, even though the original custody decree was based on an agreement of the parties, the record clearly indicates that the trial court applied the general two-prong rule rather than the exception to the rule. In the trial court’s findings of fact and conclusions of law, conclusion III states: “Since August 28, 1980, there has been no substantial and material change of circumstances in the Plaintiff’s ability, willingness, or effectiveness in caring for the parties’ minor child ...” (emphasis added). Then in conclusion IV the court applied the welfare and best interests test. Under the law outlined above, only the latter test should have been used. The trial court's misunderstanding is also shown in its memorandum opinion, in which the court stated: “The law requires that in order to change custody in a case of this nature, a burden is on the moving party to show a substantial change of circumstances.” We note that mother, in her objections to the proposed findings and conclusions, strenuously objected to the burden of proof used by the trial court. Since the trial court failed to apply the proper burden of proof to a case of this nature, as required in Flint, Hansen, and Kolb, the court erred as a matter of law, substantially prejudicing mother’s rights.
In light of our holding on the first issue, we need not reach mother’s second issue.
The order of the trial court is reversed and the case is remanded for entry of findings and conclusions based upon the proper burden of proof.
FOSHEIM, C.J., and WOLLMAN and MORGAN, JJ., concur. HENDERSON, J., dissents.