(a) The court shall hold a detention hearing:
(1) within 36 hours of the time the child was taken into custody, excluding Saturdays, Sundays, and holidays, if the child is being held at a juvenile secure detention facility or shelter care facility; or
(2) within 24 hours of the time the child was taken into custody, excluding Saturdays, Sundays, and holidays, if the child is being held at an adult jail or municipal lockup.
(b) Unless there is reason to believe that the child would endanger self or others, not return for a court hearing, run away from the child's parent, guardian, or custodian or otherwise not remain in the care or control of the person to whose lawful custody the child is released, or that the child's health or welfare would be immediately endangered, the child shall be released to the custody of a parent, guardian, custodian, or other suitable person, subject to reasonable conditions of release including, but not limited to, a requirement that the child undergo a chemical use assessment as provided in section 260B.157, subdivision 1, and a children's mental health screening as provided in section 260B.176, subdivision 2, paragraph (e). In determining whether the child's health or welfare would be immediately endangered, the court shall consider whether the child would reside with a perpetrator of domestic child abuse.
If the court determines that the child should continue in detention, it may order detention continued for eight days, excluding Saturdays, Sundays and holidays, from and including the date of the order. Unless a motion to refer the child for adult prosecution is pending, a child who has been detained in an adult jail or municipal lockup and for whom continued detention is ordered, must be transferred to a juvenile secure detention facility or shelter care facility. The court shall include in its order the reasons for continued detention and the findings of fact which support these reasons.
Copies of the court's order shall be served upon the parties, including the supervisor of the detention facility, who shall release the child or continue to hold the child as the court orders.
When the court's order is served upon these parties, notice shall also be given to the parties of the subsequent reviews provided by subdivision 4. The notice shall also inform each party of the right to submit to the court for informal review any new evidence regarding whether the child should be continued in detention and to request a hearing to present the evidence to the court.
If a child held in detention under a court order issued under subdivision 2 has not been released prior to expiration of the order, the court or referee shall informally review the child's case file to determine, under the standards provided by subdivision 1, whether detention should be continued. If detention is continued thereafter, informal reviews such as these shall be held within every eight days, excluding Saturdays, Sundays and holidays, of the child's detention.
A hearing, rather than an informal review of the child's case file, shall be held at the request of any one of the parties notified pursuant to subdivision 3, if that party notifies the court of a wish to present to the court new evidence concerning whether the child should be continued in detention or notifies the court of a wish to present an alternate placement arrangement to provide for the safety and protection of the child.