(1) If an authorized agent of the department has reasonable grounds to believe that any delinquent child committed to the department has escaped from a residential commitment facility or from being lawfully transported thereto or therefrom, or has absconded from a nonresidential commitment facility, the agent may take the child into active custody and may deliver the child to the facility or, if it is closer, to a detention center for return to the facility. However, a child may not be held in detention longer than 24 hours, excluding Saturdays, Sundays, and legal holidays, unless a special order so directing is made by the judge after a detention hearing resulting in a finding that detention is required based on the criteria in s. 985.255. The order shall state the reasons for such finding. The reasons shall be reviewable by appeal or in habeas corpus proceedings in the district court of appeal.
(2) Any sheriff or other law enforcement officer, upon the request of the secretary of the department or duly authorized agent, shall take a child who has escaped from a residential commitment facility or from being lawfully transported thereto or therefrom, or has absconded from a nonresidential commitment facility, into custody and deliver the child to the appropriate juvenile probation officer.