#### W.H., a Child, Petitioner, the Denver Department of Social Services, Co-Petitioner, v. The JUVENILE COURT, City and County of Denver, State of Colorado, and the Honorable James C. Flanigan, Visiting Judge Thereof, Respondents.

No. 87SA40.

Supreme Court of Colorado, En Banc.

April 13, 1987.

Charles L. Darby, Denver, Guardian Ad Litem for petitioner.

Stephen H. Kaplan, City Atty., Leah L. Audin, Bernard W. Messer, Asst. City At-tys., Denver, for co-petitioner.

*192Gale A. Drexler, Denver, for Mother of W.H.

YOLLACK, Justice.

The petitioners in this original proceeding, W.H., by and through his guardian ad litem, and the Denver Department of Social Services [hereinafter DSS], seek relief pursuant to C.A.R. 21(a) in the nature of prohibition against the respondent juvenile court, in connection with the court’s order granting temporary physical custody of W.H. to his mother. We issued a rule to show cause why the juvenile court’s order should not be reversed. We now make the rule absolute.

I.

The petitioner, W.H., is a nine-year-old child who has been living with his mother and stepfather in Colorado since the summer of 1986. On January 21, 1987, W.H. failed to return home after school and was reported as a lost child. He was taken into protective custody by the Denver Police Department, and an officer discovered extensive bruising which covered most of W.H.’s left arm. The child reported to the officer that his stepfather had caused the injury by hitting him with a plastic bat. W.H. was taken to the Family Crisis Center, and gave the same explanation to a social worker, a physician, and a police detective the next day. Upon examination, they found extensive bruises of various ages on the child’s back, buttocks, legs, and arms. According to expert testimony, these injuries were the result of nonacci-dental trauma, i.e., child abuse. W.H.’s mother and stepfather were notified that W.H. was in the protective custody of DSS.

On January 23, 1987, the statutorily required detention hearing was held, at which time a dependency or neglect petition was filed and a guardian ad litem appointed for W.H. The parties stipulated at this time that the child would remain in the temporary custody of DSS pending a full detention hearing.

On the date of the full detention hearing, a retired judge was acting in the capacity of the Denver Juvenile Court Commissioner.1 At the hearing before the visiting judge, several parties testified and evidence was introduced. At the conclusion, the judge made findings of fact, held that abuse of the minor had not been established, and entered an order returning temporary physical custody of W.H. to his mother and stepfather. DSS and the guardian ad litem sought a stay of the visiting judge’s order. Within the next three days, they filed a Petition for Judicial Review and a Motion for Rehearing. The judge who would ordinarily have reviewed a commissioner’s orders recused himself because of a conflict of interest. The case was reassigned for review to the presiding judge of the Denver Juvenile Court. The presiding judge declined to review the visiting judge’s order because, although the visiting judge was sitting as a commissioner, his status as a judge rendered it inappropriate for the presiding judge to review his order.2 DSS and the guardian ad litem sought relief in this court pursuant to C.A.R. 21(a), and we issued a show cause order to determine whether the visiting judge erred. We now make the rule absolute.

*193II.

The procedural provisions of the Children’s Code control the proceedings at issue. If a law enforcement officer, physician, county department, or hospital administrator (1) reasonably believes that a child has been abused or neglected, and (2) believes that there is “a danger to that child’s life or health in the reasonably foreseeable future” by returning the child to the same person or residence, judicial authorization can be obtained to take a child into temporary protective custody. § 19-10-107, 8B C.R.S. (1986). A law enforcement officer also can take a child into temporary custody, without court order, if the child is lost, abandoned, or seriously endangered in his surroundings, and immediate removal appears necessary for the child’s protection. § 19-2-101(l)(b), 8B C.R.S. (1986). Either way, the code requires notice to the child’s parent or guardian that the child has been placed in detention, and that the parent or guardian has the right to a prompt hearing. §§ 19-2-103(2), 19-10-107, 8B C.R.S. (1986).

The statutorily required temporary custody hearing is sometimes described as a shelter or detention hearing, and we have held that the word “detention” as used in section 19-2-103(2) is being used “in a generic and non-technical sense to refer to both ‘shelter custody’ and custody resulting from probable cause to believe the child has committed an act of delinquency.” *S.L. v. District Court,*676 P.2d 12, 14 n. 5 (Colo.1984); *P.F.M. v. District Court,*184 Colo. 393, 397, 520 P.2d 742, 744 (1974). The shelter or detention hearing is a pre-adjudicatory procedure which “arises from exigencies requiring *temporary emergency measures*designed to *protect*the *welfare of the child*pending further judicial proceedings.” *S.L.,*676 P.2d at 16 (emphasis added). The applicable test at the hearing is “whether the welfare of the child or of the community require that the ‘detention’ ” or shelter continue. *P.F.M.,*184 Colo. at 397, 520 P.2d at 744. The purpose of a shelter or detention hearing is not to determine a parent’s legal interest in the child; the purpose of a shelter hearing is to ensure the minor’s safety and welfare prior to adjudication.3

As such, a shelter or detention hearing must be distinguished from a dependency or neglect adjudicatory hearing. “The primary purpose of a dependency adjudication ... is to furnish the ‘jurisdictional bases for State intervention to assist the parents and child in establishing a relationship and home environment that will preserve the family unit.’ ” *People in Interest of O.E.P.,*654 P.2d 312, 317 (Colo.1982) (quoting *People in Interest of A.M.D., 648*P.2d 625, 640 (Colo.1982)). At an adjudicatory hearing, the determination to be made is “whether the facts show, by a preponderance of the evidence, that the child is in fact neglected and dependent.” *People in Interest of K.S.,*33 Colo.App. 72, 75, 515 P.2d 130, 132 (1973).

