
202 Ill. App.3d 865 (1990)
560 N.E.2d 1212
In re MARRIAGE OF JOEL L. SECHREST, Petitioner-Appellee, and VICKI L. SECHREST, Respondent-Appellant (Jeffrey Kennedy et al., Third-Party Respondents-Appellees).
No. 4-89-0654.
Illinois Appellate Court  Fourth District.
Opinion filed September 26, 1990.
Rehearing denied October 29, 1990.
*866 *867 *868 Denise L. Church, of Prairie State Legal Services, Inc., of Bloomington, and Bernard H. Shapiro, of Prairie State Legal Services, Inc., of Rockford, for appellant.
Curtis W. Myers, of Law Offices of Curtis W. Myers, of Pontiac, for appellees.
Order affirmed.
PRESIDING JUSTICE KNECHT delivered the opinion of the court:
Vicki Sechrest appeals from an order of the circuit court of Livingston County awarding permanent custody of her 4 1/2-year-old daughter, A.M.S., to her sister-in-law Doris Kennedy. Vicki and her husband Joel Sechrest were still married when he requested Doris take A.M.S. and care for her. Vicki never consented to this arrangement. Doris and her husband, Jeff, were permitted to intervene in Vicki and Joel's dissolution of marriage action to seek temporary custody of A.M.S. Three years later the circuit court awarded permanent custody of A.M.S. to Doris. The issues on appeal are whether Doris and Jeff had standing, under section 601 of the Illinois Marriage and Dissolution of Marriage Act (Act) (Ill. Rev. Stat. 1987, ch. 40, par. 601), to intervene in the dissolution proceedings to seek custody of A.M.S., whether Vicki waived the standing issue by failing to raise it prior to her post-trial motion, and whether the circuit court abused its discretion when it awarded permanent custody to Doris Kennedy.
Vicki and Joel Sechrest were married April 27, 1985. Their only child, A.M.S., was born on November 19, 1985. She is now 4 1/2 years old. Vicki and Joel separated in May of 1986. Joel left the marital residence on a Friday. The following day Vicki took A.M.S. to a baby-sitter, where she remained overnight, while Vicki visited her out-of-town boyfriend. Vicki returned for a few hours on Sunday afternoon but left Sunday evening, again leaving A.M.S. with the baby-sitter. Although Vicki intended to return for A.M.S. on Monday, her boyfriend had car trouble and she did not return until Wednesday. Vicki did notify the baby-sitter she could not return Monday evening.
Monday evening Joel learned of Vicki's absence and took A.M.S. from the baby-sitter to his girlfriend's house. On Wednesday he contacted his sister Doris and asked her to take A.M.S. He also requested she and her husband consider taking custody of the child. Believing Joel and Vicki were each incapable of adequately caring for A.M.S., Doris and Jeff filed a petition to adopt her.
Joel filed a petition for dissolution of marriage on August 12, *869 1986. His petition specifically requested the Kennedys be awarded temporary custody of A.M.S.
A temporary custody hearing was held on November 6 and 7, 1986. The Kennedys voluntarily dismissed their adoption petition and were allowed to intervene in the dissolution proceeding and seek custody of A.M.S. Vicki's attorney made no objection to their intervention. The Kennedys filed a petition for custody on December 2, 1986. The circuit court entered an order awarding them temporary custody on December 3, 1986, with provisions for visitation by Vicki. A judgment of dissolution of marriage was entered September 24, 1987.
The circuit court held permanent custody hearings on May 24, May 31, June 1, and June 5, 1989. The court entered an order awarding permanent custody to Doris on June 7, 1989. Judge Frobish declined to award Vicki permanent custody, stating:
"The instability in VICKIE's [sic] life, which resulted in temporary custody of [A.M.S.] being awarded to the KENNEDYS in November 1986, continues. Although VICKIE [sic] is not an unfit mother and has demonstrated love for her daughter, she continues to show poor judgment in her lifestyle and in her choice of relationships. She has not shown a strong family support system as has been shown by the KENNEDYS. Finances continue to be a problem.
The Court further FINDS that it is in the best interest of [A.M.S.] that custody be awarded to DORIS KENNEDY."
Vicki filed a post-trial motion on June 27, 1989, and a hearing was held on the motion on July 18, 1989. The motion included an assertion the Kennedys did not have standing to petition the circuit court for custody of A.M.S. because, when they removed the child from the baby-sitter, she was still in Vicki's custody and Vicki never relinquished control of her to the Kennedys. The court entered an order denying the relief sought in the post-trial motion on August 7, 1989, and Vicki filed her notice of appeal on August 21, 1989.
 1 Section 601(b)(2) of the Act states, in part:
