This is an appeal by minor, G.T.H., from the denial of his application for Writ of Habeas Corpus for release from a facility that has not been certified as suitable for the detention of children.
Section 51.12, Texas Family Code, provides in part:
“(c) In each county, the juvenile board, or if there is none, the judge of the juvenile court, shall personally inspect the detention facilities at least annually and shall certify in writing to the authorities responsible for operating and giving financial support to the facilities that they are suitable or unsuitable for the detention of children in accordance with:
(1) the requirements of Subsection (a) of this section;
(2) the requirements of Article 5115, Revised Civil Statutes of Texas, 1925, as amended, defining ‘safe and suitable jails,’ if the detention facility is a county jail; and
(3) recognized professional standards for the detention of children.
(d) No child shall be placed in a facility that has not been certified under Subsection (c) of this section as suitable for the detention of children. A child detained in a facility that has not been certified under Subsection (c) of this section as suitable for the detention of children shall be entitled to immediate release from custody in that facility.” (Emphasis added)
It is undisputed minor, G.T.H., is detained in the Eastland County jail, a facility that had not been certified under Subsection (c) of the Article. Subsection (d) expressly provides the consequence of a failure to comply with Subsection (c). The provision is clearly mandatory. General Provisions, 5 Tex. Tech L.Rev. 531 (1974).
The Legislature obviously recognized the difficulties presented by such a mandatory statute and by amendment, effective September 1, 1975, provided:
“(e) If there is no certified place of detention in the county in which the petition is filed, the designated place of detention may be in another county.”
We reverse and render. The sheriff is ordered to release the minor from the East-land County jail.