
955 So.2d 17 (2006)
Lucy D. HADI, Secretary, Florida Department of Children and Families, Petitioner,
v.
Enrique CORDERO, Daniel Fontecha and Eugene Roman, Respondents.
Nos. 3D06-2620, 33D06-2605, 3D06-2604, 3D06-2603.
District Court of Appeal of Florida, Third District.
December 6, 2006.
John J. Copelan, Jr., General Counsel, Department of Children and Families and John Anthony Raymaker, Assistant General Counsel, Tallahassee, and Karla Perkins, Assistant District Legal Counsel, for petitioner.
*18 Bennett H. Brummer, Public Defender and Valerie Jonas and John Eddy Morrison, Assistant Public Defenders; Charles J. Crist, Jr., Attorney General and Richard L. Polin, Assistant Attorney General; Katherine Fernandez Rundle, State Attorney and Angelica D. Zayas, Assistant State Attorney; Murray A. Greenberg, Miami-Dade County Attorney and Robert A. Duvall, Assistant County Attorney; Linda Kelly Kearson, General Counsel, Eleventh Judicial Circuit of Florida, for respondents.
Before FLETCHER, SHEPHERD, and SUAREZ, JJ.
SUAREZ, J.
The Florida Department of Children and Families ("DCF") petitions this court for writs of prohibition or, in the alternative, certiorari, to quash the orders of three circuit court judges. Each order under review grants respondents' petitions for writ of mandamus and directs DCF to take physical custody of respondents, each of whom has been declared mentally incompetent to stand trial, and places them in an appropriate forensic hospital facility for care and treatment to restore their competency to stand trial. Respondents alternatively petition this court for writs of habeas corpus for their release. We treat the petitions for writ of prohibition as petitions for writ of certiorari. See Art. V, § 4(b)(3), Fla. Const.; Fla. R.App. P. 9.030(b)(3); 9.100(c)(1),(e). We deny all petitions.
The respective trial courts have declared each one of the respondents to be mentally incompetent to proceed to trial on felony charges. Each respondent was committed by the trial judge to DCF for restoration of competency and treatment on a finding that he met the criteria for involuntary commitment under chapter 916, Florida Statutes (2006). DCF has placed each on a forensic waitlist for beds in an adult forensic mental healthcare facility. At the present time, there are between fifty-two and eighty-two persons around the state ahead of these three respondents on the waitlist of approximately 300 persons awaiting beds.
As of September 1, 2006, each of the respondents has been housed in a secure unit on the ninth floor of the Miami-Dade County Jail. As of the date of this opinion, DCF has yet to move them to appropriate facilities to receive the forensic treatment needed to regain competency to stand trial. According to the record, each of the respondents suffers from severe and worsening mental problems. Respondent, Eugene Roman, is a paranoid schizophrenic who has been in and out of hospitals for years. In April 2005, he was arrested and later rearrested for possession of marijuana. He was convicted and sentenced to 364 days in jail. While serving that sentence, Mr. Roman was placed in unit 9C in the Miami-Dade County Jail, and six days later, gouged out his eyes and is now blind. He stated that voices told him to hurt himself. Within months after his release, Mr. Roman was rearrested on charges of sexual battery, aggravated battery and kidnapping, and was confined again to the ninth floor where he slashed his wrists and now remains. He is in what has been termed as an overwhelming depressive state, and hears voices telling him that he should hurt himself. Respondent, Daniel Fontecha, a homeless man, has a history of mental illness and repeatedly has been hospitalized. He was arrested on charges of aggravated assault with a deadly weapon, criminal mischief, and resisting an officer without violence. He has been on the ninth floor of the Miami-Dade County Jail for more than eight months where DCF is administering antipsychotic medication. Respondent, Enrique Cordero, was arrested *19 for sexual battery. He is preoccupied with suicide and has auditory hallucinations telling him to kill himself. He has scars on his wrists and arms from various suicide attempts and is in need of psychiatric care. These are but three of many individuals presently languishing on the ninth floor of the Miami-Dade County Jail awaiting services from DCF to restore them to competency to enable them to proceed to trial.
Affidavits of experts attest to deplorable conditions on the ninth floor of the Miami-Dade County Jail. Dr. Joel Dvoskin states that, in his expert opinion, the conditions fall below standards of care for any reasonable mental health practitioner. He further avers that the conditions in unit 9C would likely exacerbate the symptoms of serious mental illness such as the respondents'. He concluded that, the longer a person is confined to 9C, the more treatment would be required to restore him to competency to stand trial.
Each respondent filed a petition for writ of mandamus in the circuit court seeking an order requiring DCF to comply with its statutory duty to accept and place each of them in an appropriate forensic facility or, in the alternative, grant their petitions for habeas corpus. On October 12, 2006, October 17, 2006, and October 24, 2006, the trial judges granted respectively Mr. Roman's, Mr. Cordero's, and Mr. Fontecha's petition for mandamus. Each trial court ordered DCF to comply forthwith with its statutory duty to take physical custody of the respondents and to place each in an appropriate facility for treatment. Lucy Hadi, Secretary of DCF, filed the present Emergency Petition[s] for Writ of Prohibition or Certiorari and Emergency Motion[s] for Stay in each of the cases. We previously granted the motions for stay pending outcome of these proceedings. The proceedings have been conducted on an expedited basis.
The Florida legislature was very specific in drafting the statutes in question. The statutes require DCF to give immediate and appropriate treatment to those ordered incompetent to stand trial due to mental illness:
(1) ADMINISTRATION.The Department of Children and Family Services is designated the "Mental Health Authority" of Florida. The department and the Agency for Health Care Administration shall exercise executive and administrative supervision over all mental health facilities, programs, and services.
§ 394.457(1), Fla. Stat. (2006)(emphasis added).
Section 916.107, Florida Statutes (2006), states as follows:
(1) RIGHT TO INDIVIDUAL DIGNITY.
(a) The policy of the state is that the individual dignity of the client shall be respected at all times and upon all occasions, including any occasion when the forensic client is detained, transported, or treated. Clients with mental illness, retardation, or autism and who are charged with committing felonies shall receive appropriate treatment or training. In a criminal case involving a client who has been adjudicated incompetent to proceed or not guilty by reason of insanity, a jail may be an emergency facility for up to fifteen days following the date the department or agency receives a completed copy of the court commitment order containing all documentation required by the applicable Florida Rules of Criminal Procedure. . . .
§ 916.107(1)(a), Fla. Stat. (2006)(emphasis added).