If a child is adjudicated as dependent or neglected, the next step is a separate and distinct dispositional hearing. § 19-3-111, 8B C.R.S. (1986). At the dispositional hearing, the juvenile court is authorized to make alternative dispositions, depending on the best interests of the child. *K.S.,*33 Colo.App. at 75-76, 515 P.2d at, 132. The court does not have authority to terminate the parent-child legal relationship until the dispositional stage, after a child has already been adjudicated to be neglected or dependent. § 19-3-111(2, 3), 8B C.R.S. (1986).

III.

The record here reveals that the visiting judge used the standards applicable to an adjudicatory hearing at the shelter or detention hearing before him. The purpose of the hearing from which petitioners seek relief was to determine whether continued temporary shelter, away from

*194the mother and stepfather, was m the best interest of W.H. and necessary for his welfare. Rather than basing his decision on whether continued temporary protective custody was in the best interest of the child, the judge applied the standards for an adjudicatory hearing. He made specific findings that allegations set forth in the dependency or neglect petition had not been established. A comparison of paragraph 5, sections (a-f) of the dependency or neglect petition on which the judge based his ruling with the language of the judge’s order4 leaves no question that the judge applied the standard required at the adjudicatory stage of a dependency or neglect action5 to this pre-adjudicatory hearing.

The applicable test for deciding whether to continue a child’s shelter or “detention” at the pre-adjudication shelter hearing is whether temporary protective custody is necessary for protection of the child’s welfare and best interest. This standard is much different than the test applied in deciding whether a petition in dependency or neglect has been sustained.

Based on the facts before him, and the application of an erroneous legal standard, the judge ordered that W.H. be returned to his mother and stepfather. Because the visiting judge applied the wrong standard at the shelter or detention hearing, we make the rule absolute and remand for a rehearing applying the appropriate standard for temporary protective custody.

1

. The retired judge was acting pursuant to article VI, section 5(3), of the Colorado Constitution, which states in pertinent part:

> Whenever the chief justice deems assignment of a judge necessary to the prompt disposition of judicial business, he may: ... (b) assign any district, probate, or juvenile judge, or retired justice or district, probate, or juvenile judge who consents, temporarily to perform judicial duties in any court.

1A C.R.S. (1980).

2

. This decision by the presiding judge was based on section 13-8-113, which states:

> Judges to sit separately. In the juvenile court, each of the judges shall sit separately for the trial of cases and the transaction of judicial business, and each of the courts so held shall be known as the juvenile court. Each judge shall have all of the powers which he might have if he were the sole judge of the court, including the power to vacate his own judgments, decrees, or orders, or those of a predecessor when permitted by law, but not juvenile court orders of another judge of the juvenile court who is still in office.

§ 13-8-113, 6 C.R.S. (1973).

3

. In *S.L.,*we held that the juvenile court, at a pre-adjudicatory shelter hearing, could only change physical custody, not legal custody. After that decision, the legislature amended the code with a provision that permits the juvenile court to issue temporary orders for legal custody at a pre-adjudicatory hearing. § 19-2-103(8), 8B C.R.S. (1986) (effective April 5, 1984). This distinction is not pertinent to the case at bar.

4

. Paragraph 5 of the petition in dependency or neglect set forth the following allegations:

> 5. The child is dependent or neglected for the following reasons:

> (a) That his parent, guardian or legal custodian has abandoned him or subjected him to mistreatment or abuse, or has suffered or allowed another to mistreat or abuse the child without taking lawful means to stop such mistreatment or abuse and prevent it from recurring;

> (b) That he lacks proper parental care through the actions or omissions of the parent, guardian or legal custodian;

> (c) That his environment is injurious to his welfare;

> (d) That his parent, guardian or legal custodian fails or refuses to provide proper or necessary subsistence, education, medical care or any other care necessary for his health, guidance or well-being;

> (e) That said child is homeless, without proper care or not domiciled with his parent, guardian or legal custodian; through no fault of such parent, guardian or legal custodian.

> (f) That said child has run away from home or is otherwise beyond the control of his parent, guardian or legal custodian.

The judge’s order was based on the following findings:

> I do not find that this child has been abandoned in any way, nor has he been subjected to maltreatment or abuse under the statute; that there’s not a lack of proper parental care or omission on the part of the mother or the stepfather. The environment is good, and ... this youngster is receiving proper care and subsistence. I do not find that this youngster is beyond the control of the mother or the stepfather, or that he has run away from home.

5

. The statute defines a dependent or neglected child as the following:

> (20) "Neglected or dependent child” or "dependent or neglected child" means a child:

> (a) Whose parent, guardian, or legal custodian has abandoned him or has subjected him to mistreatment or abuse or whose parent, guardian, or legal custodian has suffered or allowed another to mistreat or abuse the child without taking lawful means to stop such mistreatment or abuse and prevent it from recurring;

> (b) Who lacks proper parental care through the actions or omissions of the parent, guardian, or legal custodian;

> (c) Whose environment is injurious to his welfare;

> (d) Whose parent, guardian, or legal custodian fails or refuses to provide proper or necessary subsistence, education, medical care, or any other care necessary for his health, guidance, or well-being;

> (e) Who is homeless, without proper care, or not domiciled with his parent, guardian, or legal custodian through no fault of such parent, guardian, or legal custodian;

> (f) Who has run away from home or is otherwise beyond the control of his parent, guardian, or legal custodian.

§ 19-1-103(20), 8B C.R.S. (1986).