This petition for a writ of mandamus, filed in this Court by Lewis Gaisden Cunningham, seeks to compel Judge Dale Segrest of the Circuit Court of Tallapoosa County, Alabama, to vacate his order committing Cunningham to the custody of the Alabama Department of Mental Health and Mental Retardation. The petition is due to be granted.
The undisputed facts show that in May 1993 Cunningham was arrested for the unlawful possession of cocaine and for giving a false name to a law enforcement officer. He was arraigned and released on bond.
On April 4, 1994, defense counsel filed a motion for a court-ordered mental evaluation. On April 13, 1994, Judge Segrest granted that motion and ordered outpatient evalúa-: tion. On May 17, 1994, Cunningham was arrested and placed in the Tallapoosa County Jail pursuant to a writ of arrest issued by Judge Segrest because Cunningham failed to appear for the court-ordered outpatient mental evaluation.
Cunningham was given a mental evaluation at the Tallapoosa County Jail on May 25, 1994. The clinical psychologist, in his report of June 6, 1994, expressed “a serious but not necessarily a convincing question about his ability to stand trial” and recommended “that strong consideration be given to not allowing Mr. Cunningham to proceed with disposition of the charges against him at this time.”
On June 15, 1994, Judge Segrest ordered Cunningham committed to the Department of Mental Health and Mental Retardation for treatment:
“Based upon the evidence and testimony presented, the Court finds there is evidence that the Defendant is incompetent to stand trial at the present time; however, there is no evidence which tends to show the defendant is a danger to himself or others.
“IT IS ORDERED, ADJUDGED AND DECREED that pursuant to Rule 11, Alabama Rules of Criminal Procedure, the Defendant is hereby committed to the Alabama Department of Mental Health and Mental Retardation for treatment and that the defendant receive such treatment until *104such time as he is competent to stand trial on the charges presently pending. The Court shall receive reports from the professional staff of the Department and shall review this matter pursuant to Rule 11.
“Pending further order of the Court, the Defendant is to be held in the custody of the Sheriff of Tallapoosa County, Alabama.”
On July 5, 1994, after a hearing to review Cunningham’s case, Judge Segrest again order Cunningham committed:
“This matter came on for review on the 29th day of June, 1994, and the Defendant was present in Court and represented by counsel. The Court’s Order dated the 15th day of June, 1994, remains in full force and effect; and the Defendant is to receive inpatient treatment at Taylor Hardin Secure Medical Facility. Pending defendant’s being taken into said facility, the defendant shall remain in the custody of the Sheriff of Tallapoosa County, Alabama.”
On July 8,1994, through counsel, Cunningham filed this petition for a writ of mandamus. The Respondent, Judge Segrest, filed an answer, the greater portion of which is set out below.
“1) The Defendant is charged with the offense of possession of cocaine.
“2) The Court experienced great difficulty in directing the Defendant to [undergo] a mental examination. The mental examination, when completed, indicates the Defendant is not competent to stand trial.
“3) There is little possibility that the Court would be able to enter any enforceable order which would direct that the Defendant receive treatment on any out-patient basis.
“4) Under the circumstances, the most humane and appropriate order for this Court to enter is that the Defendant receive in-patient treatment at Taylor Hardin Secure Medical Facility.
“It appears to the Court appropriate that reasonable efforts be made to restore the Defendant to health, and it is the understanding of the undersigned Judge that this procedure is often provided in procedural rules of other states. If so, then there is no constitutional mandate which would forbid the present course of action; and the Alabama Rules of Criminal Procedure do not provide a clear, humane, and constitutional answer to the dilemma presented by cases of this type.
“Certainly, if the Defendant cannot be restored to health with a reasonable amount of medical treatment, the Court will have no alternative but to discharge the Defendant and dismiss the case. To simply discharge the Defendant, however, after he has been indicted for criminal activity, without dealing in any substantive manner with the charges and without attempting to restore the Defendant to health, appears to this Court to be an anomalous and inappropriate result. The undersigned Judge directed the filing of the present mandamus so that these matters could receive the careful attention of the appellate courts of this state.”
The factual situation presented falls within Rule 11.6, (c)(3), A.R.Crim.P.:
“(3) If the judge or jury determines, by clear, unequivocal, and convincing evidence, that the defendant is incompetent, but that there is a substantial probability that the defendant will be restored to competency within a reasonable period of time, and
“(i) The judge or jury also finds that the defendant’s being at large poses a real and present threat of substantial harm to himself or others, as evidenced by a recent overt act, the court shall order the defendant committed to the custody of the Department of Mental Health and Mental Retardation for therapy and treatment, in an institution suitable to receive such persons, for a period not to exceed six (6) months or the defendant’s earlier restoration to competency, or “(ii) The judge or jury does not find the requisite harm, the court shall release the defendant, as provided in Rule 7.3, under such conditions as the court deems are necessary to ensure that the defendant receives therapy and treatment designed to restore the defendant to competency within a reasonable peri*105od of time, and when applicable, to minimize or abate any risk of harm threatened by the defendant’s being at large.”
Without a finding that a defendant “poses a real and present threat of substantial harm to himself or others, as evidenced by a recent overt act,” a circuit court may not “order the defendant committed to the custody of the Department of Mental Health and Mental Retardation for therapy and treatment,” but must release the defendant, “as provided in Rule 7.3, under such conditions as the court deems are necessary to ensure that the defendant receives therapy and treatment.”
Then, if the defendant fails to comply with the conditions attached to his release, the trial court may revoke that release. Rule 7.3, A.R.Crim.P., sets forth mandatory conditions that must be attached and additional conditions that may be attached to the release of a defendant charged with a criminal offense before or after conviction. If those conditions are violated, Rule 7.5(a) provides that a warrant of arrest shall issue upon the prosecutor’s filing a motion “stating with particularity the facts or circumstances constituting a material breach of the conditions of release.” Rule 7.5(b) provides: “If, after a hearing on the matters set forth in the motion, the court finds that the defendant released has not complied with or has violated the conditions of release, ... the court may modify ... or revoke the release.”
Under the Alabama Rules of Criminal Procedure, a defendant who has been determined to be incompetent to stand trial and who does not pose a real and present threat of substantial harm to himself or others cannot be incarcerated for therapy and treatment. Such a defendant must be released under conditions the court deems necessary to ensure that the defendant receives therapy and treatment. If the defendant then violates those conditions, such as by failing to appear for ordered out-patient treatment, the trial court may then, after a proper hearing, revoke the defendant’s release.
Cunningham has been denied the procedural due process to which he is entitled under the Alabama Rules of Criminal Procedure. The petition for a writ of mandamus is granted. The trial court is directed to set aside its orders of June 15, 1994, and July 5, 1994, and release the petitioner “under such conditions as the court deems are necessary to ensure that the defendant receives therapy and treatment designed to restore the defendant to competency within a reasonable period of time, and ... [if] applicable, to minimize or abate any risk of harm threatened by the defendant’s being at large.” Rule 11.6(c)(3)(ii), A.R.Crim.P.
PETITION GRANTED.
All Judges concur.