
627 S.W.2d 147 (1982)
Homero TREVINO, et ux., Relators,
v.
Honorable Ricardo H. GARCIA, Judge, Respondent.
No. C-715.
Supreme Court of Texas.
January 27, 1982.
*148 Nicolas, Morris & Barrow, Pat Morris and John Barrow, Corpus Christi, for relators.
Alex Gabert, Rio Grande City, for respondents.
CAMPBELL, Justice.
Homero and Guadalupe Trevino seek a writ of mandamus to compel the Honorable Ricardo H. Garcia, Judge of the 229th District Court of Starr County, to vacate a habeas corpus order giving custody of their minor daughter to an aunt and uncle.
Homero and Guadalupe Trevino are the natural parents of a minor child, Zelda. When Zelda was about 6 months old Homero and Guadalupe consented to Claudio and Elma Garcia raising Zelda. Elma is Guadalupe's sister. The Garcias kept and cared for Zelda until the summer of 1981, over 6 years.
The Trevinos live in Corpus Christi. In June 1981, they took Zelda to Corpus Christi and refused to allow her to return to the Garcias' home in Starr County. In July 1981, the Garcias brought suit in Starr County for habeas corpus relief. They also sued to terminate the Trevinos' parental rights and to adopt Zelda.
After a hearing on the habeas corpus only, the district court ordered the Trevinos to return Zelda to the Garcias. The Trevinos then brought this mandamus proceeding.
The Trevinos have not signed a relinquishment of their parental rights; their parental rights have not been terminated by court order; and Zelda has not been the subject of any adoption proceedings. The right to possession of Zelda is not governed by a court order.
The Garcias claim they are entitled to custody of Zelda because they have adopted her by estoppel. We disagree.
The Family Code[1] section 14.10(e) provides:
§ 14.10. Habeas Corpus
(e) If the right to possession of a child is not governed by a court order, the court in a habeas corpus proceeding involving the right of possession of the child shall compel return of the child to the relator if, and only if, it finds that the relator has a superior right to possession of the child by virtue of the rights, privileges, duties, and powers of a parent as set forth in Section 12.04 of this code.
The Family Code section 12.04(1) provides:
§ 12.04. Rights, Privileges, Duties and Powers of Parent
Except as otherwise provided by judicial order or by an affidavit of relinquishment of parental rights executed under Section 15.03 of this code, the parent of a child has the following rights, privileges, duties, and powers:
(1) the right to have physical possession of the child and to establish its legal domicile...
*149 The Family Code defines "Parent" in subsection 11.01(3) as "the mother, a man as to whom the child is legitimate, or an adoptive mother or father" but excludes those whose parental rights have been terminated. Additionally, section 16.03 provides that a valid adoption must be preceded by either a judicial termination of the rights of the natural parents, or an irrevocable relinquishment of parental rights by affidavit meeting the requirements of section 15.03(b). The Family Code requires a judicial order for adoption.
The judgment of habeas corpus, rendered by Judge Garcia, finds that Zelda Trevino was illegally confined and restrained of her liberty in Nueces County and that the Garcias have a superior right to the possession of the minor child.
These findings directly conflict with section 12.04 giving parents the right to physical possession of their children. This Court has held the provisions of section 14.10 impose a mandatory duty upon a trial judge to grant a writ of habeas corpus where an existing court order vests the relator with the right to possession of children. Elliott v. Bradshaw, 587 S.W.2d 108 (Tex. 1978). We hold there is also a mandatory duty to deny a writ of habeas corpus if the child is in the possession of its natural parents and the right to possession is not governed by a court order. Section 14.10(e). A habeas corpus proceeding will not be used to determine custody of a child. The Garcias failed to prove legal right to possession of the child. This writ therefore should be denied. Strobel v. Thurman, 565 S.W.2d 238, 239 (Tex.1978).
A writ of mandamus will issue only if Judge Garcia fails to comply with this opinion.
BARROW, J., not sitting.
NOTES
[1]  All references to the Family Code are to TEX.FAM.CODE ANN. (Vernon 1975 & Supp. 1980-1981).
