
169 N.W.2d 758 (1969)
STATE of Minnesota by ST. LOUIS COUNTY WELFARE DEPARTMENT, Appellant,
v.
Seffrie Ben NIEMI and Jessie Niemi, Respondents,
Deward and Shirley Greenwood, Respondents,
In re Welfare of Cindy HILL.
Medina GREENWOOD, Bradley Greenwood, Angela Marie Greenwood and Sandra Greenwood, Deward and Shirley Greenwood, Appellants,
v.
ST. LOUIS COUNTY WELFARE DEPARTMENT and Seffrie Ben Niemi and Jessie Niemi, Respondents.
Nos. 41274, 41363.
Supreme Court of Minnesota.
August 1, 1969.
*759 Douglas M. Head, Atty. Gen., St. Paul, John C. Arko, County Atty., Keith M. Brownell, Asst. County Atty., Duluth, for St. Louis County Welfare Dept.
Hultstrand, Abate & Wivoda, Hibbing, for Seffrie Ben Niemi.
Smith & Munro, and Bernard P. Becker, Minneapolis, for Deward and Shirley Greenwood.
Heard before KNUTSON, C. J., and NELSON, SHERAN, PETERSON and FRANK T. GALLAGHER, JJ.

OPINION
PETERSON, Justice.
These are consolidated appeals from a judgment and an order of the District Court of St. Louis County granting continued physical custody of a neglected minor child to her foster parents and not to her natural parents, contrary to the recommendations of the county welfare board having legal custody of the child.
The minor child is Angela Marie Greenwood, born September 14, 1964. Her natural parents are Deward and Shirley Greenwood, who were married in April 1960. The Greenwoods have three other minor children and another child who was born to Mrs. Greenwood before her marriage. Due in part to problems of alcoholism and irregular employment, the Greenwood marriage deteriorated and the children were neglected. The neglect of Angela was the most serious. She was taken to a hospital by relatives on November 15, 1965, as an emotionally and physically sick child. She was severely malnourished and anemicweighing only as much as a 5-month-old infant; her skin was dirty, excoriated, and infected; and she was withdrawn and nonresponsive to her surroundings. An attending physician described her as acting "the way an animal acts in a cage."
The St. Louis County Welfare Board contemporaneously filed a neglect petition in juvenile court. On January 21, 1966, pursuant to stipulation between the parents and the welfare board, the court adjudged the children neglected and ordered legal custody of Angela transferred to the welfare board. The other children were initially placed only under the board's protective supervision, but by a subsequent order they, too, were placed in its legal custody.
Seffrie Ben and Jessie Niemi, who have served as licensed foster parents in Hibbing, Minnesota, for several years, became Angela's temporary, nonadoptive foster parents pursuant to a placement agreement *760 with the welfare board. The excellence of the foster care given by the Niemis is undisputed. As a result of their loving and patient care, the child steadily healed in mind and body. Unhappily, a strong bond of personal attachment developed between the Niemis and Angela, which led to their efforts to adopt the child.
The St. Louis County Welfare Board accordingly asked the Niemis to return Angela, presumably for transfer to a different foster home. The Niemis refused, notwithstanding their contractual and statutory obligation. Minn.St. 257.07 provides:
"Every person placing a child in a foster home shall enter into a written agreement with the person taking the child, which agreement shall provide that the person placing the child shall have access at all reasonable times, to such child and to the home in which he is living, and for the return of the child by the person taking him when, in the opinion of the person placing such child or in the opinion of the commissioner of public welfare, the best interests of the child shall require it. The provisions of this section shall not apply to children who have been legally adopted."
The board accordingly petitioned the district court for a writ of habeas corpus, which was granted. At that time, however, the Niemis and the welfare board entered into a "stipulation of withdrawal," by the terms of which the board was to retain legal custody and the Niemis were allowed to keep Angela "until further order of the St. Louis County Juvenile Court."
The Greenwoods, meanwhile, had moved to Minneapolis, where their personal and economic situation underwent marked improvement. The St. Louis County Welfare Board had petitioned the District Court of St. Louis County for a termination of the Greenwoods' parental rights in January 1967, for reasons not now important. The petition was denied, but legal custody of all of the children was continued in the St. Louis County Welfare Board. On September 13, 1967, legal custody of all the children was again continued in the St. Louis County Welfare Board, but physical custody was ordered returned to the natural parents, subject to the protective supervision of the Hennepin County Welfare Department. The Niemis, however, refused to comply with the order returning Angela to her natural parents.
The original habeas corpus proceeding was then "revived" and heard by agreement of the parents that the board would proceed under the original writ without the necessity of issuing a new writ. The district court, after hearing, quashed the writ of habeas corpus and allowed the Niemis to retain physical custody of Angela. The St. Louis County Welfare Board appeals from that decision.
Following the decision in the habeas corpus proceeding, the juvenile court upon its own motion set a hearing for February 23, 1968, to amend its order of September 13, 1967, to except Angela from its provisions transferring physical custody of the children to their parents. The Niemis then filed a motion for an order amending the September 13, 1967, order to except Angela from the custody award and to grant her physical custody to themselves. This motion was also heard February 23, 1968, and on February 29 the juvenile court, taking notice of the habeas corpus proceedings and incorporating all of the evidence adduced at the hearing therein, and contrary to the recommendations of the welfare board, made findings and ordered that Angela not be returned to her natural parents. The Greenwoods appeal from that order.
1. In adjudicating the issues in neglected children cases, the courts must effectuate the purposes of the Juvenile Court Act. The primary purpose, of course, is to insure the welfare of the child. As stated in Minn.St. 260.011, subd. 2, the state seeks to secure for each child "the care and guidance, preferably in his own home, as will serve the spiritual, emotional, mental, *761 and physical welfare of the minor and the best interests of the state." The natural home, as noted, is the preferred place for the child. The same section states that the purpose of the Act is to "preserve and strengthen the minor's family ties whenever possible, removing him from the custody of his parents only when his welfare or safety and protection of the public cannot be adequately safeguarded without removal." Even where the child has been removed from his home, the ultimate return of the child to his home continues to be the statutory purpose, except where parental rights have been permanently terminated. Section 260.221 clearly contemplates that continuing effort shall be made to rehabilitate the parents. The drastic sanction of permanent termination of parental rights may not be made without a finding, as required by § 260.221, "[t]hat following upon a determination of neglect or dependency, reasonable efforts, under the direction of the court, have failed to correct the conditions leading to the determination." Section 260.191, subd. 2, it should be noted, limits any order relating to protective supervision or legal custody to a maximum period of 1 year, with periodic review until the child is no longer a minor or until other disposition is made. The statute, moreover, contemplates that the efforts of rehabilitation shall be the responsibility of specialized agencies rather than individuals. Section 260.191 notably provides that a neglected child may be placed under the protective supervision, or transferred to the legal custody, of the welfare board or a child placement agency, without any statutory authorization for transfer of legal custody to individuals. A foster home, important as it is, is a custodial arrangement subordinate to the stated responsibility of the state for the child and his natural family. See, § 257.07.
2. The Niemis, as licensed foster home parents, have no standing to litigate the disposition of a neglected child placed in their home by the legal custodian either in habeas corpus proceedings or in proceedings in the juvenile court. The Juvenile Court Act confers specialized responsibility upon the welfare board. However, we do not foreclose the court itself from calling the foster parents to testify or requesting the guidance of other state agencies in aid of its own responsibility to determine what custody arrangements will further the best interests of the child. The scope of judicial discretion is to be measured, nonetheless, by the legislative objective that the minor child shall, absent compelling circumstances to the contrary, be returned to the custody of adequately rehabilitated natural parents. Any arrangement which permits the bonds formed between the child and its temporary custodians to frustrate any hope for permanent restoration to the natural family is inconsistent with the primary statutory objective. In situations where natural parents are found to be without reasonable hope of rehabilitation, the statutory answer is a judicial termination of parental rights. But the record of this case discloses that this is not the situation.
A child placed in a foster home must be returned to the legal custodian upon the latter's request. The habeas corpus proceeding, except to enforce compliance with the state's lawful demand for custody of the child, should not be used as a substitute method for adjudicating matters within the province of the juvenile court. The trial court relied upon State ex rel. Evangelical Lutheran Kinderfreund Society of Minnesota v. White, 123 Minn. 508, 144 N.W. 157, for the proposition that the trial court may act as it did "when new facts materially affecting the child's interests have occurred subsequently to prior adjudication concerning its custody." Whatever the soundness of White in situations where the juvenile court is in substance a probate court, Minn.St. 260.021, we do not think that it is sound where the district court is itself the juvenile court. The decision in the habeas corpus proceeding accordingly must be reversed.
*762 3. The appeal from the order of the district court, in its capacity as juvenile court, brings into focus the merits of its decision withholding physical custody from Angela's natural parents. The district court had jurisdiction to amend its own order, upon its own motion, and to make findings upon the evidence adduced. Its findings, as far as they went, fully reflect the Greenwoods' past situation, so serious that a court might at that time have doubted the possibility of rehabilitation. They do not, however, fully reflect the Greenwoods' present situation, as to which there is evidence of substantial rehabilitation, enough to have had the older, healthier children returned to them. If the statutory purpose of returning neglected children to their natural parents is to be effectuated, the trial court should fully consider the "new" evidence of rehabilitation and not give undue weight to the "old" evidence of neglect.
We are aware that the transfer of any child of such tender age from her foster parents to her natural parents may well produce a temporary shock, a painful transition that can only be compensated by the ultimate benefit for the child in growing up in the natural family unit of her parents, brother, and sisters. We are not unaware of the medical testimony that a return of Angela to her natural parents, in the event their rehabilitation was not enduring, could have a most serious effect upon her, different from such temporary shock and different from any such potential consequences to the older children. Were that the court's concern, consideration might have been given to the placement of Angela in the more neutral environment of another foster home in the Twin City area, where the Greenwoods, pending their progressive rehabilitation, would have the opportunity of regular visitation as they strove to reestablish the family relationship.
We reverse the order of the juvenile court and remand the matter to the juvenile court for the taking of evidence and the making of findings not inconsistent with our opinion as to the primacy of the purposes and procedures of the Juvenile Court Act.
Judgment reversed (41274) and order reversed and remanded (41363).
