
495 S.W.2d 893 (1973)
Ex parte Kenneth VOGLER, Appellant.
No. 47005.
Court of Criminal Appeals of Texas.
June 13, 1973.
Mark Levin, Brownsville, for appellant.
Jim D. Vollers, State's Atty., and Robert A. Huttash, Asst. State's Atty., Austin, for the State.

OPINION
JACKSON, Commissioner.
This is an appeal from an order entered in a habeas corpus proceeding in the 197th Judicial District Court of Cameron County denying the writ of habeas corpus.
The appellant, Kenneth Douglas Vogler, was arrested on August 18, 1972, in Brownsville, for possession of marihuana. A justice court set his bond at $2,500. Subsequently, he entered into an agreement with a bail bond company whereby that company became surety on a bond for the appellant. Appellant was later indicted. His bond was set by the District Court at $2,000 but he was allowed to remain free under the original $2,500 bond. Approximately two weeks later, the appellant was again arrested for a different offense. The bail bond company then withdrew as surety on appellant's bond by making an affidavit as provided for in Art. 17.19, *894 Vernon's Ann.C.C.P., pursuant to authority granted them under Art. 17.16, V.A.C.C.P., which provides:
"Those who have become bail for the accused, or either of them, may at any time relieve themselves of their undertaking by surrendering the accused into the custody of the sheriff of the county where he is prosecuted."
Appellant has since that time remained in the Cameron County jail in lieu of the $2,000 bail set by the District Court.
At the hearing in District Court on appellant's petition for writ of habeas corpus, appellant's sole contention was that Art. 17.16, supra, is unconstitutional as violative of due process of law under the 14th Amendment to the United States Constitution in that it allows the bail bondsman to withdraw ex parte as surety on the bond without any form of hearing.
The trial judge in his conclusions of law held that the appellant was being legally detained in the Cameron County jail under indictment in lieu of a $2,000 bond.
On this appeal, appellant again asserts that Article 17.16, supra, is unconstitutional and prays that this Court order his release.
The statute attacked by appellant emanates from Art. 282 of the Code of Criminal Procedure of 1925. That statute had its origin in identical statutes enacted many decades prior. Our research indicates that Art. 17.16, supra, or its predecessors, has never been contested on this constitutional ground. Further, a similar federal statute has been on the books for many years and like Art. 17.16, supra, has never been attacked on this ground. 18 U.S.C., Sec. 3142. However, this fact is not controlling.
We see no rational connection between the civil cases cited by appellant as authority for his proposition and the criminal bail bond statute in the case at bar. We decline to hold this statute unconstitutional on the ground relied upon by appellant.
If the surety has wrongfully withdrawn from the bail bond, appellant's remedy lies not in a habeas corpus proceeding but rather in a civil action against the bonding company. 8 Tex.Jur.2d, Sec. 104. See also, Karakey v. Mollohan, Tex.Civ. App., 15 S.W.2d 692.
We concur with the trial court's conclusion that the appellant is being lawfully held under a valid indictment in lieu of $2,000 bail.
The judgment is affirmed.
Opinion approved by the Court.
