OPINION
This is an appeal from a judgment on appellant’s application for writ of habeas corpus, challenging appellant’s pre-trial restraint. Because this court lacks jurisdiction, we order the appeal dismissed.
Appellant filed a petition for writ of ha-beas corpus on September 27, 1989, in which he contested the legality of his detention in the Harris County Jail, contending that his Due Process rights were violated by his pre-trial detention. On November 17, 1989, after hearing on appellant’s petition, the trial court, apparently interpreting appellant’s application as only a request for setting of a bond, “granted” the writ and set bond in the amount of $50,000. The same date appellant filed notice of appeal.
On February 5, 1990, appellant entered a plea of guilty pursuant to a plea bargain to *9 the underlying criminal charge in Cause No. 587,033 in the 338th District Court of Harris County. Punishment was assessed by the trial court, pursuant to the plea bargain, at imprisonment for five years.
On appeal of the trial court action on his application for writ of habeas corpus, appellant contends that the trial court erred in failing to consider the constitutional issues raised by his application; in failing to provide adequate assistance of counsel in defending against the underlying criminal appeal; and in failing to appoint counsel to represent appellant on this appeal.
We find that the issues regarding appellant’s pre-trial restraint have been rendered moot by entry of his plea of guilty to the underlying criminal offense. Habeas corpus is by definition an extraordinary writ in which the restraint of one’s liberty is challenged as illegal. Tex.Code CRIm.PROC.Ann. articles 11.14 and 11.40. Once the return of the writ has been made, and the applicant has been brought before the court, he is no longer detained on the original warrant or process, but under authority of the habeas corpus. Tex.Code Crim.Proc.Ann. art. 11.32.
In the instant cause, the return of the writ was made and appellant was brought before the trial court. After hearing, the trial court set bail. Thereafter, he entered a plea of guilty to the underlying offense. Appellant’s application for writ of habeas corpus entailed a challenge to the legality of his original confinement. Appellant is no longer confined based on the process underlying his original detention, but is now confined pursuant to judgment and sentence in Cause No. 537,033. Where the premise of a habeas corpus application is destroyed by subsequent developments, the legal issues raised thereunder are rendered moot.
See Ex parte Branch,
In his third point of error, appellant contends the trial court erred in failing to appoint counsel to represent him on this appeal. As appellant correctly points out, there is no right to appointment of counsel for the prosecution of a habeas corpus attack under the circumstances presented here.
See Hernandez v. State,
Finding that the issues raised by appellant’s pre-trial application for writ of habe-as corpus have been rendered moot by his subsequent plea of guilty and conviction, we hold that any determination we might make on the merits would be advisory only.
See Sims v. State,
