This is an appeal from an order adjudicating E.L. a delinquent child and committing him to the custody of the Department of Juvenile Justice. He argues that the trial court reversibly erred in deviating from the recommended restrietiveness level when it committed him to the Department following his June 6, 1997, violation of community control. More particularly, appellant argues that the court’s reasons for rejecting the Department’s recommendation are insufficient. We disagree and affirm.
Section 39.052(4)(e), Florida Statutes (Supp.1996),1 provides the following in regard to a court’s determination of the restrictiveness level for commitment of a juvenile offender:
2. If the court determines that commitment to the department is appropriate, the intake counselor or ease manager shall recommend to the court the most appropriate placement and treatment plan, specifically identifying the restrietiveness level most appropriate for the child.... The court shall consider the department’s recommendation in making its commitment decision.
3. The court shall commit the child to the department at the restrietiveness level identified or may order placement at a different restrietiveness level. The court shall state for the record the reasons which .establish by a preponderance of the evidence why the court is disregarding the assessment of the child and the restrietiveness level recommended by the department. Any party may appeal the court’s findings resulting in a modified level of restrietiveness pursuant to this subpara-graph.
The law is clear that compliance with the above provisions is mandatory and that failure to comply constitutes reversible error. See J.E.W. v. State, 672 So.2d 72 (Fla. 1st DCA 1996); P.D.W. v. State, 621 So.2d 739 (Fla. 2d DCA 1993); R.G.S. v. State, 597 So.2d 816 (Fla. 2d DCA 1992).
Here, the Department recommended moderate risk placement, but the court determined that placement was insufficient, and, in accordance with section 39.052(4)(e)3, the court stated reasons on the record which established by a preponderance of the' evidence why it disregarded the Department’s recommendation. First, the court based its decision on appellant’s history of criminality. This reason is supported by evidence that appellant had been adjudicated delinquent of retail theft, cruelty to animals, affray, battery, auto theft and trespassing, and that he had pending charges of loitering and prowling, all of which occurred while appellant was between the ages of 12 and 17.
The court’s second reason for deviating from the Department’s recommendation was the fact that appellant had already gone through a moderate risk program and still committed new crimes. This reason is also supported by the record. Defense counsel admitted that appellant had violated his community control after completing the moderate risk program and that he had new charges -pending, although she pointed out appellant would be pleading innocent to them.
A third reason the court provided was that moderate risk was insufficient to ensure pub-*355lie safety or to ensure an opportunity for appellant to rehabilitate himself. This reason is also supported by the record which shows appellant violated his community control after completing a moderate risk program and that he was charged with committing new crimes.
Appellant has cited no ease law which supports his challenge to the three reasons given by the court. Because the reasons establish by a preponderance of the evidence why the court disregarded the Department’s recommended level of restrictiveness, we affirm.
In so saying, we reject appellant’s argument that the increase in the restrictiveness level violates the state’s public policy for delinquency proceedings. As explained in P.W.G. v. State, 682 So.2d 1203 (Fla. 1st DCA 1996), aff'd, 702 So.2d 488 (Fla.1997), the principal focus of the juvenile system is rehabilitation, with the aim of preventing further delinquent or criminal acts. To accomplish that purpose, the court may impose whatever treatment plan it concludes is most likely to be effective for a particular child. Id. at 1208. Here, the judge provided reasons for his conclusion that appellant would not be rehabilitated in a moderate risk program, and, because his reasons are supported by the record, the order of delinquency is
AFFIRMED.
ERVIN and JOANOS, JJ., and SHIVERS, DOUGLASS B., Senior Judge, concur.. Although both parties have cited section 985.23, Florida Statutes (1997), this section did not become effective until October 1, 1997, which is after appellant’s violation of community control. See Ch. 97-238, §§ 38 & 124, at 4272-75 & 4397, Laws of Fla. We therefore cite the predecessor statute, section 39.052(4)(e), which is substantially the same.