This appeal arose from an application for a writ of a habeas corpus in which the petitioner, *708Tammy Evans, sought custody of her daughter, Abigail Santoro. The child had resided with the respondents, the child’s paternal grandparents, since the death of the child’s father, William Santoro, from whom the petitioner was divorced. The respondents contested the action and requested that they be awarded custody. The trial court rendered judgment for the petitioner. From that judgment, the respondents appeal. The issues of this appeal are whether the trial court erred (1) in placing the burden of proof on the respondents, (2) in considering the parental rights of the petitioner, and (3) in concluding that the petitioner should be awarded custody of the child.
The relevant facts are not in dispute. The child was bom on November 9,1980. When the child was approximately six weeks old, the petitioner resumed working outside of the home. The respondents took care of the child while the petitioner worked. Under this arrangement, the child spent about forty hours a week with the respondents. In November, 1982, the petitioner and the child’s father separated, with the petitioner leaving the child with the father. The respondents continued taking care of the child on a daily basis.
In July, 1983, the petitioner and the child’s father were divorced. The father was awarded custody of the child without objection by the petitioner, who remarried two months later. On November 8,1983, the father was killed in an automobile accident. Following the father’s death, the child resided with the respondents.
The trial court found that the child had strong emotional ties to the respondents, who had provided the child with a loving and nurturing environment for most of her life. It also found that the respondent grandfather and the respondent grandmother, who were, respectively, fifty-two and forty-nine years old, had clearly demonstrated that they had the ability to be fit cus*709todial parents. It found that the petitioner was also a suitable custodial parent, had maintained emotional ties with the child, and had demonstrated a willingness to foster a continuing relationship between the child and the respondents. The trial court stated that it was mindful of the strong attachments between the respondents and the child and of the efforts they had made in enriching the child’s life. It concluded, however, that it would be in the child’s best interest for custody to be awarded to the petitioner. In recognition of the importance of the respondents in the child’s life, the court awarded them reasonable and liberal visitation rights. It did not, however, order the respondents to return the child immediately to the petitioner, but, instead, allowed the child to continue to reside with the respondents until further order of the court. The court contemplated a transitional period, during which the parties would consult a psychiatrist for aid in establishing a schedule of contacts between the petitioner and the child. The precise schedule was to be ordered by the court at a future hearing.
I
The first claim of error which the respondents raise is that the trial court erred by placing the burden of proof upon them. A habeas corpus petition concerning a minor child’s custody is an equitable proceeding in which the trial court is called upon to decide, in the exercise of its sound discretion, the custodial placement which will be best for the child. Nye v. Marcus, 198 Conn. 138, 141, 502 A.2d 869 (1985); McGaffin v. Roberts, 193 Conn. 393, 403, 479 A.2d 176 (1984), cert. denied, 470 U.S. 1050, 105 S. Ct. 1747, 84 L. Ed. 2d 813 (1985).
In order to invoke the aid of a habeas corpus writ to enforce a right to physical custody of a minor, the applicant for the writ must show a prima facie legal *710right to custody. 39 Am. Jur. 2d, Habeas Corpus § 118; cf. Nye v. Marcus, supra, 144. Once the writ has issued, the burden of proving that a change of custody would be in the child’s best interest rests upon the party seeking the change. Kearney v. State, 174 Conn. 244, 252, 386 A.2d 223 (1978). In this case, that party was the petitioner.
The petitioner alleged in her petition that she was legally entitled to custody as the child’s biological parent1 and statutory guardian. She did not, however, make any allegations relating to the best interest of the child. See Adamsen v. Adamsen, 151 Conn. 172, 175-77, 195 A.2d 418 (1963). The respondents did not file a return and there were no subsequent pleadings2 which put the best interest of the child in issue. The court nevertheless was faced with that ultimate question. Nye v. Marcus, supra.
*711General Statutes § 45-43 provides that if either the mother or father of a minor child dies or is removed as guardian, the other parent of the child shall become the sole guardian of the person of the minor. “Guardianship” as applied to the person of a minor includes the “obligation of care and control.” General Statutes § 45-42a (5). It is firmly established in our law that a guardian of the person of a minor is entitled to physical custody, that is, the immediate care and control of his or her ward. See McGaffin v. Roberts, supra, 410 (Parskey, J., dissenting); Miller v. Miller, 158 Conn. 217, 220, 258 A.2d 89, cert. denied, 396 U.S. 940, 90 S. Ct. 374, 24 L. Ed. 2d 241 (1969); Boardman v. Boardman, 135 Conn. 124, 129, 62 A.2d 521 (1948). Upon the death of the child’s father, the petitioner became the sole legal guardian of the person of the child. As such, she established a prima facie right to the physical custody of her daughter.3 The establishment of this prima facie right, however, did not relieve her of the burden of proving that changing her daughter’s physical custody would be in the child’s best interest. See Kearney v. State, supra.
*712The transcript discloses that counsel for the petitioner requested that the respondents be required to present their case first because they must “furnish evidence as to why it would be for the best interest of this child not to be turned back to her natural mother.” The court ordered the petitioner to proceed, but later in the trial concluded that “the burden in this case is upon the grandparents.”4 The burden of proof was on the petitioner, and the court therefore erred.
To be cause for reversal, however, the error must be shown to be harmful in the sense that it is likely to have affected the result. Anonymous v. Norton, 168 Conn. 421, 430, 362 A.2d 532, cert. denied, 423 U.S. 935, 96 S. Ct. 294, 46 L. Ed. 2d 268 (1975). An examination of the memorandum of decision reveals that the trial court’s ultimate decision was based on a consideration of all of the evidence presented by both sides and that the standard which it applied to the evidence was that of the best interest of the child. The court stated that it “carefully considered the evidence in favor of the grandparents’ claim to custody and weighed it against the evidence which favored the mother’s assertion of her rights to custody as the sole surviving parent.” Having done so, it concluded that it would be in the best interest of the child to be placed in the custody of the mother. The court applied to the evidence the appropriate standard by which child custody decisions are measured. Yontef v. Yontef, 185 Conn. 275, 282, 440 A.2d 899 (1981). The error, therefore, was harmless because it is not likely the result would have been affected.
II
The respondents’ second claim is that the court erred in its consideration of the petitioner’s right to the physi*713cal custody of the child as her natural parent. A careful reading of the memorandum of decision belies any assertion that the court’s acknowledgment of this right impinged upon its proper consideration of the child’s best interest.
The memorandum states, in part: “The court has carefully considered the evidence in favor of the grandparents’ claim to custody and weighed it against the evidence which favored the mother’s assertion of her right to custody as the sole surviving parent. The court concludes that it would be in the best interest of the child that custody be awarded to the mother. The court is satisfied that the mother is a fit custodial parent who will provide adequate care and affection for the child. She has maintained emotional ties with the child and has a positive relationship with her at the present time. She can provide an environment for the child which includes the presence of siblings closer to the child’s age. She has demonstrated a willingness to foster a continuing relationship between the child and the grandparents. These reasons together with the mother’s right to the companionship of the child as well as the right to guide the child’s development are the basis of the court’s conclusion.”
Placing the court’s consideration of the petitioner’s right to custody in context, it is apparent that, while acknowledging the petitioner’s significant and constitutionally protected right to the companionship, care, custody and management of her child; Cappetta v. Cappetta, 196 Conn. 10, 14, 490 A.2d 996 (1985); Emerick v. Emerick, 5 Conn. App. 649, 660-61, 502 A.2d 933 (1985); the court applied the correct standard in weighing the evidence. The court’s recognition of the petitioner’s right to physical custody as the biologi*714cal parent of the child did not inhibit its search for the best interest of that child.
Ill
The respondents additionally claim that the trial court abused its discretion by reaching a conclusion which was not reasonably supported by the evidence. The trial court possessed broad discretion to decide what was in the best interest of the child; Sullivan v. Bonafonte, 172 Conn. 612, 614, 376 A.2d 69 (1977); and our review in this case, as in other cases involving family matters, is restricted. Our interference is warranted only if we are convinced that the trial court clearly abused its discretion. Kearney v. State, supra.
The respondents produced as expert witnesses a domestic relations officer and a child psychologist. The domestic relations officer testified that, in his judgment, the best interest of the child dictated that custody remain with the respondents. The psychologist testified that the bond between the respondents and the child had developed to the extent that the respondents had become the child’s psychological parents. Both testified that the child was presently emotionally healthy, and that it would be detrimental to the child to upset the relationship which she had developed with the respondents. The respondents testified that they lived in a five-bedroom home, had “all kinds of play things” and an above-ground swimming pool in their backyard, and that the child had her own bedroom in their home “plus another one that she has filled up.”
The petitioner testified that she lived with her new husband and their baby in a two-bedroom basement apartment, that the family planned to move to a larger apartment if the child were placed in her custody, that she loved the child and that she wanted the child to grow up with siblings.5 She stated that she felt that *715the respondents were doing a good job of raising the child and that she would be willing to allow them reasonable and liberal visitation because she believed that the child needed their love. The petitioner characterized her relationship with the child as good.
The trial court “was free to accept or reject, in whole or in part, the evidence of either party.” (Citation omitted.) Brey v. Brey, 1 Conn. App. 397, 399, 472 A.2d 354 (1984). It was not bound to accept the testimony of the expert witnesses. Yontef v. Yontef, supra, 281. The trial court found that the petitioner was a fit custodial parent who enjoyed a positive relationship with her child. Nothing in the record refutes that finding. While the respondents were more financially comfortable than the petitioner and consequently might be able to provide more for the child materially than the petitioner, that fact is not determinative of the child’s best interest. See In re Juvenile Appeal (Anonymous), 177 Conn. 648, 661-62, 420 A.2d 875 (1979).
The trial court fashioned its orders so that the respondents would be able to maintain and strengthen their ties to the child in their role as grandparents by frequent and liberal visitation. They will continue to provide a valuable source of love and enrichment for the child in the years to come.
There is no error.
In this opinion the other judges concurred.At the outset of the proceeding, the parties orally stipulated that the petitioner was the child’s surviving natural parent and that her parental rights had not been terminated.
The record discloses that the respondents never formally opposed the habeas petition by filing a return, although the court requested that they do so. See Practice Book § 533. They stated that they sought custody of the child, and the court ultimately treated that oral statement as their return and determined whether custody should be awarded to the grandparents or to the natural mother. A return pursuant to Practice Book § 533, however, should have been filed. Without condoning this defect in procedure, “we conclude that to remand the case would serve no purpose since our ultimate decision would remain the same.” (Citation omitted.) Macri v. Hayes, 189 Conn. 566, 567 n.2, 456 A.2d 1186 (1983).
The application for a writ of habeas corpus is regarded as a pleading in the nature of a complaint, and the return in the nature of an answer. Arey v. Warden, 187 Conn. 324, 332, 445 A.2d 916 (1982). Ordinarily, a trial court may not proceed to trial on the merits where the pleadings are not closed. Doublewal Corporation v. Toffolon, 195 Conn. 384, 391, 488 A.2d 444 (1985); County Federal Savings & Loan Assn. v. Eastern Associates, 3 Conn. App. 582, 585 n.4, 491 A.2d 401 (1985). A writ of habeas corpus in a child custody proceeding, however, invokes the full equity jurisdiction of the court to determine custody according to the best interest of the child. 2 McCahey, Kaufman, Kraut, Gaffner, Silverman & Zett, Child Custody & Visitation Law and Practice § 7.04[2]; see Baram v. Schwartz, 151 Conn. *711315, 197 A.2d 334 (1964). Even without a responsive pleading, there is some authority which would allow a court to determine the question of the legal right to custody, where the purpose of the responsive pleading has otherwise been fulfilled. See 2 McCahey, Kaufman, Kraut, Gaffner, Silverman & Zett, supra, § 7.04.
Public Acts 1985, No. 85-244, § 2, effective May 30, 1985, provides: “In any dispute as to the custody of minor children involving a parent and a non-parent, there shall be a presumption that it is in the best interest of the child to be in the custody of the parent.” The presumption, which is one of public policy, places upon the nonparent “the burden of proving sufficient facts to put the presumed fact [that it is in the best interest of the child to be in the custody of the parent] into issue.” Anderson v. Litchfield, 4 Conn. App. 24, 28, 492 A.2d 210 (1985). The presumption, not involved in this case, does not shift the burden of proof in a custody dispute between a parent and a nonparent, but makes that burden easier to sustain because it gives the parent an initial advantange. Clark, Law of Domestic Relations, p. 591.
A “burden of proof’ is often used to mean two different things, the burden of persuading the trier, and the burden of producing evidence, that *713is, the burden of going forward. State v. Brown, 163 Conn. 52, 65 n.5, 301 A.2d 547 (1972). In this case, a review of the transcript makes it clear that the trial court intended to place the burden of persuasion on the respondents.
At the time of the trial, the petitioner was pregnant with a third child.