
175 Ill. App.3d 679 (1988)
530 N.E.2d 66
AKBAR MAJIDI, Petitioner-Appellant,
v.
ELAINE PALMER et al., Respondents-Appellees.
No. 2-88-0025.
Illinois Appellate Court  Second District.
Opinion filed October 20, 1988.
*680 *681 Robert Steven Wilson, of Sycamore, for appellant.
Susan Niki Willott, of Countryman, Rissman & Krasner, of De Kalb, for appellees.
Judgment affirmed and cause remanded.
JUSTICE REINHARD delivered the opinion of the court:
Petitioner, Akbar Majidi, appeals from a judgment of the circuit court of De Kalb County dismissing his complaint for declaratory judgment for parentage because it was filed after the applicable limitations period had expired. On appeal, petitioner contends that: (1) the statute of limitations in the Illinois Parentage Act of 1984 (Ill. Rev. Stat. 1987, ch. 40, par. 2508) (Act) is unconstitutional; (2) the trial court improperly applied the statute of limitations retroactively; and (3) a guardian ad litem should have been appointed to represent the minor child.
On January 7, 1983, respondent, Elaine Palmer, gave birth to Emily Palmer. Petitioner, the biological father of Emily, maintained contact with Elaine and Emily until June 4, 1986, when he agreed to end contact with Elaine as part of an agreement that Elaine drop battery charges against petitioner. Petitioner then filed a declaratory judgment action on March 2, 1987, seeking to establish himself as Emily's father, to obtain custody of Emily, and to obtain visitation if custody to him was not granted.
Respondent moved to dismiss the complaint on the ground that the suit was filed after the statute of limitations had expired. This motion was granted, and the court gave petitioner leave to amend. *682 Petitioner filed an amended complaint, and respondent renewed her motion to dismiss. The trial court dismissed the amended complaint finding that count I was not commenced within the appropriate limitations period and count II, intentional infliction of emotional distress, failed to state a cause of action. Petitioner's motion to reconsider was denied, and petitioner appeals from the dismissal of count I only.
We turn initially to petitioner's contention that the Act's statute of limitations is unconstitutional. Petitioner first argues that the two-year statute of limitations applicable to an action brought on behalf of any person other than the child (Ill. Rev. Stat. 1987, ch. 40, par. 2508(a)(2)) violates his due process rights in that it was applied retroactively so as to deprive him of his opportunity to assert his constitutional right of parentage.
 1 Due process generally does not prohibit the retroactive application of civil legislation unless the consequences of such application are particularly harsh and oppressive. (United States Trust Co. v. New Jersey (1977), 431 U.S. 1, 17 n. 13, 52 L.Ed.2d 92, 106 n. 13, 97 S.Ct. 1505, 1515 n. 13; see Usery v. Turner Elkhorn Mining Co. (1976), 428 U.S. 1, 17, 49 L.Ed.2d 752, 767, 96 S.Ct. 2882, 2893.) Under Illinois law, a plaintiff whose claim would be otherwise barred by the retroactive application of a statute of limitations is given a reasonable time period in which to bring the claim. (Mega v. Holy Cross Hospital (1986), 111 Ill.2d 416, 420, 490 N.E.2d 665.) Here, although petitioner's claim was barred upon the effective date of the Act, he still had a reasonable time period following the effective date of the Act in which to file his claim. Under these circumstances, the retroactive application of the statute of limitations did not result in a harsh and oppressive result and, therefore, did not deny petitioner due process.
