Petitioner filed a petition for writ of habe-as corpus and tMs court ordered a response. The attorney general responded and this court considered both in reaching its decision to grant the writ and require the immediate release of the petitioner. This opimon explains the reason for the granting of the writ.
At issue was the authority of the court to order the secure detention of a juvenile who had been found guilty of a delinquent act. Here, the court found the child guilty of “loitering or prowling,” withheld adjudication *1193of delinquency and ordered a disposition hearing twelve days later.
At the same time the finding of guilt was made, another order was rendered, finding: “There is probable cause [sic] that the child is () delinquent; () in contempt of court; OR the child has been found guilty of committing (7) a delinquent act; () contempt of court.” And as a reason for taking him into custody was the statement: “... (7) child was taken into custody in Open Court; ...”
Our review of the applicable statutes leads to the conclusion that the detention of this child was not done in a lawful manner. Section 39.042(1), Florida Statutes (1993) requires:
(1) All determinations and court orders regarding the use of secure, nonsecure, or home detention shall be based primarily upon findings that the child:
(a) Presents a substantial risk of not appearing at a subsequent hearing;
(b) Presents a substantial risk of inflicting bodily harm on others as evidenced by recent behavior;
(c) Presents a history of committing a serious property offense prior to adjudication, disposition, or placement; or
(d) Requests protection from imminent bodily harm.
There was no compliance with that statute. Further, there was no demonstration that subsections (2) and 3(a) were followed. Subsection (2) requires:
A child shall not be placed into detention care, whether secure, nonsecure, or home detention care, if appropriate less restrictive placement alternatives are available.
Subsection (3)(a) requires:
All determinations and court orders regarding placement of a child into detention care shall comply with all requirements and criteria provided in this part and shall be based on a risk assessment of the child.
Finding no legal reason for the secure detention of this child, we note the statutorily prohibited uses of detention for those juveniles yet to be found guilty of delinquent acts, as set out in section 39.043. Although that statute concerns those juveniles only alleged to be guilty, some guidance may be gained from legislative intent regarding the issue of secure detention.
We have considered H.L. v. Woolsey, 618 So.2d 268 (Fla. 1st DCA 1993), as cited by the state, but find it to be inapplicable because there the judge made a finding that the child might fail to appear in court later.
It is our determination that all orders of detention must be based upon record-supported written findings in compliance with section 39.042(1).
It is so ordered.
COBB, J., concurs. THOMPSON, J., concurs specially with opinion.