"A child custody proceeding is commenced in the court:
*   *   *
(2) by a person other than a parent, by filing a petition for custody of the child in the county in which he is permanently resident or found, but only if he is not in the physical custody of one of his parents." (Ill. Rev. Stat. 1987, ch. 40, par. 601(b)(2).)
On appeal Vicki contends the Kennedys lacked standing to petition for custody of A.M.S. The Kennedys bear the burden of proving *870 standing. In re Custody of Butler (1989), 192 Ill. App.3d 135, 137, 548 N.E.2d 582, 584.
 2 A nonparent seeking custody of a child pursuant to section 601 must have standing.
"In 1986, the Illinois Supreme Court held that nonparents proceeding under section 601(b)(2) of the Act (Ill. Rev. Stat. 1985, ch. 40, par. 601(b)(2)) must first satisfy a standing requirement before the court may consider them for the legal custody of a child. (In re Custody of Peterson (1986), 112 Ill.2d 48, 52, 491 N.E.2d 1150, 1152.) The meaning of the term `standing' as used in Peterson is distinct from the definition familiar to most students of the law. Generally, standing connotes whether a litigant has a justiciable interest in a controversy, and the standing of the litigants before the court is one of the components of the court's subject matter jurisdiction. The term `standing' as used in Peterson involves a threshold issue of whether a parent has custody of a child for purposes of satisfying the requirements of section 601(b)(2) of the Act." In re Custody of McCuan, 176 Ill. App.3d 421, 425, 531 N.E.2d 102, 105.
 3 The nonparent must show the child is not in the physical custody of one of her parents. (Ill. Rev. Stat. 1987, ch. 40, par. 601(b)(2); In re Custody of Peterson (1986), 112 Ill.2d 48, 53, 491 N.E.2d 1150, 1152; In re Marriage of Carey (1989), 188 Ill. App.3d 1040, 1047, 544 N.E.2d 1293, 1297; Butler, 192 Ill. App.3d at 136, 548 N.E.2d at 583; In re Marriage of Nicholas (1988), 170 Ill. App.3d 171, 175, 524 N.E.2d 728, 731.) Once the nonparent has made such a showing and established standing, the court determines custody using the "best interest of the child" standard. In re Custody of Menconi (1983), 117 Ill. App.3d 394, 396, 453 N.E.2d 835, 837; Carey, 188 Ill. App.3d at 1046, 544 N.E.2d at 1297; Peterson, 112 Ill.2d at 53, 491 N.E.2d at 1152.
 4 A nonparent who fails to establish standing under section 601 must seek custody under either the Juvenile Court Act of 1987 (Ill. Rev. Stat. 1987, ch. 37, par. 801-1 et seq.) or the Adoption Act (Ill. Rev. Stat. 1987, ch. 40, par. 1501 et seq.). Under these statutes, the nonparent must prove the natural parents unfit, a much higher standard of proof. Peterson, 112 Ill.2d at 52, 491 N.E.2d at 1152; In re Marriage of Gustafson (1989), 181 Ill. App.3d at 472, 475, 536 N.E.2d at 1359, 1360; In re Custody of O'Rourke (1987), 160 Ill. App.3d 584, 587, 514 N.E.2d 6, 7-8; Menconi, 117 Ill. App.3d at 396, 453 N.E.2d at 837-38.
