
51 So.3d 456 (2010)
Clarence DENNIS, Petitioner,
v.
STATE of Florida, Respondent.
No. SC09-941.
Supreme Court of Florida.
December 16, 2010.
*457 Barbara J. Wolfe, of The Wolfe Law Firm, West Palm Beach, FL, for Petitioner.
Bill McCollum, Attorney General, Tallahassee, FL, Celia Terenzio, Bureau Chief, Diana K. Bock and Melanie Dale Surber, *458 Assistant Attorneys General, West Palm Beach, FL, for Respondent.
CANADY, C.J.
In this case we consider whether a trial court should conduct a pretrial evidentiary hearing and resolve issues of fact when ruling on a motion to dismiss asserting immunity from criminal prosecution pursuant to section 776.032, Florida Statutes (2006), commonly known as the "Stand Your Ground" statute. We have for review the decision of the Fourth District Court of Appeal in Dennis v. State, 17 So.3d 305 (Fla. 4th DCA 2009), which held that the existence of disputed issues of material fact required the denial of Dennis's motions to dismiss. The Fourth District certified that its decision is in direct conflict with the decision of the First District Court of Appeal in Peterson v. State, 983 So.2d 27 (Fla. 1st DCA 2008), which held that the existence of disputed issues of material fact did not warrant denial of a motion to dismiss asserting immunity under section 776.032. We have jurisdiction. See art. V, § 3(b)(4), Fla. Const.
We conclude that where a criminal defendant files a motion to dismiss on the basis of section 776.032, the trial court should decide the factual question of the applicability of the statutory immunity. Accordingly, we disapprove the Fourth District's reasoning in Dennis and approve the reasoning of Peterson on that issue. However, because we conclude that the trial court's error in denying Dennis a pretrial evidentiary hearing on immunity was harmless, we do not quash the Fourth District's decision affirming Dennis's conviction and sentence.

