Petitioner seeks a writ of habeas corpus, alleging that he is being wrongfully detained in secure detention. Petitioner pled to lewd and lascivious conduct on a victim less than twelve years of age, and the trial court ordered Petitioner held in secure detention while awaiting an opening in a non-secure residential commitment program. Petitioner did not score high enough for secure detention on his risk assessment instrument, and the State concedes that the trial court did not enter any written findings otherwise justifying secure detention.
Generally, determinations regarding placement of a minor in secure detention are based on the risk assessment. § 985.245(1), Fla. Stat. (2016). However, section 985.255 permits the court to otherwise order secure detention based upon *746written findings. See § 985.255, Fla. Stat. (2016). However, “[w]here a statute requires a written order giving findings and reasons, the transcript of the proceedings upon which the order was based cannot act as a substitute.” A.D. v. State, 45 So.3d 575, 576 (Fla. 4th DCA 2010) (quoting R.B.S. v. Capri, 384 So.2d 692, 696 (Fla. 3d DCA 1980)).
Although the trial court made findings of fact at the hearing sufficient to support secure detention, the trial court failed to enter a vmtten order reflecting those findings as required by statute. Therefore,- we direct the trial court to either enter a written order justifying Petitioner’s secure detention, or to order Petitioner’s release therefrom, by 5:00 p.m, on the second business day following the date of issuance of this opinion. See A.D. v. State, 45 So.3d at 576.
PETITION GRANTED.
ORFINGER, EDWARDS, and EISNAUGLE, JJ., concur.