
394 So.2d 541 (1981)
STATE of Florida ex rel. BLUDWORTH, Relator,
v.
Honorable Lewis KAPNER, Circuit Court Judge in and for Palm Beach County, Florida, Respondent.
No. 80-2100.
District Court of Appeal of Florida, Fourth District.
February 25, 1981.
*542 Deborah Dale Pucillo, Asst. State Atty., West Palm Beach, for relator.
Richard L. Jorandby, Public Defender, West Palm Beach, and Louis G. Carres, Asst. Public Defender, Tallahassee, for defendant-Ronald Brummage.
HERSEY, Judge.
The State seeks a Writ of Prohibition to restrain the trial court from executing its order finding the defendant not guilty by reason of insanity. Since the order which the State is actually challenging has already been entered, prohibition is not the proper remedy. The purpose of prohibition is to prevent the doing of something, not to compel the undoing of something already done. English v. McCrary, 348 So.2d 293 (Fla. 1977). However, upon the State's request and pursuant to Rule 9.040(c), Florida Rules of Appellate Procedure, we will treat the suggestion for Writ of Prohibition as a Petition for Writ of Certiorari.
Defendant Ronald Brumage was indicated for first degree murder. He entered a plea of not guilty and demanded a jury trial. Subsequently, he filed a notice of intent to rely upon the defense of insanity. On the same day defendant also filed a motion to dismiss the indictment or for a finding of not guilty by reason of insanity. The basis for this motion was that the two court-appointed psychiatrists and one psychologist were each of the opinion that defendant was insane at the time of the alleged offense and that therefore the undisputed facts did not establish a prima facie case of guilt.
In response, the State filed motions to strike and traverses, specifically alleging facts and circumstances from which, according to the State, a jury could conclude that defendant was sane at the time of the offense. However, the State did not allege the existence of any expert opinions which would conflict with those of the court-appointed witnesses.
After reviewing the reports and depositions of the court-appointed experts which were incorporated into defendant's pleadings, the trial court entered an order finding defendant not guilty by reason of insanity.
Certiorari is a discretionary common law writ which, in the absence of an adequate remedy by appeal, a court may issue to review an order or judgment that is unauthorized or violates the essential requirements of controlling law. Kilgore v. Bird, 149 Fla. 570, 6 So.2d 541 (1942).
In the instant case, the trial court did not have the authority to render the order now before this Court.
A basic and fundamental principle of our law is that it is the province of the trier of fact, after hearing all of the evidence and considering the applicable law, to determine whether a defendant is guilty or not guilty. The only exception to this principle is that a court sitting as trier of law, when called upon to determine the legal sufficiency of the evidence by a motion for judgment of acquittal, may enter a judgment of acquittal. Fla.R.Crim.P. 3.380. This may be done only "at the close of the evidence for the State or at the close of all the evidence in the cause, ... ." Fla.R. Crim.P. 3.380. Thus, in either event, the final determination is made only after there has been a trial, a proceeding in which both the State and defense are afforded an opportunity to present evidence and examine or cross examine witnesses. No such proceeding occurred in the instant case. Jury trial was not waived; the court was not sitting as the finder of fact. Rather, the *543 record evidences that the State refused to consent to a waiver of jury trial, a prerequisite for an effective waiver. Fla.R.Crim.P. 3.260.
More importantly, a defendant is not entitled to a judgment of acquittal simply because he offers expert testimony on the issue of insanity and the government attempts to rebut it without any expert witnesses. United States v. Hall, 583 F.2d 1288 (5th Cir.1978). Sanity is a question for the trier of fact to determine from all the evidence. Expert testimony, even when uncontradicted, is not conclusive on the issue of sanity and the trier of fact may find such testimony adequately rebutted by the observations of laymen. United States v. Mota, 598 F.2d 995 (5th Cir.1979), cert. denied 444 U.S. 1084, 100 S.Ct. 1042, 62 L.Ed.2d 770 (1980).
Further, under Rule 3.190(c), pursuant to which the trial court acted, the only relief which may be granted is dismissal of the indictment or information. An order granting such relief may be appealed by the State. Fla.R.App.P. 9.140; § 924.07, Fla. Stat. (1979). However, the State's right of appeal, a purely statutory right, does not include an acquittal or a judgment of not guilty. Thus, the trial court in this case, by entering a judgment of not guilty, precluded review by appeal.
Since the trial court was without authority to enter the judgment of not guilty by reason of insanity and by doing so left the State at the peril of irrevocable prejudice, certiorari is appropriate. State v. Vinson, 320 So.2d 50 (Fla.2d DCA 1975), aff'd, Vinson v. State, 345 So.2d 711 (Fla. 1977).
Although not addressed by the parties, we deter any future double jeopardy arguments by noting that double jeopardy sanctions come to fruition only after the court properly acts in a manner within its jurisdiction and authority. State v. Vinson, supra. We have held that the trial court exceeded that authority when it entered the finding of not guilty; therefore, the matter is still pending. Upon remand, there will not be a second or subsequent prosecution of defendant on the charge herein; rather, it will be the first and same prosecution which was simply prematurely and improperly terminated by the court without authority. State v. Vinson, supra.
Accordingly, certiorari is granted, the order finding defendant not guilty by reason of insanity is vacated, and the cause is remanded for further proceedings not inconsistent herewith.
LETTS, C.J., and GLICKSTEIN, J., concur.