I. BACKGROUND
Clarence Dennis was charged by information with the attempted first-degree murder of Gloria McBride. The charge arose from an incident of domestic violence in August 2006. Dennis filed two motions to dismiss the information pursuant to section 776.032(1), Florida Statutes (2006), asserting that he was immune from criminal prosecution because his actions were a justified use of force. One motion was designated as being filed pursuant to Florida Rule of Criminal Procedure 3.190(c)(4) and alleged that there were "no material facts in dispute and the undisputed facts do [not] establish a prima facie case of guilt against the Defendant." The other motion was designated as being filed pursuant to Florida Rule of Criminal Procedure 3.190(c)(3) and asserted that the preponderance of the evidence established that Dennis was entitled to immunity because his use of force was justified. The State filed a traverse and demurrer, asserting that material facts were in dispute.
The trial court denied the rule 3.190(c)(4) motion on the basis that the State asserted with specificity the existence of disputed material facts. After expressing uncertainty about whether it had authority to conduct an evidentiary hearing, the trial court rejected Dennis's request for an evidentiary hearing and summarily denied the rule 3.190(c)(3) motion. The trial court concluded that in enacting section 776.032, the Legislature did not intend to take the question of immunity away from the jury.
Before proceeding to trial, the State amended the information, reducing the charge against Dennis to aggravated battery. During the trial, after the State rested its case, Dennis moved for a judgment of acquittal. The trial court denied Dennis's motion, finding that the State had "proved the charge of aggravated battery and [had] established a prima facie case of guilt against the defendant." After the defense presented its evidence and rested, Dennis renewed his motion for a judgment *459 of acquittal. The trial court denied the renewed motion and submitted the case to the jury. When charging the jury, the trial court expressly instructed that an "issue in this case [was] whether the defendant acted in self defense" and gave detailed instructions on when deadly or nondeadly force is legally justified. Ultimately, the jury convicted Dennis of the lesser included offense of felony battery, and the trial court sentenced Dennis to sixty months of imprisonment.
Dennis appealed his conviction and sentence, raising two issues. The Fourth District discussed only one issue in its opinion:
Only one of the issues warrants discussion; that is, whether the trial court erred in denying Dennis's motion to dismiss on his claim of statutory immunity brought under section 776.032, Florida Statutes, because there were disputed issues of material fact. We find no error in the trial court's decision to deny the motion to dismiss. As we recognized in Velasquez v. State, 9 So.3d 22 (Fla. 4th DCA 2009), a motion to dismiss based on statutory immunity is properly denied when there are disputed issues of material fact. Accordingly, we affirm.
Dennis v. State, 17 So.3d 305, 306 (Fla. 4th DCA 2009). The Fourth District denied Dennis's motion for rehearing or clarification but did certify conflict with Peterson.
In Peterson, the State charged the defendant with attempted first-degree murder, and the defendant moved to dismiss the information on the ground that he was immune from criminal prosecution pursuant to section 776.032, Florida Statutes (2006). After conducting an evidentiary hearing, the trial court denied the motion to dismiss on the basis that the defendant had not established immunity "as a matter of fact or law." Peterson, 983 So.2d at 28. The trial court recognized that no procedure had yet been enacted for deciding claims of immunity under section 776.032(1).
Peterson then filed a petition for a writ of prohibition, challenging the denial of his motion to dismiss. In response, the State argued that the motion should have been considered under rule 3.190(c)(4) and was properly denied because "any factual dispute should defeat a claim of statutory immunity" under that rule. Peterson, 983 So.2d at 28. The First District rejected the State's argument that a motion to dismiss based on section 776.032 immunity must be denied whenever there are disputed material facts. Based upon its conclusion that the Legislature "intended to establish a true immunity and not merely an affirmative defense," the First District outlined a procedure for use in ruling on motions to dismiss pursuant to section 776.032. Id. at 29. The First District explained:
We now hold that when immunity under this law is properly raised by a defendant, the trial court must decide the matter by confronting and weighing only factual disputes. The court may not deny a motion simply because factual disputes exist. Here, the trial court did what was required. Petitioner is not precluded from submitting the matter to the jury as an affirmative defense in his criminal trial.
In the absence of a procedure for handling these matters, we find guidance from the Colorado Supreme Court's decision in People v. Guenther, 740 P.2d 971 (Colo.1987). In that case, the court decided that Colorado's similar immunity statute authorized a trial court to dismiss a criminal prosecution at the pretrial stage and did not merely create an affirmative defense for adjudication at trial. Id. at 976. The court further determined that a defendant raising the immunity would have the burden of establishing *460 the factual prerequisites to the immunity claim by a preponderance of the evidence. Id. at 980. The court imposed the same burden of proof as it would in motions for postconviction relief or motions to suppress. Id.

Likewise, we hold that a defendant may raise the question of statutory immunity pretrial and, when such a claim is raised, the trial court must determine whether the defendant has shown by a preponderance of the evidence that the immunity attaches. As noted by the trial court, courts have imposed a similar burden for motions challenging the voluntariness of a confession. See, e.g., McDole v. State, 283 So.2d 553, 554 (Fla. 1973). We reject any suggestion that the procedure established by rule 3.190(c) should control so as to require denial of a motion whenever a material issue of fact appears.
Peterson, 983 So.2d at 29-30. The First District ultimately denied Peterson's petition for a writ of prohibition, concluding that the trial court did not err in finding that Peterson had failed to establish immunity.
We accepted jurisdiction based on the certified conflict on the question of whether the trial court should conduct a pretrial evidentiary hearing and resolve disputed issues of material fact to rule on a motion to dismiss asserting immunity from criminal prosecution pursuant to section 776.032. On this issue, Dennis contends that this Court should adopt the position taken by the First District in Peterson. He asserts that the trial court erred in summarily denying his motions to dismiss and that the trial court should have conducted an evidentiary hearing on his claim of immunity. The State contends that the trial court correctly found that a claim of immunity pursuant to section 776.032 is properly raised and resolved under rule 3.190(c)(4), which requires that the motion to dismiss be denied where there are disputed material facts. The State further asserts that to proceed to trial, section 776.032 requires only a showing that there is probable cause to believe that the defendant's use of force was unlawful.

