The relative placement preference under section 361.3 does not apply to a relative’s request for placement after the juvenile court has held a section 366.26 hearing and the child remains in foster care pursuant to section 366.26, subd. (b)(7). Y.M. had four children who were dependents of the juvenile court, two girls and two boys. The girls were placed together in a foster home of the Z.’s, and the boys in a different foster placement. Y.M. identified the children’s great aunt (Aunt) as a possible placement for the children. The 366.26 hearing was delayed and the minors continued in their foster care placements. Aunt filed a 388 petition requesting the court place the minors in her care. The Agency supported the placement for the girls, but not for the boys, whose foster parents wanted to adopt them. At a bifurcated hearing, the court denied the 388 petition, declining to apply the relative placement preference and finding that it was not in the girls’ best interest to be placed with Aunt. At a second 366.26 hearing, the juvenile court terminated parental rights to the boys and designated their foster parents as their prospective adoptive parents. The girls were continued in their foster placement. Y.M. and Aunt appealed. The appellate court affirmed the juvenile court orders. The relative placement preference directive under section 361.3 does not apply to relatives seeking placement of a child in continued foster care pursuant to section 366.26, subdivision (b)(7). A placement request by a relative after a permanency hearing is essentially a request to modify the child’s permanent plan and must be heard under the statutory framework of sections 366.26 and 366.3. When a relative of the child files a section 388 petition requesting permanent placement of a child in continued foster care, the juvenile court must set a 366.26 hearing, which is the exclusive procedure for selecting a permanency plan. Notwithstanding the procedural problems in this case, any error in hearing the matter under section 388 was harmless. Because a permanent plan of adoption of the boys was available, the juvenile court did not have authority to order a different permanency plan. With respect to the girls, the record shows that the juvenile court applied the appropriate factors in determining the children’s best interests, including the length of time the girls had been with the Z.’s. There was ample evidence to support the reasonable inference that the girls viewed the Z.’s as their parents and that removal from their care would be detrimental.