
819 S.W.2d 866 (1991)
Ex parte Herbert E. HARGETT, Applicant.
No. 824-90.
Court of Criminal Appeals of Texas, En Banc.
November 20, 1991.
Walter C. Prentice (on appeal only), Austin, for applicant.
Arthur C. Eads, Dist. Atty., and Sean K. Proctor, Asst. Dist. Atty., Belton, Robert Huttash, State's Atty., Austin, for the State.
Before the court en banc.


*867 OPINION ON APPLICANT'S PETITION FOR DISCRETIONARY REVIEW
WHITE, Judge.
Applicant Herbert E. Hargett appeals the denial of his second writ of habeas corpus brought under TEX. CONST., Art. V, § 8. Applicant filed his first writ of habeas corpus pursuant to TEX.CODE CRIM.PROC.ANN. Art. 11.07, § 2 and this court dismissed that application for lack of jurisdiction on August 31, 1988 in an unpublished opinion, Ex parte Hargett, No. 18,687-01 (Tex.Crim.App.1988).
The record reflects that in May of 1989 applicant filed this application in the trial court pursuant to TEX. CONST., Art. V, § 8. This article grants Texas district courts plenary power to grant writs of habeas corpus.[1]
In an amendment to his application to the trial court, applicant alleged continued restraint in the form of impairment of his right to military-retirement benefits. He argued that such restraint was illegal because the State breached the plea bargain agreement which led to his conviction and because he was deprived of his constitutional right to reasonably effective assistance of counsel at trial.[2]
When applicant first came before us under TEX.CODE CRIM.PROC.ANN., Art. 11.07, his application was properly dismissed because an applicant must be "in custody" before an Art. 11.07 writ is properly before this Court.[3] However, applicant's decision to pursue post-conviction relief under TEX. CONST., Art. V, § 8 in the district court overcame this obstacle.
TEX. CODE CRIM.PROC.ANN., Art. 11.01 describes the writ of habeas corpus as "the remedy to be used when any person is restrained in his liberty."[4] It then goes on to tell us exactly what this particular "writ" is: "an order issued by a court of competent jurisdiction, directed to anyone having a person in his custody, or under his restraint, commanding him to produce such person ... and show why he is held in custody or under restraint." Additionally, Art. 11.22 defines the term restraint as: "the kind of control which one person exercises over another, not to confine him within certain limits, but to subject him to the general authority and power of the person claiming such right." Consequently, under the definitions set out in those articles a writ of habeas corpus filed pursuant to TEX. CONST., Art. V, § 8 has much broader availability to applicants than a writ filed pursuant to Art. 11.07.[5] Even though an applicant may not be confined, TEX. CONST., Art. V, § 8 provides an avenue by which collateral legal consequences of a conviction may be challenged.[6]
We granted this petition to review applicant's ground that "the Court of Appeals erred in dismissing this appeal for lack of jurisdiction because that court erred in finding that the trial court had refused to issue the writ of habeas corpus." We agree with the Court of Appeals that no writ of habeas corpus was issued. However, we disagree with the Court of Appeals' analysis of its jurisdiction to review the district court's decision on the merits of the applicant's allegations.
*868 A writ of habeas corpus is an order from a judge commanding a party, who is alleged to be restraining the applicant in some way, to appear before the court with the object of alleged restraint and explain the reasons for the restraint.[7] However, the district court issued no such order in this case. Instead, after noting that it had jurisdiction of the case, the trial court denied applicant an evidentiary hearing and expansion of the record. It based this denial on its conclusion that there were no issues that could not be resolved by examining the existing record. It then proceeded to address the merits of each of the allegations submitted by applicant and found them to be without merit. The court denied relief.
It is well settled that no appeal can be had from a refusal to issue or grant a writ of habeas corpus even after a hearing.[8] However, the portion of that statement of law which we have emphasized can be confusing so, we will clarify it. In the cases which rely on that statement of law, the "hearing" which is being referred to is one which a court might hold in order to determine whether there is sufficient cause for the writ to be issued or whether the merits of the claim should be addressed. That type of hearing is not the same as one which is held to ultimately resolve the merits of an applicant's claim. When a hearing is held on the merits of an applicant's claim and the court subsequently rules on the merits of that claim, the losing party may appeal.
Both Ex parte Noe,[9] and Ex parte Moorehouse,[10] cite to Ex parte Hughes,[11] as authority for their inclusion of the words "even after a hearing" in their statements of the law on this matter. However, it is important to note that in Ex parte Hughes the judge only held the hearing to determine whether he would issue the writ; he didn't hold a hearing on the merits of the applicant's claim. Therefore, his refusal to issue the writ "even after a hearing" was not an appealable action on the merits of the applicant's claim. Additionally, in Ex parte Noe as well as in Ex parte Moorehouse, the respective trial courts did not rule on the merits of the parties claims. They merely refused to issue the requested writs and they refused to hear or to decide the applications on the merits of their claims. Footnote 1 in Ex parte Noe clearly states that:
"We are not dealing with a case where the trial court, after the filing of a habeas corpus application, grants or issues the writ of habeas corpus, and after a hearing, grants or denies relief."
In a case where a judge refuses to issue the requested writ of habeas corpus or denies an applicant the requested hearing on the merits of his claim, an applicant's remedies are limited. Some remedies available to an applicant in that situation are to present the application to another district judge having jurisdiction,[12] or under proper circumstances, to pursue a writ of mandamus.[13] Nevertheless, appeal can be had from a district court order denying an applicant relief on the merits of his claim.[14] Consequently, in the instant case, jurisdiction was conferred upon the Court *869 of Appeals by virtue of Tex.R.App.Proc, 44.[15]
The Court of Appeals correctly ruled that the trial court did not issue a writ of habeas corpus. However, it erred in concluding that it had no jurisdiction to hear the appeal from the trial court's order denying relief. This is not a case where the district court simply refused to hear the application as presented. Here, the court went beyond merely deciding not to issue the writ of habeas corpus. The court, in this instance, undertook to rule on the merits of the application.
It is important to recognize that there is a distinction between the issuance of a writ of habeas corpus and the granting of relief on the claims set forth in an application for that writ. The trial court in the instant case did not issue the requested writ of habeas corpus. However, he did not dismiss the application either. Instead, the court undertook to rule on the merits of applicant's claim and hence, the court of appeals has jurisdiction over applicant's appeal.[16]
Therefore, we conclude that the district court had jurisdiction to hear this application according to TEX. CONST., Art. V, § 8, and although it did not issue the writ of habeas corpus prayed for, it did undertake to rule on the merits of the applicant's claim. We hold that the Court of Appeals was authorized to hear this appeal under Article 44.02, V.A.C.C.P. in accordance with Tex.R.App.Proc, 44. The cause is remanded to the Court of Appeals for it to consider the merits of the applicant's claim.
NOTES
[1]  TEX. CONST., Art. V, § 8 states in pertinent part:

