
496 So.2d 818 (1986)
Robert VASQUEZ, Petitioner,
v.
STATE of Florida, Respondent.
No. 67659.
Supreme Court of Florida.
October 30, 1986.
Paul Morris of the Law Offices of Paul Morris, P.A., Specially Appointed Counsel, Coral Gables, for petitioner.
Jim Smith, Atty. Gen., and Jack B. Ludin and Mark J. Berkowitz, Asst. Attys. Gen., Miami, for respondent.
OVERTON, Justice.
This is a petition to review Vasquez v. State, 474 So.2d 394 (Fla. 3d DCA 1985), in which the district court held that petitioner, Robert Vasquez, could not appeal a trial court order denying his motion to dismiss charges on grounds that five years had passed since he was first adjudicated incompetent to stand trial. The district court certified its decision to be in direct conflict with Ricciardelli v. State, 453 So.2d 199 (Fla. 4th DCA 1984). We find conflict and have jurisdiction. Art. V, § 3(b)(3), Fla. Const. We find Vasquez is entitled to review *819 by a petition for common law certiorari; on this case's record, however, we conclude that he was not denied the essential requirements of law and, consequently, approve the result of the district court decision.
In 1979, Vasquez was arrested for first-degree murder and adjudicated incompetent to stand trial. In 1984, Vasquez's counsel moved to dismiss the charges pending against his client pursuant to Florida Rule of Criminal Procedure 3.213(b).[*] The parties stipulated that Vasquez met the criteria for involuntary hospitalization and that five years had passed since he was first adjudicated incompetent. At an evidentiary hearing, experts offered conflicting testimony as to whether Vasquez would be competent in the foreseeable future. The trial court concluded that the evidence failed to establish that there was no substantial probability Vasquez would become competent to stand trial in the foreseeable future and denied Vasquez's motion to dismiss.
The district court determined that, if it were to reach the merits of Vasquez's appeal, it would find that substantial competent evidence supported the trial court's decision and affirm. Declining to reach the case's merits, however, the district court dismissed Vasquez's appeal. The district court held that an order "declining to dismiss charges under Rule 3.213(b) against a defendant who indisputably must remain involuntarily hospitalized, has no real effect upon the defendant, and thus, he cannot be heard to complain about the ruling." Vasquez, 474 So.2d at 395. According to the district court, "only a party injuriously affected by the judgment or order sought to be reviewed may appeal." Id.
We disagree with the district court's dismissal of Vasquez's appeal. In Ricciardelli v. State, the Fourth District Court of Appeal recognized the right of appeal in a similar case. In that action, the district court stated:
Ordinarily, the denial of a motion to dismiss would not be appealable because the issue could be raised after a disposition of the case on the merits. However, because of the determination that Ricciardelli remains incompetent to stand trial, the charges may never be decided on the merits, and without this review Ricciardelli would be effectively denied any review of the trial judge's decision.
453 So.2d at 200 (footnote omitted). In State v. Vigil, 410 So.2d 528 (Fla. 2d DCA 1982), the Second District Court of Appeal, under comparable circumstances, allowed the state to seek review by a petition for writ of common law certiorari where the state challenged a court order releasing a defendant acquitted by reason of insanity.
We find that a defendant is entitled to a review of a trial court's determination on a motion to dismiss criminal charges pursuant to rule 3.213(b). Even though direct appeal is not authorized, we find, as the Second District did in Vigil, that a petition for common law certiorari is appropriate to review the matter. If we ruled otherwise, an individual found incompetent to stand trial would have no appellate review of the evidence's sufficiency on this *820 issue and would effectively be placed in permanent commitment. In Jackson v. Indiana, 406 U.S. 715, 92 S.Ct. 1845, 32 L.Ed.2d 435 (1972), the United States Supreme Court established certain constitutional due process rights to an incompetent defendant. Review by common law certiorari is necessary to ensure the trial court's proper application of those constitutional mandates to an incompetent accused.
In the instant case, the district court found competent substantial evidence before the trial court that it was foreseeable Vasquez could become competent to stand trial. While the record reflects conflicting evidence on the possibility of Vasquez's regaining his competence, we find sufficient evidence to affirm the trial court and conclude that there has been no denial of the essential requirements of law. Finally, we reject the district court's reasoning that the type of commitment is unimportant to Vasquez. The test and treatment for incompetency to stand trial and for involuntary civil commitment are different. The test for incompetency to stand trial relates only to a defendant's ability to consult with his lawyer and understand charges against him. Once a defendant is found incompetent to stand trial, his treatment is directed towards achieving competency to stand trial. He may be confined solely to accomplish that purpose, even though he does not endanger himself or others. The test for civil involuntary commitment, on the other hand, is whether a person needs treatment and is a danger to himself or others. A person civilly committed may be confined only when the principles of the dangerousness standard have been met. Greenwood v. United States, 350 U.S. 366, 76 S.Ct. 410, 100 L.Ed. 412 (1956). The dangerousness requirement is unnecessary to a finding of incompetency to stand trial.
For the reasons expressed, we approve the result of the district court decision.
It is so ordered.
McDONALD, C.J., and ADKINS, BOYD, EHRLICH, SHAW and BARKETT, JJ., concur.
NOTES
[*]  Rule 3.213(b) provides:

If at any time after five years after determining a person incompetent to stand trial when charged with a felony or one year when charged with a misdemeanor, the court, after hearing, determines that the defendant remains incompetent to stand trial, that there is no substantial probability that the defendant will become mentally competent to stand trial in the foreseeable future and that the defendant does meet the criteria for involuntary hospitalization set forth by law, the court shall dismiss the charges against the defendant and commit the defendant to the Department of Health and Rehabilitative Services for involuntary hospitalization or residential services solely under the provisions of law, or may order that he receive outpatient treatment at any other facility or service on an outpatient basis subject to the provisions of those statutes. In the order of commitment, the judge shall order that the administrator of the facility notify the State Attorney of the committing circuit no less than 30 days prior to the anticipated date of release of the defendant.
