
718 So.2d 74 (1998)
ALABAMA DEPARTMENT OF MENTAL HEALTH AND MENTAL RETARDATION
v.
STATE of Alabama.
(In re The Matter of C.L.G.).
2970460.
Court of Civil Appeals of Alabama.
July 10, 1998.
*75 Nancy S. Jones, Department of Mental Health and Mental Retardation, for appellant.
No brief filed for appellee.
THOMPSON, Judge.
This appeal is from an order adjudicating a juvenile as a multi-needs child and a subsequent order directing the Alabama Department of Mental Health and Mental Retardation to reimburse the Lauderdale County Commission for the cost of maintaining the juvenile in a detention facility. The Department appeals, raising a single issue: whether the juvenile court erred in ordering it to reimburse the county for the cost of the juvenile's care in a detention facility pending his admission to the Department's adolescent unit.
We note initially that a writ of mandamus is the proper method for vacating an order that a trial court had no authority to enter. Ex parte Department of Human Resources, 620 So.2d 619 (Ala.1993); Ex parte Department of Human Resources, 553 So.2d 1159 (Ala.Civ.App.1989); Ex parte State Department of Mental Health and Mental Retardation, 555 So.2d 1132 (Ala.Civ.App.1989). For the purpose of judicial economy, we will treat this appeal as a petition for a writ of mandamus. See, e. g., Ex parte Lammon, 688 So.2d 836 (Ala.Civ.App.1996). Mandamus is an extraordinary writ, which will issue only if the following four requirements are met: 1) the petitioner has a clear legal right to the relief sought; 2) the respondent has an imperative duty to respond and refuses to do so; 3) no adequate remedy exists at law; and 4) the jurisdiction of the court is properly invoked. Martin v. Loeb & Co., 349 So.2d 9 (Ala.1977).
On January 7, 1998, at a hearing on delinquency petitions, the juvenile court entered an order that adjudicated C.L.G. as a multi-needs child and ordered him to undergo a 30-day evaluation at the Bryce Hospital Adolescent Unit. During the hearing, the Department advised the judge that because of a lack of available space at the adolescent unit, it anticipated a three-week delay before C.L.G. could be admitted. Over the objection raised by the Department, and as a part of its January 7 order, the juvenile court directed the Department to reimburse the county for the cost of the juvenile's detention until he was admitted to the adolescent unit for evaluation. The juvenile court entered a subsequent order on January 15, 1998, ordering the Department to pay $1,625 in detention costs to the Lauderdale County Commission for 25 days of detention. The Department contends that the juvenile court was without authority to direct it to reimburse the county *76 for detention expenses during the time before Department facilities became available. We agree.
Ala.Code 1975, § 12-15-10, requires the appropriate county to bear the expense for care and treatment of indigent juveniles. See also Ex parte Department of Human Resources, 620 So.2d 619 (Ala.1993); Ex parte Department of Mental Health, 511 So.2d 181 (Ala.1987); Childree v. Health Care Authority of Huntsville, 548 So.2d 419 (Ala.1989). Our Supreme Court has stated that "[t]he Department of Mental Health is... charged by the Legislature to accept minors alleged to be mentally ill and treat them by means of its various programs and facilities." Ex parte Department of Mental Health, 511 So.2d at 183.
The Alabama Juvenile Justice Act provides for reimbursement for costs for support and treatment of juveniles adjudicated to be in need of mental health services from financially able parents, guardians, and fiduciaries of the juvenile. Ala.Code 1975, § 12-15-9, provides a means for assessing costs incurred in a child's support or treatment against the parents or persons legally responsible for the support of the child, and § 12-15-11 authorizes reimbursement of these costs from a child's estate in the hands of his legal guardian or trustee. From the scant information contained in the record, it does not appear that either of these sections applies in this case.
This court has determined that the Department of Mental Health is required to accept juveniles adjudicated to be in need of mental health care services unless, because of inadequate facilities, accepting them would create overcrowded conditions. Matter of R.D.S., 600 So.2d 308, 310 (Ala.Civ.App. 1992). If the Department is unable to provide immediate services because of a lack of available facilities, the county has been held responsible for private psychiatric care until the Department is able to provide for the juvenile's care. Id.
In this case, the juvenile was committed to the Department for a 30-day evaluation and was detained in a county detention facility until the Department could provide the mental health care services ordered by the juvenile court. The juvenile court had no authority to direct the expenditure of state funds to reimburse the county for the care and maintenance of a juvenile committed to the custody of the Department, during the period before the Department had facilities available to accept the juvenile for treatment. Ex parte Department of Mental Health, 511 So.2d 181 (Ala.1987). It is clear that the Department is not legally obligated to pay the detention costs incurred by the juvenile before he was admitted to the adolescent unit.
WRIT GRANTED
ROBERTSON, P.J., and YATES, MONROE, and CRAWLEY, JJ., concur.