II. ANALYSIS
In the analysis that follows, we first explain why we approve the Peterson procedure for ruling on motions to dismiss filed pursuant to section 776.032. We then explain why Dennis is not entitled to relief despite the trial court's denial of an evidentiary hearing on his motions to dismiss.
Dennis and Peterson both filed motions to dismiss the charges against them on the basis of section 776.032, Florida Statutes (2006). Section 776.032, which became effective October 1, 2005, provides:
(1) A person who uses force as permitted in s. 776.012, s. 776.013, or s. 776.031 is justified in using such force and is immune from criminal prosecution and civil action for the use of such force, unless the person against whom force was used is a law enforcement officer, as defined in s. 943.10(14), who was acting in the performance of his or her official duties and the officer identified himself or herself in accordance with any applicable law or the person using force knew or reasonably should have known that the person was a law enforcement officer. As used in this subsection, the term "criminal prosecution" includes arresting, detaining in custody, and charging or prosecuting the defendant.
(2) A law enforcement agency may use standard procedures for investigating the use of force as described in subsection (1), but the agency may not arrest the person for using force unless it determines that there is probable *461 cause that the force that was used was unlawful.
(3) The court shall award reasonable attorney's fees, court costs, compensation for loss of income, and all expenses incurred by the defendant in defense of any civil action brought by a plaintiff if the court finds that the defendant is immune from prosecution as provided in subsection (1).
§ 776.032, Fla. Stat. (2006).
Florida Rule of Criminal Procedure 3.190 sets out procedures for the filing and consideration of a motion to dismiss in a criminal proceeding. The relevant provisions of the rule state:
(a) In General. Every pretrial motion and pleading in response to a motion shall be in writing and signed by the party making the motion or the attorney for the party....
(b) Motion to Dismiss; Grounds. All defenses available to a defendant by plea, other than not guilty, shall be made only by motion to dismiss the indictment or information, whether the same shall relate to matters of form, substance, former acquittal, former jeopardy, or any other defense.
(c) Time for Moving to Dismiss. Unless the court grants further time, the defendant shall move to dismiss the indictment or information either before or at arraignment. The court in its discretion may permit the defendant to plead and thereafter to file a motion to dismiss at a time to be set by the court. Except for objections based on fundamental grounds, every ground for a motion to dismiss that is not presented by a motion to dismiss within the time hereinabove provided shall be considered waived. However, the court may at any time entertain a motion to dismiss on any of the following grounds:
(1) The defendant is charged with an offense for which the defendant has been pardoned.
(2) The defendant is charged with an offense for which the defendant previously has been placed in jeopardy.
(3) The defendant is charged with an offense for which the defendant previously has been granted immunity.
(4) There are no material disputed facts and the undisputed facts do not establish a prima facie case of guilt against the defendant. The facts on which the motion is based should be alleged specifically and the motion sworn to.
(d) Traverse or Demurrer. The state may traverse or demur to a motion to dismiss that alleges factual matters. Factual matters alleged in a motion to dismiss under subdivision (c)(4) of this rule shall be considered admitted unless specifically denied by the state in the traverse. The court may receive evidence on any issue of fact necessary to the decision on the motion. A motion to dismiss under subdivision (c)(4) of this rule shall be denied if the state files a traverse that, with specificity, denies under oath the material fact or facts alleged in the motion to dismiss. The demurrer or traverse shall be filed a reasonable time before the hearing on the motion to dismiss.
The "cardinal rule" of statutory construction is "that a statute should be construed so as to ascertain and give effect to the intention of the Legislature as expressed in the statute." Reeves v. State, 957 So.2d 625, 629 (Fla.2007) (quoting City of Tampa v. Thatcher Glass Corp., 445 So.2d 578, 579 (Fla.1984)). "[S]tatutory enactments are to be interpreted so as to accomplish rather than defeat their purpose." Reeves, 957 So.2d at 629 (quoting Lewis v. Mosley, 204 So.2d 197, 201 (Fla. *462 1967)). In resolving the conflict issue, we conclude that the plain language of section 776.032 grants defendants a substantive right to assert immunity from prosecution and to avoid being subjected to a trial. We further conclude that the procedure set out by the First District in Peterson best effectuates the intent of the Legislature.
Section 776.032(1) provides, in part, that a "person who uses force as permitted in s. 776.012, s. 776.013, or s. 776.031 is justified in using such force and is immune from criminal prosecution and civil action for the use of such force, unless the person against whom force was used is a law enforcement officer ... who was acting in the performance of his or her official duties." Section 776.032(1) defines "criminal prosecution" as including "arresting, detaining in custody, and charging or prosecuting the defendant." Similarly, the preamble of the law creating section 776.032 states that "the Legislature finds that it is proper for law-abiding people to protect themselves, their families, and others from intruders and attackers without fear of prosecution or civil action for acting in defense of themselves and others." Ch.2005-27, at 200, Laws of Fla. (emphasis added).
While Florida law has long recognized that a defendant may argue as an affirmative defense at trial that his or her use of force was legally justified, section 776.032 contemplates that a defendant who establishes entitlement to the statutory immunity will not be subjected to trial. Section 776.032(1) expressly grants defendants a substantive right to not be arrested, detained, charged, or prosecuted as a result of the use of legally justified force. The statute does not merely provide that a defendant cannot be convicted as a result of legally justified force.
This plain reading of section 776.032 compels us to reject the State's contention that a defendant must raise a pretrial claim of immunity only in a rule 3.190(c)(4) motion to dismiss. To be entitled to dismissal under rule 3.190(c)(4), "the defendant must `demonstrate that the undisputed facts fail to establish a prima facie case.'" Dorelus v. State, 747 So.2d 368, 373 (Fla.1999) (quoting State v. Pollock, 600 So.2d 1313, 1314 (Fla. 3d DCA 1992)). If the State specifically alleges that the material facts are in dispute or that the facts refute the defendant's claim, the motion to dismiss must be denied. State v. Kalogeropolous, 758 So.2d 110, 112 (Fla. 2000). Section 776.032 does not limit its grant of immunity to cases where the material facts are undisputed. Thus, treating motions to dismiss pursuant to section 776.032 in the same manner as rule 3.190(c)(4) motions would not provide criminal defendants the opportunity to establish immunity and avoid trial that was contemplated by the Legislature.
Florida Rule of Criminal Procedure 3.190(b)rather than rule 3.190(c)(4) provides the appropriate procedural vehicle for the consideration of a claim of section 776.032 immunity. Rule 3.190(b) provides generally that "[a]ll defenses available to a defendant by plea, other than not guilty, shall be made only by motion to dismiss the indictment or information." Dennis's failure to identify the pertinent subdivision of rule 3.190 in his motions to dismiss did not foreclose Dennis's argument that section 776.032 required the trial court to make a pretrial evidentiary determination concerning the applicability of the statutory immunity. See, e.g., Steinhorst v. State, 636 So.2d 498, 500 (Fla.1994) (concluding that trial court should have treated criminal defendant's motion, improperly designated as being filed pursuant to Florida Rule of Civil Procedure 1.540, as being properly filed *463 pursuant to Florida Rule of Criminal Procedure 3.850); cf. Barrett v. State, 965 So.2d 1260, 1261 (Fla. 2d DCA 2007) ("Article V, section 2(a) of the Florida Constitution requires that no cause be dismissed because an improper remedy has been sought. Accordingly, the trial court should have considered whether Barrett had alleged sufficient facts to warrant relief and, if so, treated his motion as if the proper remedy had been sought.").
The Florida appellate courts have interpreted rule 3.190in a variety of contextsas granting trial courts authority to receive evidence to assist in ruling on motions to dismiss. For example, the appellate courts have approved the trial courts' use of evidentiary hearings to rule on motions to dismiss on the basis of transactional or use immunity, prosecutorial misconduct, and selective prosecution. See, e.g., State ex rel. Hough v. Popper, 287 So.2d 282, 285 (Fla. 1973) (issuing writ to compel trial court to hold an evidentiary hearing to determine if the transactional immunity or use immunity provisions of section 914.04, Florida Statutes, were applicable); Owen v. State, 443 So.2d 173, 175 (Fla. 1st DCA 1983) (holding that trial court had discretion to conduct an evidentiary hearing on a motion to dismiss alleging prosecutorial misconduct and selective prosecution); State v. Yatman, 320 So.2d 401, 402 (Fla. 4th DCA 1975) (directing trial court to allow defendant to file a written motion to dismiss and to "hold a hearing to determine the issues created by said motion").
We also reject the State's contention that the pretrial hearing on immunity in a criminal case should test merely whether the State has probable cause to believe the defendant's use of force was not legally justified. Prior to the enactment of chapter 2005-27, Laws of Florida (2005), Florida law defined certain types of justified force, see §§ 776.12, 776.031, Fla. Stat. (2004), and the Florida Rules of Criminal Procedure mandated that a trial judge make a pretrial nonadversarial probable cause determination either before or shortly after a defendant was taken into custody, see Fla. R.Crim. P. 3.133 (2004). "It is a basic rule of statutory construction that `the Legislature does not intend to enact useless provisions, and courts should avoid readings that would render part of a statute meaningless.'" Martinez v. State, 981 So.2d 449, 452 (Fla.2008) (quoting State v. Bodden, 877 So.2d 680, 686 (Fla. 2004)). Accordingly, the grant of immunity from "criminal prosecution" in section 776.032 must be interpreted in a manner that provides the defendant with more protection from prosecution for a justified use of force than the probable cause determination previously provided to the defendant by rule.
In summary, we conclude that the procedure set out by the First District in Peterson best effectuates the intent of the Legislature and that the trial court erred in denying Dennis an evidentiary hearing on his claim of statutory immunity.
We do not, however, quash the Fourth District's decision affirming Dennis's conviction and sentence. The erroneous denial of a motion to dismiss may be harmless error. See, e.g., John W. Campbell Farms, Inc. v. Zeda, 59 So.2d 750, 751 (Fla.1952) (applying harmless error statute to trial court's error in denying a motion to dismiss due to misjoinder of plaintiffs). An error is harmless if "the error complained of did not contribute to the verdict or, alternatively stated, ... that there is no reasonable possibility that the error contributed to the conviction." State v. DiGuilio, 491 So.2d 1129, 1135 (Fla.1986). The record in Dennis's case demonstrates that the trial court's summary denial of his motions to dismiss was harmless.
*464 Dennis does not contend that his trial itself was unfair or that his ability to present his claim of self-defense was limited in any way by the trial court's pretrial ruling. Dennis also does not assert that at a pretrial evidentiary hearing he would have presented evidence different from or additional to the evidence he presented at trial. At trial, Dennis testified on his own behalf and called witness George Daniels, who testified that victim McBride instigated the physical altercation by hitting Dennis with a beer bottle. The State introduced testimony contradicting Dennis's claim of self-defense. The trial court denied Dennis's motion for judgment of acquittal, and the jury determined that the evidence established beyond a reasonable doubt that Dennis committed the lesser included offense of felony battery. Based on the record before us, there is no reasonable possibility that the trial court's failure to make a pretrial evidentiary determination regarding Dennis's immunity claim contributed to Dennis's conviction. See Parrish v. AmSouth Bank, N.A., 657 So.2d 1189, 1190 (Fla. 4th DCA 1995) (concluding that trial court's erroneous denial of motion to dismiss challenging plaintiff's jurisdictional allegations was harmless where the evidence presented at trial established jurisdiction over the defendant). Because the trial court's error in this case was harmless beyond a reasonable doubt, Dennis is not entitled to relief.

III. CONCLUSION
We conclude that where a criminal defendant files a motion to dismiss pursuant to section 776.032, the trial court should decide the factual question of the applicability of the statutory immunity. A motion to dismiss on the basis of section 776.032 immunity is not subject to the requirements of rule 3.190(c)(4) but instead should be treated as a motion filed pursuant to rule 3.190(b). While the error in Dennis was harmless, we disapprove the Fourth District's reasoning and approve the reasoning of Peterson on the conflict issue.
It is so ordered.
PARIENTE, LEWIS, QUINCE, POLSTON, LABARGA, and PERRY, JJ., concur.