*871  5 The key to the standing issue is whether A.M.S. was in the physical custody of one of her parents when Doris and Jeff intervened in the dissolution proceedings.
"A determination of when a child is `not in the physical custody of one of his parents' so as to create standing in a nonparent seeking custody under the Dissolution Act is not subject to any clear litmus test or dependent upon any single fact such as who is in actual physical possession of the child at the time the petition for custody modification is filed." Carey, 188 Ill. App.3d at 1047, 544 N.E.2d at 1297.
 6 Peterson makes clear the standing requirement does not turn on who is in physical possession of the child when the custody petition is filed. "To hold differently would be to encourage abductions of minors in order to satisfy the literal terms of the standing requirement and would, in reality, defeat the statutory intendment." (Peterson, 112 Ill.2d at 54, 491 N.E.2d at 1152-53.) The determination of whether a child is in a person's physical custody has included factors such as how the child came to be in the nonparent's physical possession and the duration of the possession. In re Marriage of Santa Cruz (1988), 172 Ill. App.3d 775, 783, 527 N.E.2d 131, 136.
The second district affirmed the circuit court's finding the nonparent had standing in In re Marriage of Carey (1989), 188 Ill. App.3d 1040, 544 N.E.2d 1293. The 12-year-old child in that case lived with his natural mother and father until he was six. His parents divorced, and his father obtained legal and physical custody and subsequently remarried. Six years later his father died. The child's stepmother petitioned for custody as did the natural mother. The circuit court determined the stepmother had standing to petition for custody and the appellate court affirmed. The court based its decision in part on the mother/son relationship established between the stepmother and child. Additionally, the court noted the natural mother had voluntarily relinquished custody of the child six years earlier.
The first district also affirmed a circuit court decision finding a nonparent had standing under section 601. (Menconi, 117 Ill. App.3d 394, 453 N.E.2d 835.) In that case the child's natural mother died shortly after the child's birth. The natural father asked his parents to care for the child, and she remained with them for seven years. The natural father forcibly removed the child from her grandparents' home and refused to return her. The grandparents petitioned for custody under section 601, and the circuit court awarded them permanent custody. The appellate court affirmed, agreeing the grandparents had standing. "We find the voluntary nature of the initial transfer of *872 the child, coupled with the lengthy period of care by the grandparents and the corresponding integration of the child into the home of her grandparents, sufficient to divest the father of physical custody of the child." Menconi, 117 Ill. App.3d at 398, 453 N.E.2d at 389.
This case is distinguishable from Carey and Menconi. In those cases the natural parent seeking custody had voluntarily relinquished custody to the third party years before. The children had been with the third parties for six or seven years prior to the custody disputes and had become integrated into the homes of the third parties. Here, Vicki never relinquished custody of A.M.S. When the Kennedys intervened in the dissolution proceedings in November of 1986, they had had A.M.S. for only six months.
Other cases have held nonparents lacked standing to seek custody under section 601. The Illinois Supreme Court reversed an appellate court decision which found the nonparent had standing in In re Custody of Peterson (1986), 112 Ill.2d 48, 491 N.E.2d 1150. There, the natural mother received legal and physical custody of the child in dissolution proceedings. She and the child moved in with her parents. The natural mother died two years later, and both the grandparents and natural father sought custody of the child. The court upheld a ruling by the circuit court finding the grandparents lacked standing although they had actual physical custody of the child. The natural mother never transferred or lost custody of the child. When the mother died, the court considered the child in the custody of her father. The court also stated the care given by the grandparents to the mother and child did not constitute physical custody of the child.
The second district denied standing to a nonparent in In re Marriage of Santa Cruz (1988), 171 Ill. App.3d 775, 527 N.E.2d 131. The natural mother and father divorced four months before the child's birth. After the child was born, the natural mother and child went to live with the child's maternal grandmother. One year later, the grandmother and her daughter had an argument and the daughter left home, leaving the child behind. The grandmother received temporary emergency custody of the child. The daughter returned a week later and sought to remove the child from the home. The grandmother refused and both subsequently filed petitions for custody. The appellate court affirmed the circuit court decision dismissing the grandmother's petition for lack of standing. There was no voluntary relinquishment of the child to the grandmother. Custody was with the natural mother and was never transferred to the grandmother.
In In re Custody of McCuan (1988), 176 Ill. App.3d 421, 531 N.E.2d 102, the fifth district found the grandparents lacked standing *873 to petition for custody of the child. The natural mother filed a petition for dissolution of marriage 11 months after her husband was convicted and sentenced to prison. The husband asked that the grandparents receive custody, and they filed a custody petition. They alleged the natural mother engaged in an adulterous relationship in the child's presence, abused alcohol and narcotics, had a dirty house, and failed to provide proper clothing and medical care for the child. The grandparents refused to return the child to her mother following a weekend visit. The circuit court found the grandparents had standing to seek custody because the child was with them when they filed their custody petition, but the appellate court reversed. The grandparents could not use their refusal to return the child after a weekend visit as a means of satisfying the standing requirement of section 601.
 7 Vicki did not voluntarily relinquish custody of A.M.S. when she left the child with the baby-sitter for five days.
