An apparent or alleged child in need of supervision taken into temporary custody by a law enforcement officer prior to a temporary custody hearing shall be released to the child's parents, guardian, or custodian unless the parents, guardian, or custodian cannot be located or in the judgment of the intake officer are not suitable to receive the child, in which case the child shall be placed in shelter. A child may be placed in detention for no more than twenty-four hours, excluding Saturdays, Sundays, and court holidays, if the intake officer finds that the parents, guardian, or custodian are not available or are not suitable to receive the child, and finds at least one of the following circumstances exists:
The shelter or detention authorized shall be the least restrictive alternative available. The child may be held in detention up to an additional twenty-four hours following the temporary custody hearing pending transfer to shelter or release.
If the child is accused of or has been found in violation of a valid court order, the child may be placed in detention for more than twenty-four hours, if a temporary custody hearing, pursuant to § 26-7A-14, is held within twenty-four hours of the child being placed in a detention facility, an interview is conducted with the child, a written assessment of the child's immediate needs is provided at the temporary custody hearing, and a written order is issued that identifies the violated court order, determines detention is the best available placement, specifies the length of time the child is to be held in detention, and outlines the plan for release of the child from detention. The interview and assessment may be conducted by law enforcement, states attorney, court services, or other public employee. The child may not be held in detention more than seven days.
If the child is being held for another jurisdiction as a parole or probation violator, as runaway or as a person under court-ordered detention, the child may be placed in detention for more than twenty-four hours, and up to seven days, if a temporary custody hearing, pursuant to § 26-7A-14, is held within twenty-four hours of the child being placed in a detention facility.
SDCL 26-8B-3