
640 N.W.2d 53 (2002)
2002 ND 35
Jenny A. ZELLER, f/k/a Jenny A. Meyers, n/k/a Jenny A. Holloway, Plaintiff and Appellant,
v.
Doni E. ZELLER, Defendant and Appellee.
No. 20010134.
Supreme Court of North Dakota.
February 21, 2002.
*54 Robert G. Will, Minot, for plaintiff and appellant.
Donald L. Peterson, Kenner Sturdevant Peterson & Cresap, PC, Minot, for defendant and appellee.
MARING, Justice.
[¶ 1] Jenny Zeller (now known as Jenny Holloway) appealed an order denying her motion to change the residence of the parties' children from North Dakota to Missouri. We reverse and remand for entry of an order granting the motion.
[¶ 2] When Jenny Zeller and Doni Zeller, members of the United States Air Force stationed at Minot, divorced in 1997, they were awarded joint legal custody of their children, Kodi and Kole, who were born in 1994 and 1995. Jenny was awarded physical custody of the children. In accordance with the parties' stipulation, the divorce judgment provides:
Both parties acknowledge that orders from the United States Air Force permanently transferring Jenny outside the state of North Dakota, if accepted by her, and if such transfer actually takes *55 place, will constitute a material change in circumstances that will justify transferring physical custody of the two minor children to Doni, and that custody will therefore in fact be transferred to him.
Jenny and the children moved to Grand Forks when Jenny was transferred to Grand Forks Air Force Base in 1998.
[¶ 3] In 2000, Jenny received orders for a transfer to Fort Leonard Wood, Missouri, for a four-year teaching assignment. Jenny moved for an order allowing her to change the residence of the parties' children from North Dakota to Fort Leonard Wood, Missouri. Doni, who is still stationed at Minot Air Force Base, opposed the motion, relied on the decree-incorporated agreement for a change of custody if Jenny were transferred outside of North Dakota, and asserted it would be in the best interests of the children to reside with him if Jenny transferred to Missouri. After a hearing, the district court denied Jenny's motion to allow a change of residence for the children, and Jenny appealed.
[¶ 4] A custodial parent's change of a child's residence to another state is governed by N.D.C.C. § 14-09-07, which provides, in part:
A parent entitled to the custody of a child may not change the residence of the child to another state except upon order of the court or with the consent of the noncustodial parent, if the noncustodial parent has been given visitation rights by the decree.
The purpose of the statute is to protect the noncustodial parent's visitation rights. Hentz v. Hentz, 2001 ND 69, ¶ 5, 624 N.W.2d 694. The best interest of the child is the primary consideration in determining if the custodial parent should be permitted to change the child's residence to another state. Id.
[¶ 5] A trial court's decision as to whether a proposed move to another state is in the best interest of a child is a finding of fact which we will not overturn unless it is clearly erroneous. Hentz, 2001 ND 69, ¶ 6, 624 N.W.2d 694. "A finding of fact is clearly erroneous if it is induced by an erroneous view of the law, if there is no evidence to support it, or if, after reviewing all the evidence, we are left with a definite and firm conviction a mistake has been made." Tibor v. Tibor, 1999 ND 150, ¶ 8, 598 N.W.2d 480.
[¶ 6] In determining if a request to change a child's residence to another state is in the child's best interest, the trial court must consider four factors:
1. The prospective advantages of the move in improving the custodial parent's and child's quality of life,
2. The integrity of the custodial parent's motive for relocation, considering whether it is to defeat or deter visitation by the noncustodial parent,
3. The integrity of the noncustodial parent's motives for opposing the move,
4. The potential negative impact on the relationship between the noncustodial parent and the child, including whether there is a realistic opportunity for visitation which can provide an adequate basis for preserving and fostering the noncustodial parent's relationship with the child if relocation is allowed, and the likelihood that each parent will comply with such alternate visitation.
Hentz, 2001 ND 69, ¶ 7, 624 N.W.2d 694. "When the relevant factors weigh in favor of the custodial parent's request to relocate the children, the trial court's denial of the motion constitutes reversible error." Tibor, 1999 ND 150, ¶ 27, 598 N.W.2d 480.
*56 See also Paulson v. Bauske, 1998 ND 17, ¶¶ 8, 9, 14, 574 N.W.2d 801 (where trial court found factors 2, 3, and 4 presented no obstacle to a change of residence, and its finding under factor 1 that the child's quality of life would not be improved was clearly erroneous, the court's denial of the requested move because it would not be in the child's best interest was clearly erroneous).
[¶ 7] In addressing the four factors for consideration of a change in a child's state of residence, the trial court found:
The Plaintiff, arguably complies with factor number 2 concerning the integrity of the custodial parent's motive for relocation considering whether it is to defeat or deter visitation by the non-custodial parent. Plaintiff complies with the other three factors.
Thus, the trial court found, as Doni's counsel conceded at oral argument, that Jenny had satisfied the relevant factors to be considered in determining a relocation request, which, therefore, weighed in favor of Jenny's request to relocate the children.
[¶ 8] Despite the fact that the relevant factors to be considered in determining Jenny's relocation request weighed in favor of the request, the trial court found the parties' decree-incorporated stipulation which automatically transferred physical custody of the children from Jenny to Doni if Jenny is transferred out of North Dakota, "is the law of the case," and found "[i]t is in the best interest of the children to be in the physical custody of their father if Plaintiff relocates to Fort Leonard Wood, Missouri."
[¶ 9] Jenny relies on a number of decisions from other jurisdictions for the proposition that a trial court is not bound by a stipulation for a future change of custody upon the occurrence of a specified event. See Hovater v. Hovater, 577 So.2d 461 (Ala.Civ.App.1990); In re Marriage of Thielges, 623 N.W.2d 232 (Iowa Ct.App.2000); In re Marriage of Witzenburg, 489 N.W.2d 34 (Iowa Ct.App.1992); In re Marriage of Hunt, 476 N.W.2d 99 (Iowa Ct.App.1991); Williams v. Pitney, 409 Mass. 449, 567 N.E.2d 894 (1991); Masters v. Craddock, 4 Mass.App.Ct. 426, 351 N.E.2d 217 (1976); Phillips v. Jordan, 241 Mich.App. 17, 614 N.W.2d 183 (2000); Napora v. Napora, 159 Mich.App. 241, 406 N.W.2d 197 (1986); Bell v. Bell, 572 So.2d 841 (Miss.1990); Hill v. Robbins, 859 S.W.2d 355 (Tenn.Ct.App.1993); deBeaumont v. Goodrich, 162 Vt. 91, 644 A.2d 843 (1994); Wilson v. Wilson, 12 Va.App. 1251, 408 S.E.2d 576 (1991); Watt v. Watt, 971 P.2d 608 (Wyo.1999).
[¶ 10] In Bastian v. Bastian, 160 N.E.2d 133, 134 (Ohio Ct.App.1959), the parties' 1952 divorce judgment incorporated their separation agreement, which gave the father custody of their child, but provided that the mother would get custody if she "obtains adequate and proper living quarters and is able to properly care for" the child. After remarrying, the mother moved for custody in 1958. The trial court "believed that it was bound by the agreement of the parties, and hence could not exercise any discretion in the matter of future custody." Id. at 136. The appellate court disagreed, observing: "The pole star in all custody matters between parents is, what is for the best interests of the child whose custody it is sought to change." Id. The court continued: "nothing that the parents do, in the matter of agreement for custody, can usurp the duty of the court to determine, as between the parents, that which is for the best interest of the children." Id. The court recognized, however, that the trial court's duty "is most frequently discharged by accepting as its order that to which the parties have agreed." Id.
*57 [¶ 11] In Hovater v. Hovater, 577 So.2d 461 (Ala.Civ.App.1990), the divorce decree incorporated the parties' agreement that if either party moved out of the Mt. Hope School District, the other party would get physical custody of the children. The appellate court held the provision was invalid, explaining: "We find ... the custodial reversionary clause in this instance to be of no effect because it is premised on a mere speculation of what the best interests of the children may be at a future date." Id. at 463.
[¶ 12] In Phillips v. Jordan, 241 Mich.App. 17, 614 N.W.2d 183, 185 (2000), the trial court entered a stipulated order providing "if plaintiff moved away from Owosso, defendant would be given physical custody of the child." Plaintiff remarried and petitioned for a change of domicile to California. Defendant petitioned for a change of custody and enforcement of the stipulated order. The trial court set aside the stipulated order. The appellate court affirmed, explaining:
However, contract principles do not govern child custody matters.... While trial courts try to encourage parents to work together to come to an agreement regarding custody matters, the circuit court retains jurisdiction over the child until the child reaches the age of majority. The trial court cannot blindly accept the stipulation of the parents, but must independently determine what is in the best interests of the child.
Id. at 186.
[¶ 13] In deBeaumont v. Goodrich, 162 Vt. 91, 644 A.2d 843, 845-46 (1994), the court said the parties' stipulation that a move of more than 50 miles "`shall constitute a change in circumstances so the court may reconsider existing parental responsibilities and visitation' ... provided the family court with a reasonable basis to find changed circumstances." However, the court held it "would not give effect to an `automatic change' provision `because it is premised on a mere speculation of what the best interests of the children may be at a future date.'" Id. at 846 (quoting Hovater, 577 So.2d at 463).
[¶ 14] In Martin v. Martin, 798 P.2d 321 (Wyo.1990), the trial court provided in a divorce decree for an automatic custody modification if either party moved from Laramie, Wyoming. The supreme court held the trial court abused its discretion, explaining that speculation about the effects of a possible future move "is not a substitute for complete analysis of all existing circumstances when and if a change in the established child custody arrangement becomes necessary." Id. at 323. "It is the trial court's duty to see that the children are protected at every turn." Jasper v. Jasper, 351 N.W.2d 114, 117 (S.D.1984). "Although stipulations are favored by the judicial system and are generally upheld, a parent may not bargain away a child's right by agreement with a former spouse." Napora v. Napora, 159 Mich.App. 241, 406 N.W.2d 197, 199 (1986) (citation omitted).
[¶ 15] The foregoing decisions are consonant with existing North Dakota law. Section 14-05-22(1), N.D.C.C., provides, in part: "In an action for divorce, the court... may give such direction for the custody... of the children of the marriage as may seem necessary or proper, and may vacate or modify the same at any time." Section 14-09-06.1, N.D.C.C., provides: "An order for custody of an unmarried child ... must award the custody of the child to a person ... as will, in the opinion of the judge, promote the best interests and welfare of the child." (Emphasis added.) The trial court has continuing jurisdiction over child custody, Voskuil v. Voskuil, 256 N.W.2d 526, 529 (N.D.1977), and a custody award "is always subject to *58 modification as the best interests of the children may require," Bryant v. Bryant, 102 N.W.2d 800, 803 (N.D.1960).
[¶ 16] In Malaterre v. Malaterre, 293 N.W.2d 139, 141 (N.D.1980), Doris and Frederick Malaterre stipulated Doris would have custody of their child. The 1976 divorce judgment adopted the parties' stipulation. Id. at 141. In 1979, Frederick moved the district court to modify the 1976 judgment and award him custody. Id. Doris opposed the motion, asserting, in part, that the stipulation was "a full and complete compromise and settlement of all the parties' property rights and of all claims and demands of every kind, nature, and description." Id. The district court held, in part: "Now, I expressly reject the concept that parties, by agreement, may oust a district court of this state of jurisdiction; it has continuing jurisdiction over child custody." Id. This Court agreed with the district court:
The general rule in North Dakota is that a court having jurisdiction to hear a divorce action continues to have jurisdiction regarding the custody, care, and education of the children of the marriage as may be deemed necessary or proper and to vacate or modify any decree as is deemed appropriate in the best interests of the children. This is true regardless of any contract of the parties to the contrary. Therefore, we agree with the district court that it was not ousted of its jurisdiction by the "stipulation property settlement agreement" entered into by Doris and Frederick.
Id. at 142 (citation omitted). See also Tiokasin v. Haas, 370 N.W.2d 559, 562 (N.D.1985) ("This court has often stated that a trial court is not bound to accept stipulations which purport to determine questions regarding the custody and care of the children of a marriage if it finds that it is not in the best interests of the children to do so."); Mathisen v. Mathisen, 276 N.W.2d 123, 129 (N.D.1979) ("In custody matters, the district court is not bound by private arrangements to which the parties have agreed."); Voskuil v. Voskuil, 256 N.W.2d 526, 529 (N.D.1977) (a trial court "is not bound to accept stipulations and side agreements which purport to determine custody questions if it finds that it is not in the best interests of the children that it do so"); Foster v. Nelson, 206 N.W.2d 649, 650 (N.D.1973) ("The court retains control of the decree of divorce insofar as the rights of the children are concerned, regardless of any contract of the parties to the contrary.").
[¶ 17] "[A] stipulation by the parents prohibiting or limiting the power of the court to modify future child support is against public policy and invalid." Zarrett v. Zarrett, 1998 ND 49, ¶ 10, 574 N.W.2d 855. If divorcing parents may not validly limit the trial court's power to modify child support by agreement, it follows a fortiori that divorcing parents may not validly limit the trial court's power to modify custody provisions by agreement. There is no reason to apply a less stringent rule in custody matters than in support matters.
[¶ 18] In accordance with the foregoing decisions, we conclude a stipulated divorce provision for an automatic change in custody upon the occurrence of a future event is unenforceable and the district court retains control over the rights of children, regardless of any contrary agreements of the divorcing parties.
[¶ 19] The trial court erred in holding the parties' stipulation to automatically transfer physical custody of the children from Jenny to Doni if Jenny is transferred out of North Dakota, "is the law of the case." The trial court was not bound by that stipulation. We conclude the trial *59 court's finding "[i]t is in the best interest of the children to be in the physical custody of their father if Plaintiff relocates to Fort Leonard Wood, Missouri," was induced by an erroneous view of the law that the parties' stipulation for a change in physical custody was "the law of the case," which the court was bound to enforce. The trial court found that Jenny had satisfied the relevant factors to be considered in determining a relocation request. Thus, the court's denial of Jenny's request to relocate the children constitutes reversible error. Hentz v. Hentz, 2001 ND 69, ¶ 7, 624 N.W.2d 694; Tibor v. Tibor, 1999 ND 150, ¶ 27, 598 N.W.2d 480; Stout v. Stout, 1997 ND 61, ¶ 52, 560 N.W.2d 903.
[¶ 20] The order is reversed, and the matter is remanded for entry of an order granting Jenny's motion to relocate the children and appropriately modifying the visitation provisions[1] in the judgment to provide a basis for fostering the noncustodial parent's relationship with the children.
[¶ 21] VANDE WALLE, C.J., and NEUMANN and KAPSNER, JJ., concur.
SANDSTROM, Justice, dissenting.
[¶ 22] Although I agree that a district court is not bound by a stipulation requiring an automatic change of custody upon the occurrence of a specific event, I dissent because of the majority's disposition of this case.

I
[¶ 23] The case should be remanded to the district court for a hearing on the motion to relocate without the validity of the stipulation clouding the proceeding.
[¶ 24] This case differs from several of those cited by the majority, because Doni Zeller did not file a motion for change of custody in response to Jenny Zeller's motion to relocate. See, e.g., Hovater v. Hovater, 577 So.2d 461 (Ala.Civ.App.1990); In re Marriage of Thielges, 623 N.W.2d 232 (Iowa Ct.App.2000); Williams v. Pitney, 409 Mass. 449, 567 N.E.2d 894 (1991); Phillips v. Jordan, 241 Mich.App. 17, 614 N.W.2d 183 (2000); Wilson v. Wilson, 12 Va.App. 1251, 408 S.E.2d 576 (1991); Watt v. Watt, 971 P.2d 608 (Wyo.1999). Rather, he relied solely on the couple's previous stipulation.
[¶ 25] Doni Zeller's reliance upon the parties' stipulation was not misplaced, because of the absence of North Dakota case law or statutes regarding stipulations for automatic changes of custody. While a majority of jurisdictions treat stipulations regarding the automatic change of custody as void, this view is not unanimous. See, e.g., Carr v. Carr, 207 Ga.App. 611, 429 S.E.2d 95 (1993); Maeda v. Maeda, 8 Haw.App. 139, 794 P.2d 268 (1990).
[¶ 26] A review of the district court's proceedings shows the court was focusing on the validity of the stipulation rather than the statutory test for relocation. I would remand for a hearing on the motion to relocate without the confusion of the validity of the stipulation.

II
[¶ 27] Although I disagree with the majority's disposition of this case, I do not read its opinion as precluding Doni Zeller from immediately seeking a change of custody. The Court's remand instructions are not a disposal of a motion for modification on its merits under N.D.C.C. § 14-09-06.69(2) *60 ("if a motion for modification has been disposed of upon its merits, no subsequent motion may be filed within two years of disposition of the prior motion"). Doni Zeller may file a motion for change of custody immediately upon remand.
[¶ 28] If Doni Zeller should choose to seek a change of custody, he would be free to argue the couple's stipulation is evidence of a material change in circumstances. See, e.g., Studenroth v. Phillips, 230 A.D.2d 247, 657 N.Y.S.2d 257 (N.Y.App.Div.1997) (parties may stipulate what will constitute a change in circumstances); deBeaumont v. Goodrich, 162 Vt. 91, 644 A.2d 843 (1994) (parties may stipulate a move by either parent outside a specific geographic area would constitute a change in circumstances). He would also be free to argue the stipulation is evidence the couple agreed the best interests of the children would be served by allowing them to continue to live in North Dakota once Jenny Zeller accepted a transfer out of North Dakota. 1 Alexander Lindey & Louis I. Parley, Lindey & Parley on Separation Agreements and Antenuptial Contracts § 20.76[3][c] (2d.2001).
[¶ 29] Dale V. Sandstrom
NOTES
[1]  Doni did not bring a motion for a change of custody in response to Jenny's motion to relocate the residence of the children. At oral argument, counsel for Doni asserted a remand for modification of the visitation provisions might be necessary if we agreed with Jenny's position.