"Overnight contact with third parties fails to fulfill the statutory provision that the child not be in the physical custody of one of her parents. * * * We do not accept petitioner's theory that physical custody may be relinquished by default if a parent performs the task of parenting in a less than adequate manner." In re Custody of Barokas (1982), 109 Ill. App.3d 536, 544, 440 N.E.2d 1036, 1042.
A.M.S. was still in Vicki's physical custody while she was gone. Vicki never voluntarily relinquished custody to anyone. The Kennedys lacked standing to seek custody of A.M.S. as she was in the physical custody of one of her parents at the time they intervened in the custody portion of the dissolution proceeding. The circuit court was therefore without authority to award temporary custody to Doris and Jeff and permanent custody to Doris.
The fact Joel and Vicki were married, when he took A.M.S. from the baby-sitter and asked Doris to care for and seek custody of her, distinguishes this case from others arising under section 601. However, we decline to find Joel's unilateral decision to relinquish custody to Doris and Jeff conferred standing on them. A decision otherwise might encourage a vindictive spouse to give custody of his child to a third party solely to prevent his spouse from obtaining custody. He could then file a dissolution petition requesting the third party receive custody of the child. Under such a decision, the third party would then have section 601 standing. Public policy considerations preclude such a result.
 8 The Kennedys argue Vicki has waived the issue of standing by failing to raise it at the temporary custody hearing in November *874 1986 and throughout the subsequent three-year permanent custody proceeding. We agree. Lack of standing, under section 601 of the Act, is an affirmative defense which is waived unless raised during the time for pleading. (In re Custody of McCarthy (1987), 157 Ill. App.3d 377, 510 N.E.2d 555.) In McCarthy, the natural mother received custody of the children in a dissolution proceeding. The mother died shortly thereafter and the circuit court awarded temporary custody to an aunt. Permanent custody proceedings spanned one year, and more than 30 witnesses testified. Just before the respondent natural father completed his case in chief, he moved to dismiss the aunt's custody petition alleging she lacked standing under section 601. The circuit court granted the motion and transferred custody to the father.
On appeal the aunt contended the natural father waived his right to object to standing by failing to make a timely motion to dismiss. The court held lack of standing is an affirmative defense and therefore subject to section 2-619(a)(9) of the Code of Civil Procedure (Ill. Rev. Stat. 1987, ch. 110, par. 2-619(a)(9)), which requires motions to dismiss be brought within the time for pleading. The respondent's motion was not made within that time.
"Nevertheless, the trial court has the discretion to allow the withdrawal of an answer and the subsequent filing of a tardy motion to dismiss based on a defense not raised in the answer. (Midwest Bank & Trust Co. v. Village of Lakewood (1983), 113 Ill. App.3d 962.) Unless it can be demonstrated that the opposing party was prejudiced by the late filing of the motion to dismiss, the trial court does not abuse its discretion by allowing tardy pleadings. Illinois Housing Development Authority v. Sjostrom & Sons, Inc. (1982), 105 Ill. App.3d 247, 253." McCarthy, 157 Ill. App.3d at 380-81, 510 N.E.2d at 557.
The court found extreme prejudice in the circuit court's allowance of the motion to dismiss. The petitioner incurred significant legal fees, went through a time-consuming and difficult custody hearing, and experienced significant emotional stresses. Further, the children had become accustomed to living with the petitioner during the year-long hearing. The court reversed the decision of the circuit court and remanded for further hearings on permanent custody.
 9 In this case, three years passed with A.M.S. in the custody of the Kennedys before Vicki raised any question regarding the Kennedys' standing. The issue was raised for the first time in a post-trial motion after several days of hearings, 24 witnesses, and more than 1,000 pages of transcript. As in McCarthy, extreme prejudice would result if we concluded Vicki had not waived the standing issue. *875 Vicki has waived the issue of standing, and the circuit court's order awarding permanent custody to Doris Kennedy is affirmed.
 10 We seek to make clear under the Act the Kennedys, as third parties, did not have standing to petition for custody of A.M.S. To prevent such situations in the future, trial courts must carefully examine the pleadings and may, sua sponte if necessary, raise the issue of a nonparent's standing or lack of standing.
