Before Bassel, Wallach, and Walker, JJ. Memorandum Opinion by Justice Wallach MEMORANDUM OPINION Relator J.D. filed a petition for writ of habeas corpus and motion for emergency relief, claiming that he is being illegally restrained by a void contempt order. We grant him relief. Background The State filed a petition alleging that J.D., who is now seventeen years old, engaged in delinquent behavior when he was sixteen years old. At a September 27, 2021 detention hearing held via Zoom, J.D. became disruptive and told the trial judge, “F[***] you,” among other things. The trial judge summarily held J.D. in criminal contempt and sentenced him to 180 days’ confinement in the Tarrant County Jail, beginning after final disposition of the State’s petition to adjudicate, and a $500 fine. On October 19, 2021, the trial judge adjudicated J.D. guilty of engaging in delinquent behavior and also held a disposition hearing. The trial judge sentenced J.D. to probation until his eighteenth birthday. The trial judge made the following finding in the disposition order: “the child is physically or mentally incapable of participating in community service; participating in community service will be a hardship on the child, or the child’s family[;] or the child has shown good cause that community service should not be required.”[1] On November 3, 2021, J.D. filed a petition for writ of habeas corpus and emergency motion for temporary relief in this court, alleging that he was still being held in the custody of the Tarrant County Juvenile Probation Department in the Tarrant County Juvenile Detention Center as a result of the trial court’s contempt order. We requested a response from the State but kept J.D.’s emergency motion pending. In its response, the State agreed with J.D. that the trial court’s contempt order is void, and the State urged that J.D. be released from detention immediately. We then granted J.D.’s emergency motion for temporary relief, ordering that he be released without bond. J.D. was released the same day. We now address the merits of the pending petition. Standard of Review An original habeas corpus proceeding is a collateral attack on a contempt order. Ex parte Gordon, 584 S.W.2d 686, 687–88 (Tex. 1979) (orig. proceeding). Its purpose is not to determine the relator’s guilt or innocence but whether he has been unlawfully confined. Id. at 688. We will issue a writ of habeas corpus if the order underlying the contempt is void or if the contempt order itself is void. Ex parte Shaffer, 649 S.W.2d 300, 301–02 (Tex. 1983) (orig. proceeding); Gordon, 584 S.W.2d at 688. A contempt order is void if it is beyond the power of the court to enter it or if it deprives the relator of liberty without due process of law. Ex parte Barnett, 600 S.W.2d 252, 254 (Tex. 1980, orig. proceeding); Ex parte Gerdes, 228 S.W.3d 708, 709 (Tex. App.— Corpus Christi–Edinburg 2006, orig. proceeding). Analysis Family Code Section 54.07(c) provides that a juvenile court may “summarily” find “a child or other person in direct contempt” for the child’s or other person’s conduct in the judge’s presence. Tex. Fam. Code Ann. § 54.07(c). But the same section limits the contempt punishment for a child: Direct contempt of the juvenile court by a child is punishable by a maximum of 10 days’ confinement in a secure juvenile detention facility or by a maximum of 40 hours of community service, or both. The juvenile court may not impose a fine on a child for direct contempt. Id. Title 3 of the Family Code—-the Juvenile Justice Code—-defines a child as someone either “ten years of age or older and under 17 years of age” or “seventeen years of age or older and under 18 years of age who is alleged or found to have engaged in delinquent conduct or conduct indicating a need for supervision as a result of acts committed before becoming 17 years of age.” Id. § 51.02(2). At the time the trial court held J.D. in contempt, J.D. was already seventeen, but he was alleged to have engaged in delinquent conduct when he was sixteen. Thus, at the time the trial court held J.D. in contempt, he met the second definition of a “child” for purposes of Family Code Title 3, including the limitation on punishment in Section 54.07(c). Id. §§ 51.02(2), 54.07(c). Because the contempt sentence went beyond that authorized by statute, the contempt order is void. See, e.g., Barnett, 600 S.W.2d at 254; Gerdes, 228 S.W.3d at 713. Conclusion Because the punishment assessed in the trial court’s contempt order exceeded its statutory authority, the contempt order is void, and J.D. is entitled to habeas corpus relief. Having already released J.D. on his own recognizance, we grant his petition, vacate the trial court’s September 27, 2021 contempt order, and order J.D. discharged from any further confinement under that order. /s/ Mike Wallach Mike Wallach Justice Delivered: November 12, 2021