
15 So.3d 37 (2009)
Joel GONZALEZ, an incompetent person, Petitioner,
v.
STATE of Florida, Respondent.
No. 2D08-5322.
District Court of Appeal of Florida, Second District.
May 20, 2009.
*38 James Marion Moorman, Public Defender, and Robert A. Young, General Counsel, Bartow, for Petitioner.
Bill McCollum, Attorney General, Tallahassee, and Diana K. Bock, Assistant Attorney General, Tampa, for Appellee.
NORTHCUTT, Chief Judge.
Joel Gonzalez seeks review of an order declining to dismiss a pending criminal charge even though it is undisputed that Gonzalez is incompetent to stand trial due to his mental retardation and there is no reasonable likelihood he can be restored to competency. We grant Gonzalez's petition for a writ of certiorari and quash the order.
In fall 2006, Gonzalez was arrested and charged with the felony offense of lewd molestation. On June 19, 2007, Gonzalez was adjudicated incompetent to stand trial due to his mental retardation, and he was involuntarily committed pursuant to section 916.302, Florida Statutes (2007). In February 2008, on defense counsel's motion, the circuit court vacated the commitment order and placed Gonzalez on conditional release pursuant to section 916.304. In the conditional release order, the court found that there was no reasonable expectation that Gonzalez would be restored to competency. But the order also included an inconsistent "conclusion of law" that Gonzalez was "in need of outpatient treatment *39 to restore competency to proceed." In September 2008, defense counsel filed a motion to dismiss the criminal charge under section 916.303(1). After a hearing, the court denied the motion to dismiss. Gonzalez seeks review of this order, arguing that immediate dismissal is required under the statute.
Gonzalez's petition in this court seeks either habeas corpus or certiorari relief. The supreme court has held that an order denying a motion to dismiss criminal charges against an incompetent defendant may be reviewed by common law certiorari. See Vasquez v. State, 496 So.2d 818 (Fla.1986) (providing that criminal defendant, adjudicated incompetent to stand trial, could seek certiorari review of order denying motion to dismiss filed under Fla. R.Crim. P. 3.213); see also Hines v. State, 931 So.2d 148 (Fla. 1st DCA 2006) (granting certiorari review of order denying incompetent defendant's motion to dismiss filed under § 916.303, Fla. Stat.).
To obtain common law certiorari relief, a petitioner must show that there has been a departure from the essential requirements of law that causes material and irreparable harm. Reynolds v. State, 963 So.2d 908, 909 (Fla. 2d DCA 2007). The elements of material harm and the absence of a remedy on appeal are jurisdictional requirements for certiorari relief. Id. at 910. We conclude that Gonzalez has carried his burden as to these elements. See Vasquez, 496 So.2d at 820 (concluding that incompetent criminal defendant was entitled to common law certiorari review due to absence of appellate review and necessity to preserve constitutional due process rights).
Having determined that Gonzalez has met the jurisdictional requirements for certiorari review, we must address whether he has demonstrated his entitlement to relief. A departure from the essential requirements of law, alternatively referred to as a violation of clearly established law, can be shown by a misapplication of the plain language in a statute. See Allstate Ins. Co. v. Kaklamanos, 843 So.2d 885 (Fla.2003); Justice Admin. Comm'n v. Peterson, 989 So.2d 663 (Fla. 2d DCA 2008). Thus we turn to the requirements of chapter 916, Florida Statutes, and to Gonzalez's claim that the circuit court's failure to dismiss the charge is a violation of the plain language of section 916.303(1).
Chapter 916 applies to criminal defendants who are either mentally ill or mentally deficient. Part I contains general provisions, part II governs forensic services for persons who are mentally ill, and part III governs forensic services for persons who are mentally retarded or autistic. Gonzalez falls under the provisions in part III.
The legislature has provided a substantive right to dismissal of criminal charges for "any defendant found to be incompetent to proceed due to retardation or autism. . . if the defendant remains incompetent to proceed within a reasonable time after such determination, not to exceed 2 years." § 916.303(1); see also Hines, 931 So.2d 148. The only exception to dismissal under this statute requires the court to specify "its reasons for believing that the defendant will become competent to proceed" within a specified time in the foreseeable future. § 916.303(1). In this case, the experts and the parties agree that there is no reasonable probability Gonzalez will ever become competent to proceed.
Nevertheless, based on an opinion by one of the experts, the State contends that Gonzalez would benefit from counseling and training on sexual abuse issues. The circuit court agreed to maintain Gonzalez on conditional release and ordered him to complete this training. On appeal as it did *40 below, the State argues that Gonzalez's right to dismissal does not arise until the two-year period referenced in section 916.303(1) has expired. In accepting this argument, the circuit court misapplied the plain language of that statute.
The statute establishes a period of two years as the outer limit for jurisdiction over a mentally retarded defendant, but the preceding language cannot be ignored-a defendant is entitled to a dismissal of a criminal charge "within a reasonable time. . ., not to exceed two years." § 916.303(1) (emphasis supplied). "In addition to the statute's plain language, a basic rule of statutory construction provides that the Legislature does not intend to enact useless provisions, and courts should avoid readings that would render part of a statute meaningless." State v. Goode, 830 So.2d 817, 824 (Fla.2002).
To determine whether "a reasonable time" has passed, when it has been less than two years, the criminal court must consider the single purpose warranting a pretrial exercise of jurisdiction over an incompetent defendant, to wit: restoring competency for trial. See Vasquez, 496 So.2d at 820 (stating that pretrial confinement and treatment of incompetent criminal defendant is directed solely to restoration of competency); cf. Jackson v. Indiana, 406 U.S. 715, 733, 92 S.Ct. 1845, 32 L.Ed.2d 435 (1972) (describing "rule of reasonableness" applied by federal courts to pretrial commitment of incompetent defendants, which allows commitment "only for a `reasonable period of time' necessary to determine whether there is a substantial chance of his attaining the capacity to stand trial in the foreseeable future"). Thus, a reasonable time has passed, and the defendant's substantive right to dismissal of the criminal charge arises, when it becomes evident that the defendant cannot be restored to competency.
By comparison, section 916.145, applicable to mentally ill defendants, provides a similar right to dismissal of criminal charges after a specific period, i.e., "if the defendant remains incompetent to proceed 5 years after such determination" unless the court can cite a reason to believe the defendant will regain competency. See Mosher v. State, 876 So.2d 1230 (Fla. 1st DCA 2004) (holding that, because the five-year period had not passed, circuit court did not err in refusing to dismiss criminal charges against mentally ill defendant). One court has explained the differences between the statutory treatment of mentally ill versus mentally retarded individuals by noting that "mental retardation and autism are typically lifelong conditions, whereas mental illness may be a condition more amenable to treatment." State v. Smith, 982 So.2d 756, 758 (Fla. 4th DCA 2008) (citing similar distinction noted in supreme court's amendment of criminal rules to be consistent with these statutes).
Numerous cases hold that an incompetent criminal defendant must be released from commitment when the undisputed evidence shows that the defendant's competency cannot be restored. "It is a defendant's `restorability' that allows commitment for competency training. The inability to restore the defendant requires dismissal of the charges against him or civil commitment." Roddenberry v. State, 898 So.2d 1070, 1073 (Fla. 5th DCA 2005) (reversing mentally retarded defendant's pretrial commitment under § 916.302(1) when court failed to make critical finding that competency could be restored); Mosher, 876 So.2d 1230 (requiring State to institute civil commitment proceedings or release mentally ill defendant when evidence showed no substantial probability that mentally ill defendant will regain competency).
*41 In this context, we see no appreciable distinction between commitment and conditional release, because the underlying purpose is the same. The statute governing dismissal of criminal charges is not limited to defendants who are committed under section 916.302, and it does not exclude defendants who are "only" on conditional release under section 916.304. See § 916.303.
When, as here, it is determined that the defendant can never be restored to competency, the criminal process must end and the State must pursue other options if necessary to secure the safety of the defendant or others. See, e.g., § 916.303(2) (providing for post-dismissal determinations of whether involuntary services are necessary); § 393.11, Fla. Stat. (2008) (providing for mentally retarded person's involuntary admission to residential services); see also Hines, 931 So.2d at 151 ("When charges are dismissed against a mentally retarded defendant ..., the State or the defendant's attorney may seek to involuntarily commit the defendant under certain conditions.").
Quashed and remanded.
KELLY and CRENSHAW, JJ., Concur.
