The minor was adjudged a dependent child under Welfare and Institutions Code section 300 because mother was serving a four-year-prison sentence; he was placed with foster parents who wished to adopt him. However, as the initial foster parents were not yet approved as adoptive parents, the Department removed the minor and placed him in a different home. Prior to the section 366.26 hearing, mother relinquished the minor to a private adoption agency with the understanding that he would be placed with the initial foster parents. The juvenile court held that the relinquishment was invalid, and mother and the initial foster parents petitioned for a writ of habeas corpus. Here, the appellate court issued the writ invalidating the order, since the court mistakenly held that mother could not relinquish the minor to a private agency. A birth parent may relinquish a dependent child to a private adoption agency. However, the juvenile court retains the power to limit the parent’s control, including the parent’s ability to relinquish the child to a private agency. The juvenile court must act in the child’s best interest. Therefore, the case was remanded to determine whether the relinquishment was in the minor’s best interest.