The trial court dismissed a petition for delinquency on the ground that “[i]t would not be in the best interest of the child for the case to be prosecuted .... ” and the State appeals. We hold that the determination of whether or not to prosecute is a function of the state attorney and not of the court, and we therefore reverse.
On March 12, 1984 a petition for delinquency was filed alleging that C.C.B. had committed burglary and grand theft. At the initial hearing on April 2, 1984 the court was informed that the appellee had been moved to Rodeheaver Boys’ Ranch pursuant to a dependency hearing and thus was not before the court for his scheduled arraignment. The court extended the speedy trial period for two weeks to give the state attorney time to evaluate whether it wanted to proceed on prosecution or whether some arrangements could be made regarding deferring prosecution.
When the juvenile appeared before the trial judge at the scheduled adjudicatory hearing accompanied by his mother and without counsel, the court made inquiry into the juvenile’s entitlement to the appointment of a public defender, and finding that he was not so entitled, the judge then voiced his frustration with the State Attorney’s Office for not deferring prosecution, stating that it would be better for the child. The state attorney responded that because the State was also filing on a co-defendant it would be unfair to the co-defendant to defer prosecution. After noting that the child would have to make another long trip from the Boy’s Ranch to appear in court again, the following colloquy took place:
THE COURT: I realize that and that’s why I asked the State’s cooperation on it and we didn’t get much cooperation from the State's Attorneys [sic] Office. I think it’s inimical to the best interest of the child.
I tell you what I am going to do. I am going to take it upon myself and let the State appeal this. I am going to order that this Petition be dismissed. If the State wants to appeal it, let it do it.
MS. TROTTER [Prosecutor]: On what grounds?
THE COURT: It is not in the best interest of the child that that case be prosecuted and for failure for the State to accept the Court’s recommendation that deferred prosecution be entered into so as to permit this child to complete the program at the Rodeheaver Boy’s Ranch as a dependent child.
The order signed by the trial court judge stated as a basis for dismissing the delinquency petition: “It would not be in the best interest of the child for the case to be prosecuted and on the failure of the State to enter into a deferred prosecution in order for the child to complete his placement *1381at Rodeheaver Boys’ Ranch as a dependent child.”
Section 39.04(2) (e) states:
The state attorney shall in all cases have the right to take action, regardless of the action or lack of action of the intake officer, and shall determine the action which is in the best interest of the public and the child. The state attorney may:
# * * * * *
2. File a petition for delinquency;
⅝ * ⅜ ⅝ *
7. Dismiss the ease.
Although used in a different context, the following statement of the court in Johnson v. State, 314 So.2d 573 (Fla.1975) is instructive here:
In both the adult and juvenile divisions of our court system, the State Attorney is the prosecuting officer. In any particular case he may elect to prosecute or not. The prosecutorial discretion to which the appellant objects is no more than that which is inherent in our system of criminal justice. Its origin is found in the common law of England. Similarly in the Federal system the Federal Courts have consistently held that the discretion of the Attorney General in choosing whether to prosecute or not to prosecute, or to abandon the prosecution already started, is absolute. (Footnotes omitted).
Id. at 577. See also, State v. Cain, 381 So.2d 1361 (Fla.1980).
In the criminal justice system the discretion to prosecute or not is a pre-trial posture vested solely in the state attorney’s discretion. In a post-trial posture, the trial court has great latitude and discretion in the disposition of a convicted defendant. State v. Jogan, 388 So.2d 322 (Fla. 3d DCA 1980). These same principles apply in juvenile delinquency proceedings. Section 39.-04(2)(e) places the prosecutorial discretion in the state attorney. The powers of adjudication and disposition are vested in the court. Sections 39.10(1), (2); 39.11, Florida Statutes (1983).
Prosecution of a juvenile may be deferred where a plan of proposed treatment, training or conduct is presented in lieu of a plea, Fla.R.Juv.P. 8.130(a)(2), but in delinquency cases the plan “shall include the state attorney’s consent to defer the prosecution of the petition.” Thus the determination to defer prosecution of a delinquency petition is clearly within the sole discretion of the state attorney. In this respect, deferred prosecution in a juvenile case is similar to the pre-trial intervention program established by section 944.025, Florida Statutes (1983) where the state attorney’s consent (among others) is required for admission of a defendant to the program. In holding that the court could not require the admission of a defendant to the program absent the consent of the state attorney, the Fourth District Court of Appeal has held:
The overall statutory scheme as we see it is consistent with the purely prosecutorial function of deciding whether or not to charge an individual or to proceed with the prosecution once that individual has been charged. Consequently, the court with trial jurisdiction over the defendant may not review the basis for the State Attorney’s denying admission to the program.
State v. Cleveland, 390 So.2d 364, 366 (Fla. 4th DCA 1980), affirmed, 417 So.2d 653 (Fla.1982). Thus the functions of the prosecutor and the court are separate and distinct. Cleveland, supra.
The order dismissing the petition is reversed and the cause is remanded for further proceedings consistent herewith.
REVERSED and REMANDED.
FRANK D. UPCHURCH, Jr. and SHARP, JJ., concur.