The plaintiff in this case sought a writ of habeas corpus to determine the custody of two minor children. He later amended his petition to add a claim for visitation rights. The defendant moved to quash the petition, and the court granted the motion. From the judgment sustaining the motion to quash the plaintiff has appealed to this court.
The motion to quash is equivalent to a demurrer.
Adamsen
v.
Adamsen,
The petition alleged that the plaintiff and the defendant are the parents of a son, Craig, ten years of age; that the defendant is the natural mother of a daughter, Beverly, fourteen years of age; that the plaintiff and the def endant lived together continuously for more than ten years, from 1960 to August, 1970, and that during that period of time the defendant held out the plaintiff to the community and to the children as her husband and the father of both children; that the plaintiff at all times has had great love and affection for the defendant and for the children, has always treated Beverly as his own, and has shown no favoritism to his son Craig; that on or about August 24, 1970, the defendant, without any advance notification to the plaintiff, left the domicil of the parties, taking her daughter Beverly and leaving the son Craig behind; that subsequently the plaintiff, believing that Craig’s welfare dictated that he live with his sister and his mother, brought Craig to live with the defendant; that until May 1, 1971, the plaintiff had enjoyed visitation with both children ; that Beverly and Craig are now in the custody *342 and control of the defendant and, since May 1,1971, the defendant has refused to permit the plaintiff to visit the children. The plaintiff further alleged that he is a fit person to have the custody of the children and that their welfare will be best served by placing them in his custody. In the amended petition, the plaintiff alleged that at all times he has supported the children and that he continues to do so, that the defendant has always accepted this support and that the best interests of the children will be served by affording him reasonable visitation privileges.
The defendant’s motion to quash is predicated on the failure of the plaintiff to allege guardianship of either child by reason of marriage or judicial proceedings and, as to the child Beverly, the failure to allege that the plaintiff is a parent of the child. By reason of these deficiencies the defendant claimed that the plaintiff is without standing to bring the action.
The plaintiff’s appeal challenges only that part of the judgment which relates to his claim for visitation rights. The issue for our determination is whether the plaintiff has standing to bring habeas corpus.
The primary purpose of habeas corpus in matters relating to the custody of children is to furnish a means by which the Superior Court may determine what is best for the welfare of the child.
Howarth
v.
Northcott,
The boy involved in this litigation is the illegitimate child of the parties. The defendant relies on § 45-43 of the General Statutes
1
which makes her the sole guardian of the illegitimate ehild, and she claims that as guardian of the person of the child she alone is entitled to his custody, and that the plaintiff, since he has no right to custody as the father of an illegitimate child, has no right to visit the child. In a habeas corpus action concerning custody of a minor child the court determines what is in the best interest of the child. The legal rights of no one, including a parent, are allowed to militate against this.
Howarth
v.
Northcott,
supra;
Mullins
v.
Becker,
In addition to the problem of paternal support for the illegitimate child, the law, from early times, has been concerned with his status. By the common law of England the child was nullius filius. 1 Blaek
*344
stone, Commentaries, p. 458;
Heath
v.
White,
In the case before us, in view of § 45-43, the trial court held that the mother of an illegitimate child is the sole guardian of the child, and that such child is the child of the mother. It also held that as to both children, the petition failed to set forth any basis for a finding that the plaintiff had the right of custody or visitation. By sustaining the motion to quash, the court determined that the plaintiff had no standing to seek the writ.
At the time of its decision the trial court did not have the benefit of the decision of the United States Supreme Court in the case of
Stanley
v.
Illinois,
We recognize the fact that the constitutional issues raised in the Stanley case were not presented to the trial court in the present case. We regard this decision of the United States Supreme Court, however, as controlling on the appeal before us.
We must conclude, therefore, that as to the child Craig the plaintiff has alleged sufficient facts to establish his standing to have the issues determined. What is best for the welfare of the child is still the ultimate question to be decided by the trial court.
Because there was no allegation that the plaintiff was the parent or guardian of Beverly, there is no error in the judgment of the trial court in granting the motion to quash the petition insofar as it related to her. There is error in granting the motion to quash the petition in its application to Craig, the judgment is set aside and the case is remanded with direction to deny the motion to quash the petition as to Craig.
In this opinion the other judges concurred.
Notes
“[General Statutes] Sec. 45-43. father and mother joint guardians; removaxi. The father and mother of every legitimate ehild under twenty-one years of age are constituted joint guardians of the person of sueh minor, and the powers, rights and duties of the father and the mother in regard to sueh minor shall be equal. Upon the death of either father or mother, the surviving parent of such ehild shall become the sole guardian of the person of sueh child. The mother of each illegitimate ehild under twenty-one years of age shall be the sole guardian of the person of such ehild.”
