
963 So.2d 310 (2007)
N.S., a child, Petitioner,
v.
Anthony FLOWERS, Superintendent, Palm Beach Regional Juvenile Detention Center, Respondent.
No. 4D07-3030.
District Court of Appeal of Florida, Fourth District.
August 14, 2007.
Carey Haughwout, Public Defender, and Daniel Cohen, Matthew Blust and Lindsey Hanson, Assistant Public Defenders, West Palm Beach, for petitioner.
Bill McCollum, Attorney General, Tallahassee, and Daniel P. Hyndman, Assistant Attorney General, West Palm Beach, for respondent.
PER CURIAM.
N.S., a juvenile, petitions this court for a writ of habeas corpus, contending that she is being unlawfully detained in secure detention despite a risk assessment instrument (RAI) score of zero. The trial court did not give written reasons for ordering N.S.'s more restrictive placement. A trial court is required to provide written reasons if it orders a more restrictive placement than indicated by the RAI. See § 985.255(2), (3)(b), Fla. Stat. (2006); M.P. v. Gardner, 838 So.2d 711, 713 (Fla. 4th DCA 2003); T.D.S. v. State, 922 So.2d 346 (Fla. 5th DCA 2006). Accordingly, the petition for writ of habeas corpus is hereby granted. The circuit court shall immediately release N.S. from secure detention. It may revisit the issue and enter written findings that would support N.S.'s continued detention if there is a basis to do so. See D.B. v. State, 848 So.2d 1219 (Fla. 3d DCA 2003).
STONE, WARNER and STEVENSON, JJ., concur.
