
841 So.2d 621 (2003)
DEPARTMENT OF CHILDREN & FAMILIES, Petitioners,
v.
E.M.S, a child, et al., Respondent.
Nos. 5D02-3241, 5D02-3242.
District Court of Appeal of Florida, Fifth District.
April 4, 2003.
Ralph J. McMurphy, Wildwood, for Petitioners.
Brad King, State Attorney, and Linda Johns Herrick, Assistant State Attorney, Ocala, for Respondent.
GRIFFIN, J.
Petitioner, Department of Children and Families ["DCF"], has filed in this court two petitions for writ of certiorari challenging trial court orders entered in two separate juvenile delinquency cases. The two orders at issue were entered by the same judge and are similar. Both petitions raise the same issue and have been consolidated.
The order regarding E.M.S. declares E.M.S. to be incompetent and then provides in pertinent part:

CONCLUSIONS OF LAW
A. The child, who is incompetent to proceed due to the child's mental illness and who is charge[d] with a misdemeanor, is hereby not committed to the Department of Children and Families.
B. The child does not meet the criteria for secure placement to a treatment program of the Department of Children and Families as set forth in 985.223(3), Fla. Stat. (Supp.1998).
C. The Department of Children and Families will place the child in a community treatment program as permitted by 985.223(6)(a), Fla. Stat. (Supp.1998), which is the least-restrictive, most appropriate type of program available for the child consistent with the needs of public safety.
Inconsistent with paragraph A above, however, the court's order further provides: "The child is committed to the Department of Children and Families with the goal of restoration of the child's competency to proceed."
DCF urges that both orders, to the extent that they mandate commitment of the juveniles to DCF, are at odds with the statutory language of section 985.223(2), Florida Statutes (2002), as well as opinions from the First District Court of Appeal in Department of Children & Families v. *622 J.K., 752 So.2d 87 (Fla. 1st DCA 2000) and this court in Department of Children & Families v. A.A.ST.M., 706 So.2d 367 (Fla. 5th DCA 1998) (on rehearing en banc). J.K. is the only Florida appellate decision construing section 985.223(2); A.A.ST.M. involves an earlier version of section 985.223 and facts similar to those in the instant case.
Section 985.223(2) states:
A child who is mentally ill or retarded, who is adjudicated incompetent to proceed, and who has committed a delinquent act or violation of law, either of which would be a felony if committed by an adult, must be committed to the Department of Children and Family Services for treatment or training. A child who has been adjudicated incompetent to proceed because of age or immaturity, or for any reason other than for mental illness or retardation, must not be committed to the department or to the Department of Children and Family Services for restoration-of-competency treatment or training services. For purposes of this section, a child who has committed a delinquent act or violation of law, either of which would be a misdemeanor if committed by an adult, may not be committed to the department or to the Department of Children and Family Services for restoration-of-competency treatment or training services.
In J.K., the First District Court of Appeal held: "Because J.K. was committed to the Department following a misdemeanor charge, the commitment was a clear departure from the essential requirements of law under the language of section 985.223(2)." 752 So.2d at 89.
As indicated, this court in A.A.ST.M. addressed the prior version of section 985.223, then section 39.0517. Under former section 39.0517(1), Florida Statutes (Supp.1996): "If, at any time prior to or during a delinquency case involving a delinquent act or violation of law that would be a felony if committed by an adult, the court has reason to believe that the child named in the petition may be incompetent to proceed ... the court ... may, or on the motion of the child's attorney or state attorney must, stay all proceedings and order an evaluation of the child's mental condition." In A.A.ST.M., this court held that in light of section 39.0517(1), a juvenile incompetent may be involuntarily committed to the custody of DCF only if the act would constitute a felony had it been committed by an adult. Since the acts in A.A.ST.M. only constituted misdemeanors, commitment to DCF was improper.
The facts and circumstances of A.A.ST.M. are indistinguishable from those before us now. The only difference is that the legislature has since amended and recodified section 39.0517 in an apparent effort to make it even more clear that an incompetent juvenile charged with the equivalent of a misdemeanor offense may not be committed to DCF. Ch. 98-207, Laws of Florida.
Accordingly, in both of these cases, we grant DCF's petitions and vacate the orders under review.
Petitions GRANTED; Orders VACATED; and REMANDED.
SHARP, W. and PALMER, JJ., concur.
