
553 So.2d 1159 (1989)
Ex parte DEPARTMENT OF HUMAN RESOURCES of the State of Alabama.
(In the matter of Jason Rutledge GREENE, a child under 18 years of age).
Civ. 7126.
Court of Civil Appeals of Alabama.
October 18, 1989.
*1160 William Prendergast, Coleman Campbell and Stephen K. Simpson, Asst. Attys. Gen., for appellant.
No Brief for Respondent.
L. CHARLES WRIGHT, Retired Appellate Judge.
The Alabama Department of Human Resources filed a petition for writ of mandamus to require the Montgomery County Juvenile Court to set aside its order styled "In the Matter of Jason Rutledge Greene, a Child under Eighteen Years of Age."
The mother of the child had filed a petition seeking to have the child declared "dependent" and in need of immediate mental health treatment because the child had attempted suicide by cutting both wrists. After an ex parte hearing, held without notice to DHR, the court made the following findings and order:
"1. That Jason Rutledge Greene is a dependent child as defined by the laws of the State of Alabama.
"2. That he is a child in need of mental health treatment and has committed a recent overt act (cutting his wrists) demonstrating a danger to himself.
"3. That there is probable cause to believe that he is in need of involuntary commitment to a mental institution.
"4. That the least restrictive alternative presently available and appropriate [is] in the Teen Unit of Humana Montgomery Hospital.
"5. His temporary legal custody is awarded to the Montgomery County Department of Human Resources and that his physical custody is vested in the Humana Montgomery Restorer Teen Unit. And that the institution is authorized and directed to provide any and all medical, psychological, or other treatment and evaluation as may be necessary for him.
"6. That the cost of this treatment shall be borne by the Department of Human Resources until or unless otherwise directed or Ordered by this Court at future hearings." (emphasis added).
DHR contends that the juvenile court lacks authority to order it to pay the costs associated with the mental health treatment of the child.
In response, the guardian ad litem and juvenile court assert that since the child was attempting to commit suicide, and thus an "emergency" existed necessitating immediate psychiatric treatment, the juvenile court had the authority, under § 12-15-70 Alabama Code (1975), "to order emergency medical care to any such person, agency or department charged with the detention, temporary shelter care or other care of a child within its jurisdiction." (Emphasis theirs.)
Though § 12-15-70 grants the juvenile court the authority to order "a physical or mental examination" (emphasis added) of any child, either before or after a hearing, the costs associated with such "shall be a valid charge against the county unless otherwise provided for." § 12-15-70; see also, § 12-15-10.
In an analogous situation, our supreme court held in Matter of McCain, 348 So.2d 780 (Ala.1977), that neither *1161 § 12-15-71(a)(5) nor § 12-15-70 authorizes the juvenile court to charge, as court costs, the costs of the mental health treatment of a minor child in an out-of-state private mental health facility. The phrase "unless otherwise provided for," found in § 12-15-70, was held to be clarified by § 12-15-10, which requires parents, or others legally obligated to support the child, to pay the expenses incurred in caring for the child if they are financially able. Matter of McCain, 348 So.2d 780.
In the case sub judice, the mother of the child asserted her inability to pay for the mental health treatment of the child. In such situations the county, and not the state, is responsible for the payment of the costs generated by the mental health treatment of the child.
"The Legislature's power to determine the appropriations for each state agency cannot be usurped by either [the judicial or executive branches of government]. The Department of Mental Health is mandated ... [and] charged by the Legislature to accept minors alleged to be mentally ill and treat them by means of its various program and facilities. [In none] of these statutes [Title 12 Chapter 15] does the Legislature [direct] that anyone other than the Department of Mental Health is authorized to care for and treat these children." (emphasis added)
Ex parte Department of Mental Health, 511 So.2d 181, 183 (Ala.1987).
Recently, in Childree v. Health Care Authority, 548 So.2d 419 (Ala.1989), the supreme court extended this principle and held that costs associated with the "private psychiatric treatment of indigent persons awaiting acceptance at a Department of Mental Health facility" are to be assessed against that person or his family, or, in the alternative, against the county. Childree v. Health Care Authority, 548 So.2d at 421 (emphasis added).
Therefore, the entity charged with the responsibility for the custody and treatment of children with mental illness is the Department of Mental Health and not DHR. If the child's parents, or others legally obligated, are financially unable to pay such expenses, the county is statutorily required to do so.
Mandamus is the proper remedy to vacate an order that a trial court had no power to enter. Great Atlantic & Pacific Tea Co. v. Sealy, 374 So.2d 877 (Ala.1979).
The writ is due to be granted unless within fourteen days the juvenile court directs that the costs of the child's mental health treatment in the private psychiatric facility be borne by Montgomery County.
The foregoing opinion was prepared by Retired Appellate Judge L. CHARLES WRIGHT while serving on active duty status as a judge of this court under the provisions of section 12-18-10(e), Code 1975, and this opinion is hereby adopted as that of the court.
WRIT GRANTED CONDITIONALLY.
All the Judges concur.