The second issue Vicki raises on appeal is whether the circuit court's award of custody to Doris Kennedy was against the manifest weight of the evidence and an abuse of discretion. Specifically, Vicki argues Doris failed to overcome the presumption favoring custody awards to natural parents.
 11, 12 It is an accepted presumption the right of a natural parent to custody of a child is superior to that of a third party. (In re Custody of Townsend (1981), 86 Ill.2d 502, 508, 427 N.E.2d 1231, 1234; Peterson, 112 Ill.2d at 51, 491 N.E.2d at 1151.) The law also presumes it is in the child's best interest to be raised by the natural parent. (In re Custody of Krause (1982), 111 Ill. App.3d 604, 609, 444 N.E.2d 644, 648.) These presumptions are not absolute and serve only as factors for consideration in determining where the best interests of the child lie. (Townsend, 86 Ill.2d at 508, 427 N.E.2d at 1234; see also Peterson, 112 Ill.2d at 51-52, 491 N.E.2d at 1151.) The right of the natural parent to her child must yield to the best interest of the child. (Krause, 111 Ill. App.3d at 606, 444 N.E.2d at 646.) "A court need not find that the natural parent is unfit or has forfeited his custodial rights before awarding custody to another person if the best interests of the child will be served." Townsend, 86 Ill.2d at 508, 427 N.E.2d at 1234; Soldner v. Soldner (1979), 69 Ill. App.3d 97, 101-02, 386 N.E.2d 1153, 1157.
"It is obvious that in a custody dispute a court should give weight to the claim of a third person who has had actual or legal custody of the child for a substantial period of time, especially if the evidence shows that the child has become an integral member of a true family unit. [Citations.] But however important this factor may be in a given case, it does not rise to the level of a presumption so as to `neutralize' the superior-right doctrine or transpose the superior right from the natural parent to the third person. It remains simply a factor to consider in ascertaining what will best serve the interests of the child." Townsend, 86 Ill.2d at 515, 427 N.E.2d at 1237-38.
See also Krause, 111 Ill. App.3d at 609, 444 N.E.2d at 648.
The court must consider the particular facts and circumstances of *876 each case in determining the best interests of the child. (Krause, 111 Ill. App.3d at 607, 444 N.E.2d at 646.) Section 602 of the Act requires the court to consider all relevant factors and lists six of them. Ill. Rev. Stat. 1987, ch. 40, pars. 602(a)(1) through (a)(6).
Subsection (1) makes the wishes of the natural parents relevant. Joel wants Doris and Jeff to have custody of A.M.S. Testimony indicates Joel is probably incapable of caring for the child himself as he is disabled. Vicki clearly wants custody of her daughter.
Subsection (2) is inapplicable as A.M.S. is too young to decide where she wants to live.
Subsection (3) is the interaction and interrelationship of the child with her parents and others who may significantly affect her best interests. The record indicates A.M.S. calls Vicki and Doris "Mommy" but that A.M.S. and Doris are strongly bonded. In February 1988, A.M.S. told Vicki that Jeff had touched her "privates," but the child later denied he had done this. She displays no fear of Jeff and sometimes calls him "Daddy."
Subsection (4) considers the child's adjustment to her home, school, and community. Evidence shows A.M.S. looks forward to visitation with Vicki and sometimes cries when she leaves Vicki to return to the Kennedys.
Subsection (5) is the mental and physical health of all individuals involved. Doris, Jeff, and A.M.S. are in good health. Vicki has epilepsy, but testified the epilepsy has not and will not affect her ability to care for A.M.S.
Subsection (6) contemplates the physical violence or threat of physical violence by the child's potential custodian. A.M.S. told Vicki that Jeff touched her between her legs. Vicki contacted the police; the Department of Children and Family Services (DCFS) immediately launched an investigation. There was extensive testimony about this investigation and A.M.S.'s claim. The circuit court concluded there was insufficient evidence to show Jeff sexually abused A.M.S.
Other relevant testimony, from one of A.M.S.'s baby-sitters, indicates the child, while in Vicki's care, frequently arrived at the baby-sitter in the morning wearing the same diaper she had on when she left the baby-sitter the night before. Vicki took bottles of formula to the baby-sitter and the formula was almost always spoiled. A baby-sitter also testified Vicki herself used prescription medication intended for A.M.S. to control the infant's asthma. Doris testified A.M.S. was often dirty and wearing dirty clothes when she returned from visitation with Vicki.
 13, 14 The circuit court was correct in concluding Doris produced *877 sufficient evidence to show it is in A.M.S.'s best interests for Doris to have custody rather than Vicki, the natural parent.
