
596 So.2d 1181 (1992)
S.J., a Child and J.F., a Child, Petitioners,
v.
STATE of Florida, et al., Respondents.
No. 92-665, 92-688.
District Court of Appeal of Florida, Fifth District.
April 3, 1992.
*1182 Joseph W. DuRocher, Public Defender, and Patti Zimmerman, Asst. Public Defender, for petitioners.
Robert Butterworth, Atty. Gen., Tallahassee, and Belle B. Turner, Asst. Atty. Gen., Daytona Beach, for respondent State of Florida.
David A. Ford, Deputy Dist. Legal Counsel, Dept. of Health and Rehabilitative Services, Orlando, for respondent Dept. of Health and Rehabilitative Services.
W. SHARP, Judge.
S.J. and J.F. filed petitions for writ of habeas corpus. We consolidate them for disposition because they involve similar issues: can a child be detained pursuant to section 39.044 prior to an adjudicatory hearing, if the child is ineligible for detention pursuant to the risk management assessment and the criteria specified in section 39.044(2); and the only basis for continued detention is the child's failure to appear at arraignment and a resulting pending charge of indirect criminal contempt of court for failure to appear? The petitioners argue they are entitled to immediate release because their continued detention under these circumstances is illegal. We agree.[1]
In each of these cases the petitioner was alleged to have committed a delinquent act or acts. S.J. allegedly committed a trespass in an occupied structure. J.F. allegedly committed two petit thefts. Both petitioners failed to appear at arraignment. A show cause order for contempt and a custody order issued in each case for the failure to appear, and they were subsequently taken into custody.
Detention hearings were held, pursuant to section 39.044, Fla. Stat. (1991). In S.J.'s case, the court found probable cause the child was delinquent and probable cause that he was in contempt of court for failure to appear. The judge continued the detention for both reasons. As to J.F., the court found probable cause that the child was delinquent, and continued the detention without further reference to the contempt charge. In both cases, the risk assessment instrument prepared for each child showed that neither met any of the detention criteria.
The purpose of the detention hearing is to determine the existence of probable cause that the child has committed the delinquent act or violation of law with which he is charged and to determine the need for continued detention. See § 39.044(2)(d), Fla. Stat. (1991). At the detention hearing, the court must utilize the results of the risk assessment instrument prepared by the intake counselor or case manager. § 39.042(3)(a), Fla. Stat. (1991). Based on the criteria listed in section 39.044(2), the court must determine the need for continued detention.
If the court orders a placement in detention more restrictive than that indicated by the results of the risk assessment instrument, the court must state in writing clear and convincing reasons for such placement. None were stated in these two cases other than an allegation or inference that that *1183 child was probably guilty of contempt of court for failure to appear.
Section 39.044(2) specifies the exclusive criteria to be considered at the detention hearing for continued detention. It provides:
(2) Subject to the provisions of subsection (1), a child taken into custody and placed into nonsecure or home detention care or detained in secure detention care prior to a detention hearing may continue to be detained by the court if:

(a) The child is alleged to be an escapee or an absconder from a commitment program, a community control program, furlough, or aftercare supervision, or the child is wanted in another jurisdiction for an offense which, if committed by an adult, would be a felony;
(b) The child has been charged with a delinquent act or violation of law and requests in writing through legal counsel to be detained for protection from an imminent physical threat to his personal safety;
(c) The child is charged with a capital felony, life felony, felony of the first degree, felony of the second degree, or a felony that is also a crime of violence; or
(d) The child is charged with a serious property crime as described in s. 810.02(2) or (3) or s. 812.014(2)(c)4., any offense involving the use of a firearm, or any second-degree or third-degree felony involving a violation of chapter 893, and:

(1) He has a record of failure to appear at court hearings after being properly notified in accordance with the Rules of Juvenile Procedure;
(2) He has a record of law violations prior to court hearings;
(3) He has already been detained or has been released and is awaiting final disposition of his case; or
(4) He has a record of violent conduct resulting in physical injury to others... . (emphasis supplied)
Section 39.042(1)(a), Florida Statutes (1991), permits a court to impose detention if it finds there is a substantial risk of not appearing at a subsequent hearing. However, under section 39.044(2), Florida Statutes (1991), the court may not consider a child's past record of failing to appear at court hearings unless he has been charged with a serious property crime, an offense involving the use of a firearm, or any second-degree or third-degree felony involving a violation of Chapter 893. See § 39.044(2)(d)1, Fla. Stat. (1991).
This court held that a juvenile who fails to comply with a court order may be punished for indirect criminal contempt by incarceration in a juvenile detention center. See B.P. v. State, 588 So.2d 39 (Fla. 5th DCA 1991). However, that case involves the proper punishment of a juvenile found in contempt, not the proper placement of a juvenile awaiting a contempt hearing. See also A.A. v. Rolle, 580 So.2d 282 (Fla. 3d DCA 1991) (trial court did not err in punishing juvenile adjudicated to be in contempt of court by ordering incarceration in juvenile detention center).
Section 39.044(10), Florida Statutes (1991), authorizes detention for contempt of court, but lists several due process rights that must be provided. In Department of Health and Rehabilitative Services v. State of Florida, et al., Case Nos. 91-269, etc., (Fla. 5th DCA March 27, 1992), this court agreed with the Second District Court of Appeal in L.M. v. State, 592 So.2d 1210 (Fla. 2d DCA 1992), which stated that detention based solely on contempt requires prior compliance with the procedural requirements of section 39.044(10). Those due process rights include legal representation, a court hearing and notice of the charges before the hearing, an explanation of the nature and consequences of the proceeding, the right to present and confront witnesses, a transcript or record of the proceedings, and the right to appeal. No effort to follow section 39.044(10) was made in the cases of S.J. or J.F.
The facts in W.N. v. Fryer, 572 So.2d 24 (Fla. 4th DCA 1990), are similar to to those in the instant cases. In Fryer, a child was arrested for trespassing. He subsequently failed to appear at a court hearing and was taken into custody. At the detention hearing, the judge continued the child's secure detention. No evidence was presented other *1184 than that the child had been arrested on a "pick-up order" for failing to appear at a court ordered hearing. The child then filed a petition for writ of habeas corpus.
The Fourth District said that section 39.037 provides that a child may be taken into custody for failing to appear at a court hearing. However, the court noted that section 39.037 states that it shall not be construed to allow the detention of a child not meeting the detention criteria in section 39.044. The Fourth District held in Fryer that since none of the criteria in section 39.044(2) applied to this child, the court should not have continued the detention.
These two cases are indistinguishable from Fryer. In the absence of findings supporting continued detention or the criteria specified in section 39.044, the petitioners are entitled to immediate release if they continue to be held under any form of detention and are still awaiting an adjudicatory hearing. Although J.F.'s petition is now moot, we grant the writ as to S.J. and direct his immediate release unless he has been afforded an adjudicatory hearing.
Petition for Writ of Habeas Corpus GRANTED.
COBB and PETERSON, JJ., concur.
NOTES
[1]  It appears that J.F. entered guilty pleas subsequent to the filing of his petition and as to him, the issue of illegal detention is moot. Nevertheless, we elect to address the issues raised in his petition. Cf. Z.R. v. State, 596 So.2d 723 (Fla. 5th DCA 1992); W.N. v. Fryer, 572 So.2d 24 (Fla. 4th DCA 1990).
