
770 So.2d 197 (2000)
T.S., Petitioner,
v.
Monta CLEMONS, as Superintendent, Southwest Florida Juvenile Detention Center, Department of Juvenile Justice, Respondent.
No. 2D00-3125.
District Court of Appeal of Florida, Second District.
September 29, 2000.
*198 Robert R. Jacobs, II, Public Defender, and Angelique B. Agoston, Assistant Public Defender, Fort Myers, for Petitioner.
Robert A. Butterworth, Attorney General, Tallahassee, and Jonathan P. Hurley, Assistant Attorney General, Tampa, for Respondent.
PER CURIAM.
Petitioner T.S., a juvenile, filed an emergency petition for writ of habeas corpus seeking to be discharged from secure detention. By prior unpublished order, we granted the petition and advised that this opinion would follow to explain our reasoning. We conclude that, under the relevant statutory provisions, T.S.'s continued placement in secure detention was unwarranted where the point total on his risk assessment instrument (RAI) indicated placement in home or nonsecure detention and the trial court failed to provide clear and convincing written reasons for continuing to hold T.S. in secure detention.
T.S. was charged with carrying a concealed weapon (firearm) in violation of section 790.01, Florida Statutes (1999), and carrying a prohibited weapon openly in violation of section 790.053. He was placed in secure detention as authorized by section 790.22(8), and the trial court held the required detention hearing within twenty-four hours.
T.S. received a score of eleven points on the RAI prepared by the Department of Juvenile Justice (the Department) which, according to the terms of the RAI, warranted placement in home or nonsecure detention. Despite this, the Department recommended in the narrative portion of the RAI that T.S. continue to be held in secure detention due to the nature of the charges against him.
The trial court followed this recommendation and ordered T.S. to remain in secure detention. The trial court used what appears to be a form order. The order states that the court considered the results of the RAI which recommended secure *199 detention pursuant to the "gun bill." We interpret the phrase "gun bill" to be a reference to section 790.22(8). The trial court also checked the box on the order which states that "[t]he child is charged with an offense involving the possession of a firearm or charged with an offense during which he/she possessed a firearm."
T.S. argues that this order does not satisfy the statutory criteria for keeping him in secure detention. T.S. asserts that under section 790.22(8) the court may order a minor charged with possession of a firearm to continue to be held in secure detention only if the court finds that the minor meets the criteria specified in section 985.215(2), Florida Statutes (1999), or if the court finds by clear and convincing evidence that the minor is a clear and present danger to himself or the community. The court made no finding that T.S. was a clear and present danger to himself or the community. Therefore, T.S. argues, his continued detention was warranted only if he met the criteria specified in section 985.215(2).
Section 985.215(2) provides that a minor may continue to be held in secure detention by the trial court if, among other things, the minor is charged with any third-degree felony that is not also a crime of violence and the minor is found to have been in possession of a firearm. See § 985.215(2)(g)(5). Section 985.215(2) goes on to provide that "[u]nless a child is detained under paragraph (d) [involving an offense of domestic violence] or paragraph (e) [involving an offense of possession or discharging a firearm on school property]," neither of which is applicable in this case, "the court shall utilize the results of the risk assessment performed by the juvenile probation officer and, based on the criteria in this subsection, shall determine the need for continued detention." The statutory provision further states that "[i]f the court orders a placement more restrictive than indicated by the results of the risk assessment instrument, the court shall state, in writing, clear and convincing reasons for such placement." Id. (emphasis supplied).
T.S. argues that he cannot lawfully be kept in secure detention because the trial court did not state in writing clear and convincing reasons for continuing to hold him in secure detention. There is a place on the order used in this case for providing such reasons, but the trial court left it blank. T.S. asserts that because he received a score one point less than the twelve points required on the RAI for secure detention, he is entitled to be released to home detention.
We ordered a response from the State. The State asserts, without explanation, that the trial court properly followed the Department's recommendation for secure detention. We disagree. The RAI score recommends home or nonsecure detention. Section 985.215(2) states that "the court shall utilize the results of the risk assessment instrument" in determining the need for continued detention. If the "results" of the RAI means the point total, then the trial court failed to utilize those results in ordering T.S.'s continued placement in secure detention. If "results" means the Department's recommendation despite the point total, this constitutes an improper delegation to the Department of a function that the statute specifies must be performed by the court. Cf. Greenwood v. State, 754 So.2d 158, 160 (Fla. 1st DCA 2000) (holding in context of delegating supervision of conditions of probation to probation officer that court "may not delegate duties that the law requires the courts to perform").
The State also asserts that the trial court's decision to keep T.S. in secure detention was proper based on section 985.215(2)(f), Florida Statutes (1997). We assume the State means section 985.215(2)(g)(5), Florida Statutes (1999), since the 1997 version of the statute is inapplicable to this case and the section cited by the State has been amended and currently appears as section 985.215(2)(g)(5). We disagree with the *200 State and conclude that section 985.215(2)(g)(5) allows for a minor's continued placement in secure detention where the results of the RAI indicate less restrictive placement only when the trial court states in writing clear and convincing reasons for the more restrictive placement.
We recognize that section 985.215(2) states "the court shall utilize the results of the risk assessment performed by the juvenile probation officer and, based on the criteria in this subsection, shall determine the need for continued detention." It further states "[a] child placed into secure, nonsecure, or home detention care may continue to be so detained by the court pursuant to this subsection." Read in isolation, these sentences suggest that the trial court properly can continue to hold T.S. in secure detention under section 985.215(2)(g)(5) since he was charged with a third-degree felony that is not a crime of violence and was found to have been in possession of a firearm. However, the very next sentence in section 985.215(2) requires the court to provide clear and convincing written reasons for placing a minor in a form of detention more restrictive than indicated by the results of the RAI.
While we understand the trial court's possible confusion over the ambiguity of these provisions, we resolve the ambiguity by relying on general rules of statutory construction. Penal provisions must be construed in favor of the accused. Cf. Meeks v. State, 754 So.2d 101, 103 (Fla. 1st DCA 2000) (holding a "criminal statute is strictly construed in favor of the accused"), review granted, 767 So.2d 461 (Fla.2000). Moreover, a more specific statutory provision governs over a more general provision. Cf. McKendry v. State, 641 So.2d 45, 46 (Fla.1994) (holding "a specific statute covering a particular subject area always controls over a statute covering the same and other subjects in more general terms").
When construed in accordance with these principles, section 985.215(2) required the trial court to provide clear and convincing written reasons to justify T.S.'s continued placement in secure detention since such detention is more restrictive than warranted by the results of the RAI. See J.J. v. Fryer, 765 So.2d 260 (Fla. 4th DCA 2000) (concluding that "the authority to depart from an RAI and order more severe detention must be based on `clear and convincing reasons' which the trial court must state in writing") (citation omitted); T.L.W. v. Soud, 645 So.2d 1101, 1105 (Fla. 1st DCA 1994) (denying petitions for writs of habeas corpus where, although RAIs did not score for secure detention, trial judges satisfied requirement of giving clear and convincing reasons for such detention). This conclusion is supported by the terms of the RAI itself. The RAI addresses the situation where a minor is charged with a third-degree felony involving the use or possession of a firearm and assesses ten points for that charge. According to the RAI, the assessment of ten points only warrants home or nonsecure detention. Therefore, under the current version of the RAI, the fact that T.S. was charged with carrying a concealed firearm does not, by itself, warrant his continued placement in secure detention. Otherwise, the RAI would assess twelve points for this offense which would automatically authorize secure detention.
The RAI therefore suggests that something else beyond the fact that T.S. was charged with possession of a firearm is necessary to sustain his continued placement in secure detention. We conclude this "something else" is clear and convincing written reasons by the trial court as required by section 985.215(2). Otherwise, as noted, the RAI would have assessed sufficient points to warrant placement in secure detention for the offense of possession of a firearmsomething it does not do.
We have not overlooked the possibility that the notation on the trial court's order that the RAI recommends secure detention due to the "gun bill" and the checking of the box stating that the minor *201 is charged with an offense involving the possession of a firearm could be construed as written reasons. However, as discussed above, the RAI actually recommends home or nonsecure detention. Only the Department recommended secure detention. The trial court cannot delegate to the Department the decision of whether more restrictive detention than what the RAI indicates is warranted. Moreover, the RAI assesses only ten points to a minor charged with the offense of possessing a firearm, which by itself does not justify secure detention. Therefore, the trial court's order does not provide clear and convincing written reasons for T.S.'s continued placement in secure detention.
We accordingly grant the petition. In doing so, we recommend that the legislature revisit the statutory framework in the juvenile detention area for possible revision and clarification to eliminate the ambiguities we have noted.
Petition granted.
BLUE, A.C.J., and FULMER and DAVIS, JJ., Concur.
