The opinion of the court was delivered by
Miller, J.:This is an appeal from an order of the Graham District Court changing custody of a four-year-old boy from mother to father. The case comes before us following the granting of a petition for review of the decision of the Court of Appeals. See Hill v. Hill, 5 Kan. App. 2d 1, 611 P.2d 158 (1980).
The parties, Grover and Linda Hill, were married in 1974. They have one child, Brian, born September 18, 1975; the trial court’s order changing his custody is the target in this appeal.
On October 30, 1978, Linda moved out of the home she and Grover had shared in Morland, Kansas. She took Brian with her, and ostensibly went to live with an aunt in Farmington, New Mexico. Grover filed a petition for divorce in November, 1978; in it, he alleged that Linda was a proper person to have the custody of Brian. Linda waived service of summons and entered her voluntary appearance in the case. The parties entered into a property settlement agreement, by which they provided for custody of the child to be in Linda, subject to reasonable visitation, and they agreed upon support payments. A default divorce decree was entered on March 5, 1979; it incorporated and approved the *681agreement of the parties. Grover filed a motion to change custody on July 5,1979, four months after the divorce was granted; Linda responded with a motion to change or modify visitation rights. An evidentiary hearing was held on August 9, 1979, and both motions were heard by the trial court.
These facts were developed at that hearing. Grover had remained in Morland; he was living in the home which the parties acquired during the marriage; and he was still working for the same employer for whom he had worked in the oil fields near Morland for several years. Linda, however, was not living with her aunt in Farmington. About two weeks after she arrived in New Mexico, she moved in with Larry Holden in Aztec, New Mexico, and she has been living with him ever since. They live in a two-bedroom trailer house; Brian lives with them. Larry’s 52-year-old brother, Tommy, also lives there, although he is away quite often for four or five days at a time. He and Brian share a bedroom.
About two months after the divorce was granted, Linda brought Brian to Kansas to stay with Grover while she accompanied Larry to California, where he was going at his employer’s request. Upon their return from California, Linda came to Kansas to get her son, but he was visiting relatives in Garden City. She returned to New Mexico without him, and shortly thereafter she was advised that Grover was going to file a motion to change custody. The evidence indicates that most of the parties’ relatives live in Kansas; that both parties love Brian; that both desire his custody; and that both give him good physical care.
The trial judge, in announcing his decision, said:
“On the one hand we have a father who owns a house and evidently a fairly stable job who has provided a stable environment for the child who wants the child. We have a mother who certainly has a mother’s love for the child and wants the child. It would be a lot easier if I heard testimony that one of them did not want the child or did not have a proper place to care for it. I can only . . . determine what I think is the best . . . for it at this time.
“I certainly do not approve of the mother living with — a single woman living with two single men in a two bedroom trailer house. I suppose that there is absolutely not any way for me to not be somewhat prejudiced by that type of morality. ... I don’t condone people living together that are single, and I assume in most states it’s against the law. . . .
“I’ve heard absolutely no testimony from anybody indicating that either parent does not take care of this child properly, that it’s clean, it’s well fed, it gets its bath. *682The only thing I can do at this point, and 1 want you to all know that I have continuing jurisdiction over these matters and if a change of circumstances arises again, I’ll hear it again, I assume, if you can’t agree upon something. But my only feeling at this time is that the child would be in a better and more stable environment with the father. I will change the custody to the father at this time subject to the reasonable visitation by the mother. . . .
“Again, there is absolutely no way that I can . . . make both of these parents happy. And when you leave it up to me, the only thing I can do is what I think is right for the welfare and the benefit of this child. And after hearing the testimony, it’s my feeling that the child would be better off with its father at this time.”
The court’s order was set forth in a journal entry filed August 24, 1979. That order included the following finding:
“3. That each party resides at the respective residence occupied by each party at the time of the divorce, on March 5, 1979.”
The journal entry then proceeded to include the court’s order changing custody. Linda appealed.
The Court of Appeals reversed, holding that the trial court’s order of March 5, 1979, was res judicata as to all matters which had been or which could have been litigated on that date. The Court of Appeals said:
“As may be seen, there is no finding of a change of circumstances since the original custody order — in fact, finding No. 3 is to the effect that there has been no change. A reading of the trial court’s oral remarks at the close of the hearing reinforces the conclusion that the order was based on a simple ‘best interests’ finding, and not on a ‘change of circumstances’ finding. The deciding factors seemed to be the mother’s living style, which the trial court couldn’t ‘condone,’ and the more commodious living quarters available in the father’s house. Neither of those elements had changed since about two months before the divorce.
“Kansas law in this area appears clear to us. ‘The trial court has continuing jurisdiction over custody of minor children in a divorce action and may, on proper motion and notice, change or modify any prior order of custody when a material change in circumstances is shown.’Hardenburger v. Hardenburger, 216 Kan. 322, Syl. ¶ 1, 532 P.2d 1106 (1975) (Emphasis added). In applying that rule, it is well settled that a decree awarding child custody is res judicata with respect to the facts existing at the time of the decree. Simmons v. Simmons, 223 Kan. 639, 642, 576 P.2d 589 (1978); Lewis v. Lewis, 217 Kan. 366, 368, 537 P.2d 204 (1975). It is immaterial that the original custody order is based on the parties’ settlement agreement and not on evidence presented at a contested hearing. In Hardman v. Hardman, 203 Kan. 825, 827, 457 P.2d 86 (1969), the court stated:
“ ‘The general rule is that the court’s judgment is conclusive and final as to matters and facts which were actually litigated and determined. Not only is everything adjudicated between the parties which the parties chose to litigate, but everything incidental thereto, and which properly could have been litigated with due diligence. ’ (Emphasis added.)
*683“Hardman also was an uncontested divorce in which no evidence on the fitness of either party was introduced. Yet on a subsequent motion to change custody the court held that the issue of custody had been adjudicated and was res judicata as to events occurring prior to the uncontested divorce, that a finding of parental fitness was inherent in the trial court’s original custody order, and that evidence of predivorce occurrences was inadmissible. 203 Kan. at 827-8. The court summarized:
“ ‘This is a change of custody case. Inquiry is always permitted on the issue of custody when the circumstances have changed. However, the facts and circumstances embraced in the issue on which the prior order of custody rested are res judicata. (See Wear v. Wear, 130 Kan. 205, 285 Pac. 606.)
“ ‘The doctrine of res judicata applies to an order awarding custody of a minor in that a court cannot reexamine the facts formerly adjudicated and make a different order thereon. There must be a substantial change of circumstances, presenting a new case, before the court may make a substantial change in the custody order.’ ” 5 Kan. App. 2d at 2-3.
Grover Hill testified that he was not aware that Linda was living with Larry Holden until “around the time of the divorce.” He said that he had suspicions earlier, but he denied knowledge up until that time. The trial court was not advised of the living arrangements of either party, nor was it called upon to weigh evidence and determine which parent would provide the best environment for the child and with which parent the child would receive the best care, when the default divorce was granted.
This brings us to the principal questions in this appeal: Does the doctrine of res judicata apply as strictly and with as much force in child custody proceedings as it does in other civil actions? Where a default decree is entered, and the parties are not both before the court, and where relevant and probative facts then existing are unknown to the court, may the court at a later time take those facts into consideration in determining custody? In short, and under the circumstances outlined above, does the doctrine of res judicata give way to the best interest of the child?
We have not previously considered this conflict, but find that a number of the courts of our sister states have determined the issue. In Washington, statutory law permits modification of child custody orders by a court “upon the basis of facts that have arisen since the prior decree or that were unknown to the court at the time of the prior decree . . . .” Wash. Rev. Code § 26.09.260. The Washington Court of Appeals in McDaniel v. McDaniel, 14 Wash. App. 194, 539 P.2d 699 (1975), quoted from an earlier Washington Supreme Court case, In re Rankin, 76 *684Wash. 2d 533, 536, 458 P.2d 176 (1969), where that court explained the rationale for the “unknown facts” rule as follows:
“Where a custody decree is entered upon default, the court has had no opportunity to observe the two contending parents upon the witness stand or to examine the evidence concerning their fitness and concerning the welfare of the child. It must accept the allegations of the petitioner or, at best, the uncross-examined testimony of the petitioner. Therefore, in such a case, the rule that a change of circumstances must be shown before a change of custody can be ordered does not have its usual efficacy.” 14 Wash. App. at 197.
In an earlier case, Wendland v. Wendland, 29 Wis. 2d 145, 138 N.W.2d 185 (1965), the Supreme Court of Wisconsin said:
“We have suggested that ‘the doctrine of res judicata is not to be applied to custody matters with the same strictness as to others.’ We also have said that ‘[i]t is logical that the interest of the child and of the public in the child’s welfare should not be concluded by the failure of the parents to bring relevant and important facts to the attention of the court.’ In Miller v. Miller [15 Wis. 2d 583, 587, 113 N.W.2d 403 (1962)], we further said:
“ ‘When the question concerns the custody of the children of divorced parents, the trial judge must not be foreclosed from inquiring into matters antedating the preceding judgment. The doctrine of res judicata is not a complete barrier in custody matters if circumstances exist which prompt the trial judge, in his discretion to go behind the previous determination.’
“If there are facts (bearing substantially on the question of custody) existing but not disclosed to the court at the time of its original order, the court, in its discretion, should be free to receive evidence on those facts and to consider the evidence in its review of the custody order. Naturally, at the upcoming hearing the trial court will be primarily concerned with the way in which the present custody order has worked out and with the then existing fitness of the parties to have custody and what custody order is then in the best interests of the children. But in resolving the custody question, the trial court should be free to consider evidence bearing on this question that may reach back before the time of its prior order.” 29 Wis. 2d at 157-158.
The Supreme Court of Idaho reached a similar result in Stewart v. Stewart, 86 Idaho 108, 383 P.2d 617 (1963). It said:
“Judgments affecting the custody, support and education of children, like other judgments, are conclusive upon the parties and privies, and the doctrine of res judicata is applicable thereto. 27B C.J.S. Divorce § 317 (8) b; 17A Am. Jur., Divorce & Separation, § 838; Annotation 9 A.L.R.2d § 623, et seq.
“However, the foregoing general rule is not to be applied strictly in all determinations affecting the welfare of children of divorced parents. The jurisdiction of the court continues after divorce for the protection of the welfare of such children. I.C. § 32-705. Where facts, affecting their welfare, existing at the time of the divorce or order awarding custody, are not called to the attention of the court, and particularly in default cases where the issues affecting custody have not been fully tried, the court upon a proper application may consider all facts and *685circumstances, including those existing prior to and at the time of the judgment or decree, in making a subsequent determination of custody.” 86 Idaho at 113-114.
Our statute, K.S.A. 1979 Supp. 60-1610(b) provides: “In all cases involving the custody of any minor children, the court shall consider the best interests of such children to be paramount.” Further, we note that where the parties have entered into a separation agreement and that agreement has been approved by the trial court and made a part of the decree, the agreement may be modified in the future only as to the custody, support or education of the minor children. K.S.A. 1979 Supp. 60-1610(e).
Child custody is indeed one of the most difficult areas faced by a trial court, let alone an appellate court. A court cannot be as precise in this area as it can when dealing with tort or contract. A judgment in a tort or contract case or in most any civil case becomes final; it is over, done, completed, finished. Not so when it comes to child custody, support, and education; orders in those areas may be reopened, changed, or modified as the children grow and their needs change, the economy changes, the parents move, remarry, change jobs, change their way of life, succeed, and fail.
The rule requiring a material change in circumstances is judicially imposed. Its purpose is to prevent the relitigation of issues already presented to and determined by a trial court. The purpose of the rule is meritorious; nevertheless, it should not prevent a trial court from hearing evidence which it has not previously heard and considered, and which bears upon the principal issue: the best interests of the child. When the judicial rule prevents a trial court from considering relevant evidence which it has not heard, and from basing its decision at least in part upon that evidence, the rule conflicts with the best interest guideline established by legislative and decisional law.
We hold that, where a custody decree is entered in a default proceeding, and the facts are not substantially developed and presented to the court, the trial court may later, in its discretion, admit and consider evidence as to facts existing at the time of the earlier order, and upon the full presentation of the facts the court may enter any order which could have been made at the initial hearing whether a “change in circumstances” has since occurred or not. Our statements to the contrary in Hardman v. Hardman, 203 Kan. 825, 457 P.2d 86 (1969) and in the other cases cited in the Court of Appeals decision, 5 Kan. App. 2d 1, are overruled.
In the case before us, the trial judge opted, over objection, to *686admit evidence of the facts as they existed at the time of the original decree. He was not previously aware of those facts. At the conclusion of the hearing he considered all of the evidence, including that disclosing the lifestyles of the parents, the suitability of their dwellings, and the stability of their homes. He found both parents fit, both willing and anxious for custody; and he found that the child’s best interests would be served by awarding custody to the father.
We find no error. The judgment of the Court of Appeals is reversed and the judgment of the trial court is affirmed.