Thе plaintiff seeks a writ of habeas corpus to determine the custody of four minor children. The defendant’s motion to quash the petition was granted by the court, and from the judgment granting the motion the plaintiff has apрealed to this court.
The function of a motion to quash, which is equivalent to a demurrer, is to test the legal sufficiency of the allegations of the petition.
Adamsen
v.
Adamsen,
The petition alleged, inter alia, that the plaintiff is the father of four minor children who are presently in the custody and control of the defendant; *529 that the dеfendant is an unfit person to have custody and control of the children; that the plaintiff is a fit person to have custody and control of the children; and that the welfare of the children will best be served by plaсing them in his custody.
In their briefs and arguments before this court, both parties admit that the children in question are illegitimate, and that the defendant is their mother. While these undisputed facts were not alleged in the plaintiff’s petitiоn, it would serve no useful purpose for this court to ignore them since it is clear that the theory upon which this matter was presented to the trial court was dependent upon an acknowledgment of these fаcts.
We consult the memorandum of decision in the absence of a finding to ascertain the grounds on which the court acted.
Colli
v.
Real Estate Commission,
The plaintiff in his appeаl raises two issues, viz, the necessity of alleging a period of support and *530 cohabitation in a habeas corpus action by the father of illegitimate children in order to possess standing to litigate the question of custody, and the constitutionality of § 45-43.
“The use of habeas corpus to obtain custody was established at an early date in this state. When so used, the issue is not the illegality of confinement, as is normally the casе, but rather what is best for the child.” 2 Stephenson, Conn. Civ. Proc. § 259 (a) p; 1063;
Kearney
v.
State,
In the present case, both the trial court and the defendant mother of the illegitimate children relied upon § 45-43 of the General Statutes and the United States Supreme Court cаse of
Stanley
v.
Illinois,
Moreover, recent decisions of the United States Supreme Court regarding the rights of unwed fathers do not compel us to affirm the action of the trial court in the present case by concluding that standing is acquired only when a period of cohabitation and support is alleged in conjunction with the allegation of fatherhood. In
Stanley
v.
Illinois,
supra, it was held (p. 652) that both the due process clause and the equal protection clause of the fourteenth amendment entitle the father of an illegitimate child tо the same hearing as a legal father to determine his fitness before being deprived of custody of his child, since his interest in retaining custody is “cognizable and substantial.” Although the facts of
Stanley
involved a father who had “sired and raised” his illegitimate children; id., 651; it is not clear from a reading of
Stanley
that the facts therein are prerequisites to all the constitutional protections afforded unwed fathers under the holding of that case.
1
For example, in the recent ease of
Quilloin
v.
Walcott,
Notwithstanding the constitutional considerations expressed in the foregoing authorities concerning the rights of an unwed father, in this state the natural father of an illegitimate child is recognized as one possessing a cognizable interest in the custody of his illegitimate child in spite of his failure to estаblish a subsisting relationship with the child. Pursuant to § 45-61d (2) (A) of the General Statutes, for example, prior to a hearing on a petition for the termination of parental rights, notice is required to be sent to the father of an illеgitimate child who has acknowledged his paternity in writing. By virtue of the plaintiff’s petition and attached affidavit acknowledging paternity in the present ease, therefore, he would be entitled to notice and the right to be heard at any future termination hearing. General Statutes § 45-61f; see
State
v.
Wolfe,
In recognition of the well-established principle that a determination of custody should be premised
*533
upon the paramount consideration of what would he in the bеst interests of the children, a number of jurisdictions have recently taken the view that the natural father of illegitimate children has custodial rights similar to those of a father of legitimate children upon a dissolution of а marriage. See, e.g.,
Orezza
v.
Ramirez,
Although we hold that the plaintiff in the present case has standing to maintain a petition for habeas
*534
corpus to determine the custody of Ms minor childrеn, we do not express any opinion as to the desirability of granting the relief requested. The trial court’s ultimate decision whether to grant the relief sought by the plaintiff must be made only after a careful evaluatiоn of all the relevant evidence presented and with primary concern for the welfare of the children involved.
3
Sullivan
v.
Bonafonte,
In view of our disposition of this appeal on the question of standing, we need not considеr the constitutional question raised by the plaintiff. See
Ashwander
v.
Tennessee Valley Authority,
There is error, the judgment is set aside and the case is remanded with direction to deny the motion to quash.
In this opinion the other judges concurred.
Notes
Some legal commentators have expressed thе position that the requirement of notice to unwed fathers enunciated in Stanley is not, and should not be, limited to situations where the natural father has raised and supported Ms illegitimate child, citing difficult problems of рroof, subsequent decisions apparently disregarding the absence of such a relationship, and a father’s interest in the future companionship and enjoyment of his children. Recent Developments, 49 Wash. L. Rev. 647, 662, 663; 7 Family L.Q. 75, 104-105.
Any potential for harassment by the father of an illegitimate child through the initiation of a habeas proceeding would appear to be minimal in view of the fact that his written acknowledgment of paternity wоuld subject him to liability for support through proceedings initiated pursuant to § 17-320 of the General Statutes. See
State
v.
Wolfe,
Effective July 1, 1978, General Statutes § 17-320, entitled “Relatives obliged to furnish support,” provides, in pertinent part, as fоllows: “The superior court shall have authority to make and enforce orders for payment of support against any person who neglects or refuses to furnish necessary support to his or her spousе, a child under the age of eighteen or a parent under the age of sixty-five, according to his or her ability to furnish such support, notwithstanding the pro *534 visions of section 46-10. . . . Proceedings to obtain such orders of supрort shall be instituted by a verified petition with summons and order, in a form approved by the judges of the superior court, of the husband or wife, child or any relative or the conservator, guardian or any family relations оfficer, town or state, or any selectmen or the publie official charged with the administration of public assistance of the town, filed in the geographical area in which the petitioner or respоndent resides or does business. For purposes of this section, the term ‘child’ shall include one born out of wedlock whose father has acknowledged in writing his paternity of such child or has been adjudged the father by a court of competent jurisdiction, or a child who was born before marriage whose parents afterwards intermarry. . . .” (Emphasis added.)
It is at that time that the plaintiff's failure to develop a meaningful relationship with his сhildren or to play a meaningful role in raising and supporting them may be assessed by the court as factors relevant to its ultimate decision on the merits of the petition. See Schwartz, “Rights of a Father with Regard to His Illegitimate Child,” 36 Ohio St. L.J. 1, 9-10.