* * *

*20 (4) QUALITY OF TREATMENT.
(a) Each forensic client shall receive treatment or training suited to the client's needs, which shall be administered skillfully, safely, and humanely, with full respect for the client's dignity and personal integrity. . . .
§ 916.107(4)(a), Fla. Stat. (2006)(emphasis added).
Pursuant to Florida Statutes, DCF shall provide treatment for persons ordered mentally incompetent to stand trial. The requirement falls on DCF as soon as a state court enters an order committing the mentally incompetent person for treatment. Local officials may retain physical custody for a period of time following the court's order, but the inmate is no longer the legal responsibility of local officials once the individual is declared incompetent. Miller v. Carson, 524 F.Supp. 1174 (M.D.Fla.1981); Facyson v. Jenne, 821 So.2d 1169 (Fla. 4th DCA 2002). More than thirty days before the respondents filed their petitions for writ of mandamus, DCF received the commitment papers for each respondent. To date, DCF has yet to transfer any of the respondents from the Miami-Dade County Jail to appropriate forensic facilities.
DCF argues persuasively on appeal, as it did in the trial court, that it does not now have the beds necessary to accommodate, not only these respondents, but dozens of other mentally incompetent individuals around the state. It also argues it lacks the resources on its own, and has not been appropriated funds by the legislature to obtain more beds at this time. DCF admits it has a statutory obligation to accept appropriately committed persons within fifteen days after receipt of the commitment orders. DCF does not deny it received commitment orders for each of the respondents more than thirty days before the petitions for mandamus were filed. DCF argues that it cannot comply with its statutory duties because, as of October 20, 2006, there were only 1,329 adult forensic beds in the DCF state mental health facility system. DCF states that these beds include 917 secure forensic beds and 412 civil forensic step-down beds all of which presently are occupied. In order to immediately place these respondents, DCF claims it would have to jump them over other individuals from around the state who are ahead of the respondents on the forensic waitlist. This court is not unsympathetic to this problem and realizes DCF is a hard-working agency that might be stretched beyond its capacity. But, for two reasons, this argument fails.
First, the Florida Legislature drafted Chapter 916, Florida Statutes, as a mandatory statute. DCF is given no discretion to either comply or not comply with the statutory requirements. The statute states that the intent of the legislature is for DCF to supply appropriate forensic facilities for people like respondents who have been adjudged mentally incompetent to stand trial. The statute states that DCF shall provide appropriate treatment to persons with mental illnesses. It goes on to state that DCF shall administer treatment. Nowhere does the statute give DCF the discretion not to provide, within fifteen days of commitment, the necessary treatment in an appropriate forensic facility because DCF does not have enough beds or funding to meet the State's need for beds.
Second, this is not the first time state-wide that the same issue has arisen and that DCF has raised the same argument of insufficient beds or funds. Our research reveals cases going back at least twenty *21 years.[1] In each of the cases, the court rejected the same argument as raised here.
To prevail on a petition for writ of certiorari, the party seeking review must show that the order under review departs from the essential requirements of law and that the harm resulting from the error cannot be cured on appeal from a final judgment. See Martin-Johnson, Inc. v. Savage, 509 So.2d 1097 (Fla.1987). The orders DCF requests this court to quash are orders granting petitions for mandamus ordering DCF to comply forthwith with the statutory duties pursuant to chapter 916, Florida Statutes. In each of these cases, the trial court did not depart from the essential requirements of law. Each trial court simply ordered DCF to comply with its statutory requirements pursuant to chapter 916. A petition for writ of mandamus must allege a violation of a clear legal duty. Jackson v. Fla. Dep't of Corr., 790 So.2d 381 (Fla.2000). In each case, the petition alleges a violation by DCF of its clear legal duty under chapter 916, Florida Statutes, to take custody of, and to place, each respondent in an appropriate forensic facility within fifteen days of the date of the commitment orders. The official duty required by a writ of mandamus must be ministerial and not discretionary. PCA Life Ins. Co. v. Metro. Dade Co., 682 So.2d 1102 (Fla. 3d DCA 1995). In each case, DCF has no discretion but to comply with its duty pursuant to the Florida Statutes. For all the reasons given above, the petitioner's requests for writs of certiorari are denied.[2]
This court also denies respondents' petitions for habeas corpus. Although we have the power to release individuals being detained without legal authority, we decline to do so as release would not be an appropriate remedy in any of these cases at this time.
Petitions for certiorari denied; petitions for habeas corpus denied.
NOTES
[1]  See, e.g., Miller v. Carson, 524 F.Supp. 1174 (M.D.Fla.1981); Facyson v. Jenne, 821 So.2d 1169 (Fla. 4th DCA 2002); Dep't of Children & Family Servs. v. M.H., 830 So.2d 849 (Fla. 2d DCA 2002); State Dep't of Health & Rehab. Servs. v. Maxwell, 667 So.2d 980 (Fla. 4th DCA 1996); Dep't of Health & Rehab. Servs. v. Brooke, 573 So.2d 363 (Fla. 1st DCA 1991); Dep't of Health & Rehab. Servs. v. Niznik, 548 So.2d 1161 (Fla. 2d DCA 1989)(trial court properly ordered placement of juvenile in appropriate facility providing psychiatric treatment regardless of funding situation of HRS).
[2]  The issue of separation of powers does not need to be addressed. The writs of mandamus direct only that DCF comply with its statutory duties. Nowhere do the writs attempt to direct DCF how to appropriate or spend its funds.