"In custody cases the trial court is vested with great discretion because it has the superior opportunity to observe the witnesses, evaluate the evidence, and determine the best interests of the child. [Citation.] The trial court's determination of custody will not be reversed unless it has clearly abused its discretion or the decision was contrary to the manifest weight of the evidence." (Krause, 111 Ill. App.3d at 608, 444 N.E.2d at 647-48.)
(See also McCuan, 176 Ill. App.3d at 427, 531 N.E.2d at 106.) The trial court's determination in this case was not against the manifest weight of the evidence nor an abuse of discretion.
 15 Vicki next argues the circuit court abused its discretion when it found Jeff Kennedy did not sexually abuse A.M.S. Doris testified A.M.S. began wetting her pants and refusing to play with other children in late January 1989. A.M.S. told other children in the house not to touch her privates. Several days later, in early February, while at the home of baby-sitter Tammy Murphy, A.M.S. experienced difficulty urinating. Tammy asked A.M.S. whether anyone had touched her "down there" and A.M.S. told her Jeff had touched her between her legs. Tammy informed Vicki and they telephoned the police. Tammy and Vicki testified A.M.S.'s vaginal area was red and irritated. A.M.S. stated she told Jeff to stop but he would not. She also claimed to have told Doris but said Doris did not believe her. Doris denied A.M.S. told her of the touching.
Examination by a physician revealed A.M.S. had an infection of the bladder and urinary tract. There was no evidence of abuse or neglect. DCFS employee Theresa Kelly did not find sufficient credible evidence to believe Jeff abused A.M.S. DCFS caseworker Maggie Wright found A.M.S. credible and believed the child had been abused. Robert Kinas, director of the Incestuous Sexual Abuse Treatment Program at the Institute for Human Resources, met with A.M.S. 10 times from February through May 1989. His opinion was that A.M.S. had been abused and on cross-examination he stated he believed Jeff was the perpetrator.
Several days after the initial interview with A.M.S., Theresa Kelly spoke with the child again and A.M.S. denied Jeff or anyone else had touched her. Jeff denied touching or abusing A.M.S. He testified he never took her to the bathroom or changed her diapers. He willingly left the home for several days after the allegations of sexual abuse were made and agreed to take a polygraph test, though the test was *878 never administered. Doris testified she awoke one night late in January 1989 and heard Jeff in the family room telling A.M.S. to go back to bed. She assumed the child had been to the bathroom.
Vicki denied coaching A.M.S. to make the sex abuse charges. She testified she did not remember Prairie State Legal Services telling her in 1986 they would not take a custody case unless there were allegations of sexual abuse involved.
Finally, Doris testified A.M.S. sometimes talks about things that have not happened.
Based on all the evidence in the record the circuit court could reasonably conclude Jeff did not abuse A.M.S. The court did not abuse its discretion in making such a finding.
In summary, Vicki has waived the issue of the Kennedys' standing to petition for custody of A.M.S. The circuit court did not abuse its discretion in awarding permanent custody of A.M.S. to Doris Kennedy. The circuit court of Livingston County is affirmed.
Affirmed.
GREEN and STEIGMANN, JJ., concur.