District Court jurisdiction consists of exclusive, appellate, and original jurisdiction of all actions, proceedings, and remedies, except in cases where exclusive, appellate, or original jurisdiction may be conferred by this Constitution or other law on some other court, tribunal, or administrative body. District Court judges shall have the power to issue writs necessary to enforce their jurisdiction.
The District Court shall have appellate jurisdiction and general supervisory control over the County Commissioner's Court, with such exceptions and under such regulations as may be prescribed by law.
[2]  See Ex parte Burt, 499 S.W.2d 109, at 110 (Tex.Crim.App. 1973).
[3]  See Rodriguez v. Court of Appeals, 769 S.W.2d 554, 558 (Tex.Crim.App. 1989).
[4]  See Id.
[5]  See, e.g.. Ex parte Renter, 734 S.W.2d 349, at 353 (Tex.Crim.App. 1987); Rodriguez v. Court of Appeals, 769 S.W.2d 554, at 558 (Tex.Crim.App. 1989).
[6]  See Ex parte Renier, 734 S.W.2d 349, at 353 (Tex.Crim.App.1987); Ex parte Crosley 548 S.W.2d 409, at 410 (Tex.Crim.App.1977).
[7]  Tex.Code Crim.Pro.Ann., Art. 11.01 describes the writ of habeas corpus as: "an order issued by a court of competent jurisdiction, directed to anyone having a person in his custody, or under his restraint, commanding him to produce such person ... and show why he is held in custody or under restraint."
[8]  See, e.g., Ex parte Noe, 646 S.W.2d 230 (Tex. Crim.App.1983); Ex parte Moorehouse, 614 S.W.2d 450 (Tex.Crim.App.1981). (Emphasis in the body of this opinion is supplied by us).
[9]  646 S.W.2d 230 at 231 (Tex.Crim.App.1983).
[10]  614 S.W.2d 450 at 451 (Tex.Crim.App.1981).
[11]  20 S.W.2d 1070 (Tex.Crim.App.1929).
[12]  See Ex parte Johnson, 561 S.W.2d 841, at 842 (Tex.Crim.App. 1978); Mayes v. State, 538 S.W.2d 637, at 639 (Tex.Crim.App. 1976).
[13]  See E.g. Von Kolb v. Koehler, 609 S.W.2d 654 (Tex.App.El Paso 1980).
[14]  See Ex parte Renter, 734 S.W.2d 349, at 353 (Tex.Crim.App.1987); Ex parte Crosley, 548 S.W.2d 409 (Tex.Crim.App.1977); Mayes v. State, 538 S.W.2d 637, at 639 (Tex.Crim.App. 1976).
[15]  See Id.
[16]  See Renter, (supra).
