Certiorari was granted Carl and Rebecca Frederickson to review the dismissal of their petition1 for a juvenile dependency hearing. The petitioners attempted to *507have Cheryl Becker deprived of her natural born son, baby boy Becker, claiming she was an unfit mother. Consolidated in this opinion is an appeal by the petitioners from the granting of a writ of habeas corpus directing that the minor child be placed in the custody of his mother, Cheryl Becker.
Petitioners contend the trial court erred: (1) in concluding that it was without jurisdiction to hold a dependency hearing, and (2) in failing to enter a determination on the merits as to the fitness of Cheryl Becker pursuant to the return filed by the petitioners on the writ of habeas corpus.
On April 11, 1975, baby boy Becker was born to Cheryl Becker, then 16 years of age, in Chico, California. On April 13, 1975, Cheryl Becker signed a release of her baby, authorizing a third person to take the child from the hospital.2 *508Cheryl Becker did not sign a consent to adoption, nor did she relinquish the child to a licensed adoption agency. Beverley Jean Roberts received the child and delivered him. to the petitioners’ custody.3 The petitioners had paid all medical expenses incurred in the birth of the child, and in good faith returned with the baby to the state of Washington.
On May 8, 1975, Cheryl Becker petitioned for a writ of habeas corpus, seeking the immediate return of her son to her control and custody. On May 9, 1975, the petitioners filed their dependency petition, seeking to have Cheryl Becker declared an unfit and improper person to have care and custody of her minor child. The petitioners and the respondent presented testimony on both petitions, concluding the testimony on May 12, 1975. The testimony was not recorded. The trial court entered findings of fact and conclusions of law, stating the child was to be returned to the respondent, and the respondent be held responsible for the medical expenses borne by the petitioners. Pending review, the court ordered the custody of the child be retained by the petitioners.
Petitioners contend the trial court erred in failing to entertain their petition of dependency filed pursuant to RCW 13.04.060. While we do not acquiesce in the legal reasoning of the trial court, when it concluded it was without jurisdiction to entertain that petition, we concur in its conclusion.4 RCW 13.04.010 provides in part:
*509For the purpose of this chapter the words “dependent child” shall mean any child under the age of eighteen years:
(1) Who has no home or any settled place of abode, or any proper guardianship, or any visible means of subsistence; or
(2) Who has no parent, guardian or other responsible person; or who has no parent or guardian willing to exercise, or capable of exercising, proper parental control; or
(3) Whose home by reason of neglect, cruelty or depravity of his parents or either of them, . . . is an unfit place for such child; . . .
The release respondent signed did not constitute a relinquishment of her parental rights. Whatever the circumstances surrounding the execution of the release, it only allowed the hospital to release the child to Mrs. Roberts for adoptive planning. Within 10 days after the birth of the child, petitioners’ attorney was advised of the natural mother’s demand for return of the child. Respondent contends it took her the better part of that 10-day period to locate the child. Respondent, never having been in physical custody of this child, has not had an opportunity to demonstrate whether she is fit to care for the child within the language of RCW 13.04.010. In re Sego, 82 Wn.2d 736, 513 P.2d 831 (1973). She evidenced her willingness to provide for the child by promptly bringing the proceedings in this case. Therefore, it cannot be said that the child is dependent as that term is defined in RCW 13.04.010(1), (2) or (3). The court had the power to entertain the petition, but upon disclosure of these facts, correctly determined the child was not dependent.
Petitioners next contend that the trial court should have held hearings as to the fitness of Cheryl Becker in the habeas corpus proceeding. We disagree. Petitioners did not possess a lawful right to custody of the child. As stated in Lovell v. House of Good Shepherd, 9 Wash. 419, 421, 37 P. 660 (1894):
*510[O]n the merits of the case there was no showing made by the respondent, or any attempt to show any legal right which it had to the custody of the minor child; and if it had no legal right to the custody of the child, it matters not whether the parents were competent custodians or not, so far as the respondent is concerned. Church, Habeas Corpus (1st ed.), § 454, p. 591; Bustamento v. Analla, 1 N. M. 255.
In the absence of a showing by the petitioners that they possessed a legal right to the custody of the child, no determination as to the fitness of the parent may be made. Additionally, RCW 7.36.020 provides:
Writs of habeas corpus shall be granted in favor of parents, guardians, spouses, and next of kin, and to enforce the rights, and for the protection of infants and insane persons; and the proceedings shall in all cases conform to the provisions of this chapter.
The petitioners are neither parents, guardians, spouses nor next of kin.
Schreifels v. Schreifels, 47 Wn.2d 409, 414, 287 P.2d 1001 (1955), is appropriate:
The writ of habeas corpus is frequently resorted to, to obtain the custody of children, and quite often to determine the rights of parties to their custody. The office of the writ is not to recover their possession, but to free them from illegal restraints upon their liberty. The detention of a child of tender years from one entitled to its custody is an illegal restraint within the law. 1 Bailey on Habeas Corpus 574, Custody of Children, § 145. Only those having a legal right to a child may seek its custody by habeas corpus. In re Stuart, 138 Wash. 59, 244 Pac. 116.
The petitioners did not have a legal right to the custody of this minor child, as against the natural mother; hence they have no standing in a habeas corpus proceeding to contest her right to custody or parental fitness.
Petitioners urge State ex rel. Stitt v. Reynolds, 60 Wash. 12, 110 P. 633 (1910), requires that a hearing be held on the merits as to the fitness of the natural mother to retain custody of her minor child in the habeas corpus proceeding. *511Stitt is distinguishable; that action was commenced pursuant to Rem. Rev. Stat. § 1701 (now RCW 26.37.020),5 which is not applicable to a habeas corpus proceeding. Unlike Stitt, these petitioners did not seek redress pursuant to RCW 26.37.020.
Judgment is affirmed in both cases. Each party shall be responsible for its own attorney’s fees.
McInturff, C.J., and Green, J., concur.
Petition for rehearing denied January 8,1976.
Review granted by Supreme Court March 9,1976.
RCW 13.04.060:
“Any person may file with the clerk of the superior court a petition showing that there is within the county, or residing within the county, a dependent or delinquent child and praying that the superior court deal with such child as provided in this chapter: . . .”
“Health Facility Release Report Of Minor To Other Than A Parent Or Legal Guardian
“Important Notice
“This health facility release form is not a relinquishment or consent for adoption
“In California there are two basic ways a child may be placed for adoption if the parent feels that such a placement is in the best interest of the child:
“1) The parent may place the child directly with adoptive parents. The parent retains all rights to the child’s custody and control until a consent to the adoption by the petitioners is signed by the natural parent (s) in the presence of an agent of the department of health or a licensed adoption agency. Once given, the consent may not be withdrawn except with court approval.
“2) The parent may relinquish the child to a licensed adoption agency for placement in a home approved by the agency. Once the child is relinquished to a licensed adoption agency, the relinquishment may not be rescinded except by mutual agreement.
“I. Parent’s Authorization . . .
I, Cheryl A. Becker, . . . authorize said hospital to release my child to Mrs. Beverley Jean Roberts . . . for the purpose of [x] Adoption Planning ... I retain all parental rights to his/her custody and control. This only authorizes release of my child from the hospital. . . .
/s/ Cheryl A. Becker
“II. Acknowledgment By Person (s) Receiving Child
for the purpose of [x] Adoption Planning . . . I/we understand that this only authorizes release of this child from the hos*508pital. This is not a consent or relinquishment of this child for adoption.” (Italics ours.)
On oral argument, petitioners’ counsel advised petitioners had filed an adoption proceeding on October 27, 1975. The trial court held petitioners received the child and returned to their Washington home in good faith, believing they would adopt this child.
The trial court concluded it was without jurisdiction within the meaning of RCW 13.04.010, in that: “Even though the words ‘responsible person’ do not appear in the second phrase of RCW 13.04.010(2), . . . those words should be read in that phrase by implication.” The court further concluded that the petitioners were responsible persons within the meaning of RCW 13.04.010(2), thereby concluding that the court was without jurisdiction to hear the dependency petition. We believe this interpretation is not justified by the language of the statute.
RCW 26.37.020.
“Upon complaint of any person in writing other than an officer or agent of such society or corporation to any judge of the superior court giving the names and residences of the parents, guardian (if any) or next of kin of such child, so far as known, and alleging that the father of such minor child is dead, or has abandoned his family or is an habitual drunkard or is a man of notoriously bad character, or is imprisoned for crime, or has grossly abused or neglected such child, and that the mother of such child is an habitual drunkard, or imprisoned for crime, or a woman of notoriously bad character or is dead, or has abandoned her family, or has grossly abused or neglected such child, and alleging that the welfare of such child requires that legal steps be taken to provide for its care and custody, a warrant shall issue directing the proper officer to take such child into custody and care for or dispose of it as such judge shall direct, until a hearing can be had, such proceedings shall have precedence of other causes, of which hearing not less than five days notice shall be given to such parents, guardian or next of kin and such judge shall hear the allegations of the complaint and all testimony offered for or against the same and determine whether in his judgment there is cause for a change in the care and custody of such child. If the judge shall decide' to change the care and custody of such child, he may commit the child to the care and custody of any such benevolent society contemplated in this chapter which is willing to receive it, and such commitment shall carry with it the same powers and authority as above provided in case of voluntary surrender, or he may enter such findings and transmit the papers and a transcript of his proceedings to the county commissioners of the county in which the case arises and surrender such child to the care and custody of such commissioners and it may be disposed of without further notice to the parents, guardian or next of kin.”