Petitioner, M.D.E., a child, filed a petition for writ of habeas corpus alleging he is entitled to release pursuant to section 985.26(2), Florida Statutes (2016). Section 985.26(2) provides:
A child may not be held in secure or nonsecure detention care under a special detention order for more than 21 days unless an adjudicatory hearing for the case has been commenced in good faith by the court, However, upon good cause being shown that the nature of the charge requires additional time for the prosecution or defense of the case, the court may extend the length of detention for an additional 9 days if the child is charged with an offense that would be, if committed by an adult, a capital felony, a life felony, a felony of the first degree, or a felony of the second degree involving violence against any individual.
§ 985.26(2), Fla. Stat.
Petitioner was charged with battery on a licensed security officer and taken into custody on November 18, 2016. The November 19, 2016 detention order directed that Petitioner be released from detention status no later than 5:00 p.m. on the 21st day, December 9, 2016, unless an order of continuance had been granted.1 On December 6, 2016, the trial court set the adjudicatory hearing for December 12, 2016. The Court ordered Petitioner to remain in secure detention until trial.
Petitioner argues that the continued detention to December 12, 2016 is erroneous, as no motion for a continuance or an extension of the 21 day period was filed. The State filed a response conceding the December 6, 2016 order did not indi*154cate that the adjudicatory hearing was commenced or that there was good cause for a continuance, and agreed that Petitioner is entitled to relief. “[A] juvenile held in detention for more than twenty-one days during which no continuances have been granted is entitled to immediate release unless there have been new charges filed against the child in the interim.” Z.R. v. State, 596 So.2d 723, 724 (Fla. 5th DCA 1992); see also J.S. v. State, 182 So.3d 890 (Fla. 5th DCA 2016). Petitioner is entitled to be released by 5:00 p.m. today.
Accordingly, we grant the petition for habeas corpus and order Petitioner’s release by 5:00 p.m. today.
PETITION GRANTED.
ORFINGER, COHEN and LAMBERT, JJ., concur.. The State contends the 21st day is December 9 and Petitioner contends it is December 8. The “twenty-one-day maximum does not include the initial twenty-four hours under which the child may be placed in custody at the JPO's discretion prior to the detention hearing’1; however, “the twenty-one days should be counted such that the first day of detention under a court order ... is included in the count. This method of counting ensures that a child is not held in detention more than the imposed number of days.” M.A.M. v. Vurro, 2 So.3d 388, 390, 391 n.2 (Fla. 2d DCA 2009). While Petitioner was taken into custody on November 18, 2016, the detention order was entered on November 19, 2016. Including the first day of detention under court order in the 21 day calculation, but not the initial 24 hour detention prior to the order, the 21st day is today December 9, 2016.