Petitioner's second constitutional contention is that he has been denied equal protection of the laws because the statute sets out different limitations periods for different parties. (See Ill. Rev. Stat. 1987, ch. 40, pars. 2508(a)(1), (a)(2), (a)(3).) Specifically, petitioner argues that the difference in limitations periods between an action brought on behalf of or by a child and one brought by a father constitutes differing treatment of similarly situated parties.
 2 Statutes are presumed constitutional, and all doubts are to be resolved in favor of upholding the validity of the law challenged. (People v. Bales (1985), 108 Ill.2d 182, 188, 483 N.E.2d 517.) A court must apply different levels of scrutiny to a claim that a statute violates equal protection depending on the nature of the statutory classification allegedly discriminated against. (Clark v. Jeter (1988), 486 U.S. ___, ___, 100 L.Ed.2d 465, 471, 108 S.Ct. 1910, 1914.) Classifications *683 based on race or national origin, or affecting fundamental rights, are strictly scrutinized. (Clark, 486 U.S. at ___, 100 L.Ed.2d at 471, 108 S.Ct. at 1914.) Classifications based on sex or illegitimacy are given an intermediate scrutiny. (Clark, 486 U.S. at ___, 100 L.Ed.2d at 471, 108 S.Ct. at 1914.) Finally, any other statutory classification will be given minimal scrutiny. (Clark, 486 U.S. at ___, 100 L.Ed.2d at 471, 108 S.Ct. at 1914.) To survive minimum scrutiny, a statutory classification need only be rationally related to a legitimate governmental interest. (Clark, 486 U.S. at ___, 100 L.Ed.2d at 472, 108 S.Ct. at 1914; Harris v. Manor Healthcare Corp. (1986), 111 Ill.2d 350, 371, 489 N.E.2d 1374.) The burden of establishing the unreasonableness of a classification lies with the person attacking its validity. (In re Belmont Fire Protection District (1986), 111 Ill.2d 373, 380, 489 N.E.2d 1385.) Here, the statutory classification is not based on any of the protected classifications requiring any heightened scrutiny. Rather, it is comprised of persons, other than the illegitimate child, for whose benefit a paternity suit is instituted. Thus, we need only determine if the classification is rationally related to a legitimate governmental purpose.
 3 The Act recognizes the differing interests of a parent and a child in having the parentage of the child determined. It further emphasizes "the right of every child to the physical, mental, emotional and monetary support of his or her parents." (Ill. Rev. Stat. 1987, ch. 40, par. 2501.1.) In doing so, it provides a reasonable period of time in which any interested party may institute a suit to determine parentage, but in light of the special concerns for the child itself, a statute of limitations of two years beyond the age of majority of the child was enacted. Such an extended statute of limitations best serves the interests of the child because it provides an opportunity to assert a claim on behalf of a child at anytime during his or her minority as well as enables the child to assert a claim on his or her own behalf within a reasonable time after reaching majority. (Cf. Clark, 486 U.S. at ___, 100 L.Ed.2d at 473, 108 S.Ct. at 1915.) On the other hand, the two-year statute of limitations which applies to petitioner is designed to provide repose for defendants and avoid stale claims. We, therefore, hold that the statutory classification in section 8 of the Act is rationally related to a legitimate governmental purpose and therefore does not violate equal protection. See In re Paternity of King (Ind. App. 1987), 514 N.E.2d 325.
 4 Petitioner next argues that in allowing the retroactive application of the statute of limitations the trial court failed to consider the reasonableness of the time period in which petitioner filed his *684 action. Generally, following the enactment of a statute of limitations which shortens a prior limitations period or provides one where one did not exist previously, a plaintiff whose cause of action arose prior to the date of enactment will be allowed a reasonable period of time in which to bring his action. (Mega v. Holy Cross Hospital (1986), 111 Ill.2d 416, 420, 490 N.E.2d 665.) If under the new statute a reasonable time remains, the new period is applied, without more; but if a reasonable time does not remain, then one will be allowed. (Mega, 111 Ill.2d at 420-21, 490 N.E.2d at 667.) What constitutes a reasonable time will depend on the facts of each case. Sakellariadis v. Spanos (1987), 163 Ill. App.3d 1084, 1089, 517 N.E.2d 324.
 5 Here, the Act became effective July 1, 1985. Plaintiff filed his declaratory judgment action on March 2, 1987. This was 20 months after the effective date of the Act and close to the two-year statute of limitations. It cannot be said that the 20-month delay in filing the action was reasonable.
