
709 S.W.2d 15 (1986)
Ex parte Joel DAVILA, Relator.
No. 13-86-038-CV.
Court of Appeals of Texas, Corpus Christi.
April 3, 1986.
*16 Ernesto Gonzales, Robles & Gonzales, Harlingen, for relator.
Randell W. Friebele, Jane Brasch, Harlingen.
Before DORSEY, UTTER and BENAVIDES, JJ.
OPINION
DORSEY, Justice.
Relator seeks a writ of habeas corpus to secure his release from the Cameron County jail after being found in contempt of court. Upon the filing of his application for writ of habeas corpus, we set bond in the amount of $500.00 pending the disposition of his application for writ of habeas corpus. After careful consideration, we deny the writ and remand relator to the custody of the sheriff of Cameron County, Texas.
Relator attacks his commitment on only one ground: that he is being imprisoned for failure to pay a debt in contravention of Article I, Section 18 of the Texas Constitution. He does not attack the order upon any other ground.
Relator was divorced from Oleida Davila on November 26, 1975. The order concerning support for the minor child of the marriage, Sylvia Irene Davila, was modified on September 26, 1985, and reads as follows:
IT IS ACCORDINGLY ORDERED, ADJUDGED AND DECREED that the child support be increased to Thirty and No/100ths Dollars ($30.00) per week for SYLVIA IRENE DAVILA and, in addition thereto, all sums expended for her continuing care at Charter Palms Hospital including, but not limited to, all prescription drugs, therapy, doctors' charges and hospital charges. Said increased payments should be made directly to the hospital, the doctor or the pharmacy no later than ten (10) days following the mailing of the statement to Respondent, JOEL DAVILA, at 3418 Mesquite Drive, Sugarland, Texas XXXXX-XXXX, or such other address as Mr. Davila shall furnish to said hospital, doctor or pharmacy in writing should he wish to change his address. The Thirty and No/100ths Dollars ($30.00) child support payments for SYLVIA IRENE DAVILA shall continue to be made on Friday of each and every week beginning October 4, 1985, and payments shall be made through the Registry of the District Courts of Cameron County, Texas, at P.O. Box 3570, Brownsville, Texas XXXXX-XXXX, Attention: Child Support Division.
At the time this order was entered, the dependent child was undergoing periodic psychological and psychiatric treatment at Charter Palms Hospital. After it was entered, she was involved in an automobile collision, was treated for her physical injuries *17 by another hospital, released and then admitted to Charter Palms Hospital, where she remained, incurring hospital bills at Charter Palms in the approximate amount of $28,000.00 by the time of the hearing on the motion for contempt on January 13, 1986.
At the hearing on contempt, the trial court rejected the relator's defense of inability to comply with the prior order, found him in contempt, ordered him jailed for 120 days and for as long thereafter until he purges himself of contempt by paying the $28,000.00 medical expenses plus all costs of court.
Davila has sought a writ of habeas corpus from this Court, asserting solely that the contempt order is void and his restraint is unlawful because it constitutes imprisonment for debt in violation of Article I, Section 18 of the Texas Constitution.[1] Relator does not now reassert his earlier argument of inability to pay, which the trial court rejected, nor does he question the specificity of the order or the court's power to require him to pay these expenses.
Article I, § 18 of the Texas Constitution prohibits imprisonment for debt. However, it has long been the law in Texas that the courts are empowered to imprison a person for contempt of court for failure to pay child support in accordance with a valid court order and in so doing do not violate Article I, Section 18. The courts reason that the source of the obligation is the duty of a parent to support the minor child and the legislature has empowered the courts to order the payment of child support to enforce this duty. Ex parte Birkhead, 127 Tex. 556, 95 S.W.2d 953 (1936); Ex parte Davis, 101 Tex. 607, 111 S.W. 394 (1908); See Cunningham v. Cunningham, 120 Tex. 491, 40 S.W.2d 46 (1931). Section 14.40(a) of the Family Code provides that "any decree or order of the court for child support may be enforced by contempt." TEX.FAM.CODE ANN. § 14.40 (Vernon Supp.1986).
The inquiry in this case is whether the $28,000 obligation that Mr. Davila failed to pay is support for his minor child, and thus excepted from the prohibition of Article I, Section 18.
Relator argues that the distinguishing feature that causes it to be characterized as a debt under the constitution is that it was to be paid to a third party rather than the managing conservator, Oleida Davila. We have been cited to no authority and have found none that so holds. To the contrary, the Family Code provides that the trial court may order child support paid "in the manner and to the persons specified by the court in the decree." TEX.FAM.CODE ANN. § 14.05(a) (Vernon Supp.1986). See Robbins v. Robbins, 601 S.W.2d 90 (Tex. Civ.App.-Houston [1st Dist.] 1980, no writ).
Traditionally, the distinction between debts and child support has been based on the origin of the obligation, not on the manner of its enforcement. Ex parte Shaver, 597 S.W.2d 498, 500 (Tex.Civ.App. Dallas 1980, no writ). It is well-settled that the natural and legal duty of a parent to support the child arises because of the relationship between them. Gully v. Gully, 111 Tex. 233, 231 S.W. 97 (1921); Rice v. Rice, 21 Tex. 58, 68 (1858); Shaver, 597 S.W.2d at 500; TEX.FAM.CODE ANN. § 4.02 (Vernon Supp.1986).
The duty to support is not extinguished by divorce. Gomez v. Perez, 409 U.S. 535, 93 S.Ct. 872, 35 L.Ed.2d 56 (1973); Cordell v. Cordell, 592 S.W.2d 84, 86 (Tex. Civ.App.-Texarkana 1979, no writ); In Re McLemore, 515 S.W.2d 356, 358 (Tex.Civ. App.-Dallas 1974, no writ). The court may order the parents to make periodic or lump-sum payments or both for the support of the child. TEX.FAM.CODE ANN. § 14.05(a) (Vernon Supp.1986).
The legislature has stated that the duty to support the child includes, but is not limited to, providing the child with clothing, food, shelter, medical care and education. TEX.FAM.CODE ANN. § 12.04(3) (Vernon Supp.1986). As the providing *18 of medical care is included within the statutory definition of child support, the financial obligation that accrues as a result of the failure to pay court-ordered medical expenses cannot be said to be a debt within the contemplation of Article I, Section 18.
The best interest of the child is the primary consideration of the court when ordering child support. Reames v. Reames, 604 S.W.2d 335, 337-38 (Tex.Civ. App.-Dallas 1980, no writ); Barrow v. Durham, 574 S.W.2d 857 (Tex.Civ.App.- Corpus Christi), aff'd, 600 S.W.2d 756 (Tex. 1980); TEX.FAM.CODE ANN. § 14.07(a) (Vernon 1975). In order to be properly characterized as child support, a payment should be related to the care and welfare of the child. The determination of what is necessary to protect the best interest of the child is within the sound discretion of the trial court. Gillespie v. Gillespie, 644 S.W.2d 449, 451 (Tex.1982). The court below made that determination in its finding that the child has "severe emotional problems" and "requires continuous care and personal supervision." The court ordered increased child support including "all sums expended for her continuing care at Charter Palms Hospital" in order to allow the child to obtain the treatment she needs. Implicit in the court's finding is a relationship between the psychiatric care at Charter Palms Hospital and the welfare and best interest of the child.
Because the obligation arose out of the parent-child relationship and because the trial court found the treatments, and thus the payments, necessary for the care and welfare of the child, we cannot say that the trial court's determination that the payments to the hospital constitute child support is error. Therefore, the trial court's order finding relator in contempt was not void as being in violation of the constitutional prohibition against imprisonment for debt.
The requested habeas corpus relief by Joel Davila is DENIED. He is ordered remanded to the custody of the sheriff of Cameron County to comply with the order of contempt of the 197th Judicial District Court.
NOTES
[1]  "No person shall ever be imprisoned for debt." TEX.CONST. art. 1, § 18.
