
674 So.2d 770 (1996)
Michael Phillip JONES, Appellant,
v.
Audrey Meredith JONES, Appellee.
No. 95-82.
District Court of Appeal of Florida, Fifth District.
April 19, 1996.
Rehearing Denied June 5, 1996.
*771 Ann T. Frank of Ann T. Frank, P.A., Naples, for Appellant.
Bruce A. Saylor of Sellar, Sewell, Russ & Saylor, P.A., Leesburg, for Appellee.
GOSHORN, Judge.
Michael Jones (the "father") appeals the order denying his motion to modify the primary physical residence of two of his five children. He argues, inter alia, that because of the unusual procedural posture of this case, he need not meet the extraordinary burden of proving a substantial change of circumstances. We agree and reverse.[1]
The parties were married in 1976 and had five children. Until 1993, the family lived in Naples, Florida. In May of that year, the marital home was sold. The father testified that he believed that the plan was for the family to move to property they owned in North Carolina. However, when it came time to move, the mother had half of the furniture sent to Ocala on the premise that she wanted time alone to think and would be staying with her parents.
The father and children moved to North Carolina. The mother went up in July and brought the two youngest children back to Ocala with her, where she had rented a home and had set up housekeeping. She filed a petition for dissolution that same month.
On August 30, 1993, the parties entered into an informal agreement that Tim, the oldest child, be allowed to establish his primary residence with the father in North Carolina. Thereafter, the parties executed a "Joint Stipulation and Agreement on Primary Physical Residence of Minor Children" wherein the parties agreed that the father would have primary physical custody of the son. The mother was given primary physical custody of the two youngest children, Shelby and Chelsea. The middle children, Courtney and Erin, were to stay with the mother until the end of the fall school semester, then move to North Carolina immediately and continue the school year in North Carolina. At the end of the academic year, Courtney and Erin were to be evaluated by Dr. Poetter and Dr. Klass for a determination as to which environment or residential placement *772 would provide for the best interests of these two children. The agreement also covered visitation, with the parties agreeing to transport the children every other week for visitation with the non-custodial parent and siblings. The parties alternated the eleven hour drive. This schedule required the traveling children to miss substantial school time and interfered with their extracurricular activities.
By order rendered November 16, 1993, the trial court ratified the agreement and ordered each party to comply with its terms. No hearing was held prior to the court's approval of the agreement; however, the court reserved jurisdiction to enter any further orders it deemed necessary.
Rather quickly, the parties encountered problems with the arrangement. On January 13, 1994, the mother filed a motion to set aside the agreement. She asserted that the father had breached the letter and spirit of the agreement and outlined the ways in which he had done so. The father responded by filing a contempt motion alleging that the mother had not allowed visitation as agreed. The mother was eventually found in contempt.
In April, the father filed a motion for modification of primary physical residence alleging a substantial change of circumstances. The father, noting that the two youngest children had become withdrawn and upset about their separation from their siblings, asserted that the mother had (1) interfered with phone contact; (2) attempted to destroy the children's affection for the father; (3) refused to discuss matters relative to the children; (4) refused to give the youngest children the letters the father had written; and (5) endangered the children's welfare by smoking in their presence and by transporting the children in an uninsured car.
Thereafter, apparently, custody and visitation were generally conducted per the agreement. Over the summer, Doctors Poetter and Klass evaluated Courtney and Erin and recommended that all five children live with the father during the school year and live with the mother for the majority of the summer and holidays. Both parents were found to be fit. This report was filed August 15, 1994. On September 1st, the court entered an order, later rescinded, setting a trial date of November 9th and 10th on the father's supplemental petition for modification.
On September 27th, the trial court rendered its final judgment dissolving the marriage. Although noting the psychologists' recommendation that the two youngest children be placed with the father and other siblings, the court left custody of the two youngest children with the mother. In paragraph 10 of the final judgment, the court dismissed the father's supplemental petition to modify custody without considering the children's best interests. It did permit the father to "file a supplemental petition to modify this final judgment and the agreement by following the appropriate procedures set forth in the Florida Rules of Civil Procedure."
On October 7th, as suggested in the final judgment, the father refiled his supplemental petition for modification of primary physical residence. At the hearing on the father's modification motion, numerous psychologists testified. They were unanimous that the children should not be separated. Two psychologists testified that the father had tested well within normal limits on the MMPI, but that the mother had elevated scores on three parts of the test, indicating emotional disturbance. The psychologists further noted that the father is the more stable of the two and is viewed overwhelmingly as such by the children. The court also heard testimony that the mother had interfered with the father's attempts to phone the children while they stayed with the mother. It is important to note that even the mother admitted that the current custody arrangement was not working.
At the conclusion of the hearing, the court stated to the father:
If you were coming to Court for the first time and this was a custody case, you would far and away have proven your case.
That's not the question here today.
The question is whether or not you can establish a substantial and material and permanent change in circumstances since *773 their agreement, and I want to know what circumstances have changed. We've got a problem with visitation, and we've got the psychologists saying that they agree that the children ought to be together, which was also their opinion before the agreement, but apparently nobody chose to consult them.
That's the only things [sic] I see that you have proven.
[COUNSEL]: Your Honor, I don't think that was Dr. Peotter's opinion before, because he was instrumental in reaching the agreement.
THE COURT: He mediated an agreement. He didn'the didn't tell us that he believed that the children ought to be separated, it's preferable to keep them together. Everybody agrees with that, even the parents in this case, and certainly I do, and all of the professionals do, and even the law prefers that. That's not a question here, either.
The parents entered into an agreement. What they want me to do is to set aside their agreement and say that it needs to be changed. In order to do that, they've got to show me that something's changed since they signed that agreement that's material and permanent, and you know that's your burden.
* * * * * *
These parties entered into an agreement. They didn't come to Court and fight a custody battle and have a Judge decide something based on all of these factors. They entered into their own agreement. At the time, it was an imperfect agreement, but given the characteristics of this divorce case, everyone felt like it was commendable, but the parents had removed the children from this conflict and had laid the ground work for the future resolution of the custody of the two children, and got that over with so they could go about fighting about the other things they wanted to fight about.
So even though the agreement was imperfect, we knew that there was six hundred miles that separated them, and the parents knew that. They knew that the children were a close group, and it was preferable, really, to everyone to keep all of the children together, but it was a compromise.
So, you can't say well, the agreement's just a bad agreement and, therefore, we need to set it aside, either.
The court also stated, "If this were a case where I was trying to determine what is in the best interest of the children, it would be over, because I would just grant custody to the father and we would go on our way, but that's not the situation." The court ruled that the father had not carried his burden of showing a substantial change in circumstances.
Thus, it is clear that the trial court believed that it was bound by the parties' November, 1993 "Joint Stipulation and Agreement on Primary Physical Residence of Minor Children" and held, in essence, that regardless of the best interests of the children, it and the parties were likewise bound by the agreement. This belief was incorrect. See McAlister v. Shaver, 633 So.2d 494, 496 (Fla. 5th DCA 1984) (holding that a trial court is not bound by any agreement between parents, but rather should decline to follow a settlement agreement found not to be in a child's best interests). The court's misperception resulted in the children being subjected to an admittedly unworkable custody and visitation schedule.
The November, 1993, order approving the custody agreement was, at best, merely a temporary order, as evidenced by the court's retention of jurisdiction. Because the father had, prior to the final hearing, moved the court to set aside the parties' custody stipulation and the temporary order, the court had the obligation at the final hearing to determine the best interests of the children. Although the court initially approved the agreement, it should have allowed the father to proceed to hearing pre-judgment on his motion to modify the agreement to insure that the children's best interests were being met. The court's refusal to do so placed the father in the posture of being a post-judgment movant for modification with the concomitant burden of having to show a substantial change of circumstances in order to prevail. Consequently, the father was *774 prejudiced by having a greater burden than he should otherwise have had. Where a party to an agreement moves to set aside the agreement prior to rendition of the final judgment based on factors showing that the best interests of the children are not met by the agreed-upon arrangement, the court must hold an evidentiary hearing to settle the issue. The best interests of the children are to govern the custody decision, regardless of any stipulation between the parties. See Kennedy v. Kennedy, 583 So.2d 415 (Fla. 5th DCA 1991); Holland v. Holland, 458 So.2d 81 (Fla. 5th DCA 1984); Elebash v. Elebash, 450 So.2d 1268 (Fla. 5th DCA 1984).
We note the mother's argument that the father should have appealed from the temporary order approving the agreement or at least from the final judgment wherein the court dismissed the father's modification motion. The mother contends that the father cannot be permitted to wait for the ruling on his post-judgment modification motion and then appeal as to issues raised in the initial dissolution proceeding. However, the final judgment left the child custody issue open to subsequent litigation by directing the father to file a post-judgment modification motion. Under the unique circumstances of this case, the father's failure to appeal earlier does not preclude consideration of the best interests of the children where the record establishes that the trial court had never previously heard evidence on the issue and that issue was placed before the court prior to the final judgment of dissolution. Where even the court admits that but for the agreement, it would have kept all five children together and given them to the father, it would be wrong to preclude that action based on the trial court's misperception of its authority to act contrary to its interlocutory approval of the agreement.
REVERSED and REMANDED with INSTRUCTIONS to determine the best interests of the children.
HARRIS and ANTOON, JJ., concur.
NOTES
[1]  Because of our determination on this point, we need not address the remaining issues raised by the father.
