We are confronted with a case where the trial court sua sponte dismissed a petition for delinquency, over the objection of the state. We find that the trial court, in this case, lacked the authority to sua sponte dismiss the petition, and that by dismissing the state’s petition without authority, violated the principles of separation of powers. We, therefore, reverse and remand.
In August 2012, M.A. was charged by petition for delinquency with possession of cannabis and possession of drug paraphernalia. During an April 2014 status hearing, counsel for M.A. proffered that M.A. was picked up in South Carolina and subsequently released. The court stated that the defense’s proffer indicated that Florida officials told the South Carolina officials that Florida would not be extraditing M.A. The state told the trial court that nothing *523in its records reflected whether the state did or did not want to extradite M.A. The trial court noted that there was a pickup order as to M.A. issued on November 15, 2012, and that there had been a take custody order for over a year. The trial court then sua sponte dismissed the pending petition for delinquency based on State v. A.A., 110 So.3d 988 (Fla. 4th DCA 2013). The state objected and this appeal ensues.
We review the dismissal of a petition for delinquency de novo. State v. S.P., 24 So.3d 756, 757 (Fla. 4th DCA 2009).
Section 985.0301, Florida Statutes (2014), provides, in relevant part, that:
(1) The circuit court has exclusive original jurisdiction of proceedings in which a child is alleged to have committed a delinquent act or violation of law.
(2) The jurisdiction of the court shall attach to the child and the case when the summons is served upon the child and a parent or legal or actual custodian or guardian of the child, or when the child is taken into custody with or without service of summons and before or after the filing of a petition, whichever first occurs, and thereafter the court may control the child and the case in accordance with this chapter.
(6) The court may at any time enter an order ending its jurisdiction over any child.
State v. J.C., 141 So.3d 756 (Fla. 4th DCA 2014), is most instructive. In J.C., the state filed a delinquency petition. At a hearing more than one year later, the state informed the trial court that J.C. was living in New York. Defense counsel moved to dismiss pursuant to section 985.0301(6), claiming that this section permitted the trial court to “enter an order ending its jurisdiction over any child.” Id. at 757. This court in J.C. held that the “trial court impermissibly relied on section 985.0301(6) to terminate its jurisdiction over J.C. and ‘put an end to the prosecution before the case ever reache[d] adjudication on the merits.’” Id. (quoting State v. W.D., 112 So.3d 702, 704 (Fla. 4th DCA 2013)).
In reaching this decision, J.C. relied on W.D., where this court determined that the trial court incorrectly relied on section 985.0301(6) to dismiss a delinquency petition. In W.D., this court determined the scope of section 985.0301(6) “as authorizing the court to elect to end its jurisdiction over a child at any time following the initial adjudicatory hearing — not as permitting the trial court to use its discretion to terminate jurisdiction to put an end to the prosecution before the case ever reaches adjudication on the merits.” W.D., 112 So.3d at 704. In the present case, like in J.C. and W.D., the trial court impermissi-bly dismissed the delinquency petition, where the trial court had acquired jurisdiction over the juvenile, before the trial court had reached the phase of the proceedings where there was an adjudication on the merits of the case.
The trial court, in dismissing the petition, relied on A.A. However, the trial court’s reliance on A.A. was misplaced. In A.A., the state contended that the trial court could not dismiss a juvenile case, “because the court had not acquired jurisdiction as the child had not been served.” 110 So.3d at 988. However, “the child had been detained and taken into custody.” Id. Thus, this court determined that the trial court had jurisdiction over the juvenile. Nowhere in A.A. did this court discuss the circumstances where a trial court could dismiss a petition for delinquency under section 985.0301(6); rather, we briefly opined that the trial court had jurisdiction because the juvenile had been *524detained and taken into custody, citing to section 985.0301(1) and (2).
Further, in the instant ease, when the trial court sua sponte dismissed the petition, it erred because “the trial court improperly ruled on an issue that was not before it and interfered with the State’s discretion to bring charges against” the juvenile. State v. C.W., 166 So.3d 950 (Fla. 4th DCA 2015). As C.W. stated, a “trial court may adjudicate only those issues or questions which are properly placed before the court.” Id. (citation omitted).
The trial court also erred because its decision to sua sponte dismiss the state’s petition for delinquency encroached on the powers of the executive branch of state government, as noted in both J.C. and W.D. “Under Article II, Section 3, a prosecutor has the exclusive discretion to decide whether to file charges or to continue with a prosecution.” Barnett v. Antonacd, 122 So.3d 400, 405 (Fla. 4th DCA 2013). “By dismissing the delinquency petition, the trial court violated the separation of powers doctrine by encroaching on the state attorney’s absolute authority to decide where and how to prosecute' this case.” J.C., 141 So.3d at 757.
One cannot overstate how integral the separation of powers is to the proper functioning of our government, as well as to ensuring the protection of individual liberties. It has been long recognized by our founders that “(t)he accumulation of all powers, legislative, executive, and judiciary, in the same hands, whether of one, a few, or many, and whether hereditary, self-appointed, or elective, may justly be pronounced the very definition of tyranny.” The Federalist No. 47, at 298 (James Madison) (Clinton Rossiter ed., 2003). Thus, individual rights can flourish only when the powers enumerated by our constitution are limited to the appropriate and correct branch of government.
We therefore reverse the decision of the trial court and reinstate the petition for delinquency erroneously dismissed by the trial court.
Reversed and remanded.
STEVENSON and FORST, JJ., concur.