Petitioner argues, however, that the child's mother acknowledged that he was the father and voluntarily allowed him to visit the child until petitioner and the mother entered into an agreement on June 4, 1986, whereby petitioner agreed to not have any contact with the mother. Petitioner maintains that the time period which should be considered for purposes of whether there was a reasonable delay in his filing the instant suit was that period between June 4, 1986, and March 2, 1987, and that such period was reasonable. We are unpersuaded by this argument.
Petitioner had knowledge of his cause of action from the birth of the child. Although the child's mother may have voluntarily allowed him to visit the child, petitioner was free to initiate an action whereby he could obtain legal recognition of his rights as the child's father. Moreover, the agreement that he entered into with respondent only prohibited contact with respondent and does not address the issue of his visitation with his daughter, Emily. Consequently, he had no affirmative indication on June 4, 1986, that he would not be allowed to continue to visit his daughter. We conclude, therefore, that petitioner's suggested reason for his delay in filing his suit, that he was allowed to visit the child without legal action, does not render the delay reasonable. This is particularly true where, as here, petitioner's reason for the delay could have continued beyond the two-year statute of limitations which would have conclusively barred petitioner's action. See Sakellariadis, 163 Ill. App.3d at 1090, 517 N.E.2d at 328-29.
Even if the agreement did by its terms prohibit petitioner from visiting his daughter, the subsequent delay in filing the suit was not *685 reasonable. Once the child's mother and petitioner entered into the agreement prohibiting petitioner from having contact with the mother, petitioner should have realized that his only recourse was legal action. (See Sakellariadis, 163 Ill. App.3d at 1090, 517 N.E.2d at 328; see also Matayka v. Melia (1983), 119 Ill. App.3d 221, 224-25, 456 N.E.2d 353.) Petitioner, however, waited nearly nine months before bringing this action. Such a delay is not reasonable under these circumstances.
 6 Petitioner's final contention is that the trial court erred in refusing to appoint a guardian ad litem and realign the parties. Respondent responds that the trial court properly refused to appoint a guardian and realign the parties because petitioner's suit was not timely filed.
In McDonald v. McGowan (1987), 163 Ill. App.3d 697, 516 N.E.2d 934, the court addressed the same issue presented in this case. The father in McDonald filed suit to establish the paternity of respondent's child. (163 Ill. App.3d at 698, 516 N.E.2d at 934.) The respondent moved to dismiss the petition as barred by the statute of limitations in the Act, and the trial court dismissed the petition. 163 Ill. App.3d at 698-99, 516 N.E.2d at 934.
In holding that the trial court had an obligation to appoint a guardian ad litem for the child, the court emphasized that the outcome of the paternity action by petitioner would directly affect the child's right to visitation with her father and to receive child support. (163 Ill. App.3d at 699, 516 N.E.2d at 935.) Because of respondent's motion to dismiss, there was a clear indication of a potential conflict between the interests of the child and the respondent. (163 Ill. App.3d at 699, 516 N.E.2d at 935.) Where a trial court has notice that a minor's interests are not properly represented, it is the duty of the trial court to appoint a guardian ad litem to safeguard and protect those interests. 163 Ill. App.3d at 699, 516 N.E.2d at 935.
Here, respondent moved to dismiss petitioner's paternity action based on the statute of limitations. As such, it was apparent to the trial court that respondent did not wish to promote the child's interest in visitation with and child support from her father. The trial court had an obligation under these circumstances to appoint a guardian ad litem. Therefore, we remand for the appointment of a guardian ad litem for respondent's child. The guardian will have 90 days to file a petition to determine paternity if she finds that such action is in the best interests of the child, and the trial court will supervise the guardian ad litem to insure that the child's interests are not prejudiced. See McDonald, 163 Ill. App.3d at 700, 516 N.E.2d at 936.
*686 For the foregoing reasons, we affirm the judgment of the circuit court of De Kalb County dismissing petitioner's suit and remand for appointment of a guardian ad litem for Emily Palmer with directions as set forth above.
Affirmed and remanded.
LINDBERG, P.J., and UNVERZAGT, J., concur.
