A child taken into custody pursuant to section 260C.175 may be detained for up to 24 hours in a shelter care facility, secure detention facility, or, if there is no secure detention facility available for use by the county having jurisdiction over the child, in a jail or other facility for the confinement of adults who have been charged with or convicted of a crime in quarters separate from any adult confined in the facility which has been approved for the detention of juveniles by the commissioner of corrections. At the end of the 24-hour detention any child requiring further detention may be detained only as provided in this section.
Notwithstanding the provisions of subdivision 1, if the child had been taken into custody pursuant to section 260C.175, subdivision 1, clause (1) or (2), item (ii), and is not alleged to be delinquent, the child shall be detained in the least restrictive setting consistent with the child's health and welfare and in closest proximity to the child's family as possible. Placement may be with a child's relative, a designated caregiver under chapter 257A, or in a shelter care facility. The placing officer shall comply with this section and shall document why a less restrictive setting will or will not be in the best interests of the child for placement purposes.
If the child had been taken into custody and detained as one who is alleged to be in need of protection or services under section 260C.007, subdivision 6, clause (13) or (14), by reason of having been adjudicated, in need of protection or services under section 260C.007, subdivision 6, clause (13) or (14), or conditionally released by the juvenile court without adjudication, has violated probation, parole, or other field supervision under which the child had been placed as a result of behavior described in this subdivision, the child may be placed only in a shelter care facility.