
869 P.2d 211 (1994)
Terence Keijiro JACOBS, Petitioner-Appellant,
v.
Harold CARMEL, Respondent-Appellee.
No. 93SA146.
Supreme Court of Colorado, En Banc.
February 14, 1994.
*212 Terence Keijiro Jacobs, pro se.
Gale A. Norton, Atty. Gen., Timothy M. Tymkovich, Sol. Gen., Paul Farley, Deputy Atty. Gen., John August Lizza, First Asst. Atty. Gen., Thomas S. Parchman, Asst. Atty. Gen., Human Resources Section, Denver, for respondent-appellee.
Justice LOHR delivered the Opinion of the Court.
Terence Keijiro Jacobs appeals from a judgment of the Pueblo County District Court denying his petition for a writ of habeas corpus. We affirm the judgment of the district court.

I
Jacobs was charged in El Paso County District Court with the offenses of attempt to commit first degree murder, §§ 18-3-102 and 18-2-101, 8 C.R.S. (1978 & 1983 Supp.), first degree assault, § 18-3-202, 8 C.R.S. (1978 & 1983 Supp.), and crime of violence, § 16-11-309, 8 C.R.S. (1978 & 1983 Supp.). Jacobs pleaded not guilty by reason of insanity. After a trial to the court, the district court sustained the plea and on September 4, 1985, committed Jacobs to the custody of the Director of the Department of Institutions pursuant to section 16-8-105(4), 8 C.R.S. (1978) (now section 16-8-105(4), 8A C.R.S. (1986)).
On April 1, 1993, Jacobs filed a petition for a writ of habeas corpus in the Pueblo County District Court asserting that he was not receiving adequate care and treatment suited to his present needs and was being deprived of his liberty in a more restrictive environment than necessary. Jacobs also averred that his mental illness was in remission. As a result of his confinement and the conditions of his confinement, Jacobs asserted that he was denied his rights under the due process and equal protection clauses of the United States Constitution. He requested a writ of habeas corpus directing the Department of Institutions to show cause why he should not be discharged from commitment or granted such other relief as the court should deem proper.[1]
The district court issued a writ. The Department of Institutions filed a return asking the court to dismiss the writ on the basis that discharge and treatment issues were within the exclusive jurisdiction of the committing court and not cognizable in a habeas corpus *213 proceeding. The district court held a hearing, with Jacobs present and counsel for the Department of Institutions participating by telephone, at which the court considered these contentions and concluded that the Department of Institutions was correct. Accordingly, the court ordered the writ of habeas corpus withdrawn, thereby in effect denying the petition for a writ of habeas corpus. Jacobs appealed, asserting that the district court had habeas corpus jurisdiction to order his discharge or in the alternative to order his treatment in a less restrictive setting, specifically on an outpatient basis.

II
The resolution of this case turns on the reconciliation of two of our precedents, Marshall v. Kort, 690 P.2d 219 (Colo.1984), and People v. Gilliland, 769 P.2d 477 (Colo.1989).
The habeas corpus petitioner in Marshall, 690 P.2d 219, had been found not guilty by reason of insanity in 1979 and committed to the Colorado State Hospital. The petitioner first sought release under section 16-8-115, 8 C.R.S. (1983 Supp.).[2] In November 1981, the committing court denied the petitioner's release, and the petitioner was not entitled to seek release again under section 16-8-115 for one year. § 16-8-115(1). In July 1982, the petitioner filed a petition for writ of habeas corpus in the district court for the county in which he was confined, alleging that his confinement was unlawful because of the lack of treatment, and in particular that he was not receiving any training in the social skills necessary to prepare him for release. Marshall, 690 P.2d at 221. The district court dismissed the habeas corpus petition, finding that the petitioner was not entitled to release because of the asserted failure to treat him. Id.
On appeal, we reversed the district court's order dismissing the petition. We concluded that habeas corpus was appropriate, and that the petitioner was "entitled to a determination of the legality of his confinement and, if he can prove his allegations, a remedy that addresses appropriate treatment short of immediate release." Id.
Two separate determinations were necessary to support our conclusion. First, we held that "any restriction in excess of legal restraint that substantially infringes on basic rights may be remedied through habeas corpus, even if total discharge does not result." Id. at 222. We have reaffirmed this principle since Marshall was decided, see, e.g., People v. Wiedemer, 852 P.2d 424, 434 n. 11 (Colo.1993); Moody v. Corsentino, 843 P.2d 1355, 1360 n. 6 (Colo.1993); Cardiel v. Brittian, 833 P.2d 748, 751 n. 6 (Colo.1992); Naranjo v. Johnson, 770 P.2d 784, 786, 787 (Colo.1989); and we reaffirm it today.
The second determination necessary to our holding in Marshall was that the petitioner would be left without the opportunity to obtain relief from his present condition if his habeas corpus petition was not heard. 690 P.2d at 224. Habeas corpus relief is generally not available when other legal remedies exist. Mulkey v. Sullivan, 753 P.2d 1226, 1232 (Colo.1988). Specifically, we concluded in Marshall that section 16-8-115(2), 8 C.R.S. (1983 Supp.), "[o]n its face,... does not provide any basis for the petitioner to challenge the conditions of his confinement or his lack of treatment." 690 P.2d at 225. The support for this second finding was undermined five years later in People v. Gilliland, 769 P.2d 477 (Colo.1989).
In Gilliland, the defendant was adjudicated not guilty by reason of insanity with respect to arson and burglary charges, and was committed by the district court to the Colorado State Hospital until such time as he should become eligible for release. Almost two years after the defendant's commitment, the district attorney filed a motion in the committing court alleging that the defendant had refused to accept the medication necessary for his treatment, and requesting the court to authorize the professional staff of the hospital to administer the medication to the defendant. The district court held a *214 hearing and ruled that Colorado's statutory scheme for insanity commitments, §§ 16-8-101 to -122, 8A C.R.S. (1986 & 1988 Supp.), did not give the court jurisdiction to address the district attorney's motion. Gilliland, 769 P.2d at 479.
This court reversed the district court's judgment and remanded the case for further proceedings. After examining the statutory scheme governing criminal insanity commitments, §§ 16-8-101 to -122, 8A C.R.S. (1986 & 1988 Supp.), we held that
a committing court has subject matter jurisdiction to hear and determine issues relating to the care and treatment of a defendant committed to the Department of Institutions as a result of an insanity adjudication and that such jurisdiction continues in the committing court until the defendant is unconditionally released from the order of commitment.
Gilliland, 769 P.2d at 483. Since the movant in Gilliland was the district attorney, we did not consider the continuing availability of habeas corpus to challenge treatment when the petition is brought by the person criminally committed. We now hold that because of the continuing jurisdiction of the committing court, the remedy of habeas corpus is not available for a committed person to obtain either unconditional or conditional release, or to challenge the treatment he is provided.
The committing court has subject matter jurisdiction under section 16-8-115, 8A C.R.S. (1986 & 1993 Supp.), to hear and determine questions regarding the unconditional or conditional release of a person committed after a finding of not guilty by reason of insanity or not guilty by reason of impaired mental condition.[3] Similarly, under *215 Gilliland, the committing court has subject matter jurisdiction "to hear and determine issues relating to the care and treatment of a defendant committed to the Department of Institutions as a result of an insanity adjudication...." 769 P.2d at 483. If a criminally committed petitioner were permitted to challenge his treatment by way of habeas corpus, there would be the possibility of conflicting orders issued by the habeas corpus court and the committing court. We therefore disapprove the specific holding of Marshall that habeas corpus relief is available to a petitioner criminally committed to the Department of Institutions to challenge a lack of treatment.

III
In this case, Jacobs contends that the district court had habeas corpus jurisdiction to order his discharge or in the alternative to order his treatment in a less restrictive setting, specifically on an outpatient basis. For the reasons above, we disagree. Jacobs also asserts that he has filed the same requests for relief in the committing court, but that the court has not yet acted on his motion. Since Jacobs's petition requested relief not cognizable by habeas corpus, the district court properly denied the petition. The judgment of the district court is therefore affirmed.
NOTES
[1]  Although the caption of this case has been condensed on appeal, the respondent was designated in the district court as "Colorado Department of Institutions, Harold Carmel, M.D., Superintendent, Colorado Mental Health Institute of Pueblo." In the body of this opinion we refer to the respondent as the Department of Institutions.
[2]  This statute sets out the procedures for the release from hospitalization of an individual who has been committed after a finding of not guilty by reason of insanity or not guilty by reason of impaired mental condition, and has been amended since 1983. The current version, § 16-8-115, 8A C.R.S. (1986 & 1993 Supp.), is set out in pertinent part in footnote 3 below.
[3]  Section 16-8-115, 8A C.R.S. (1986 & 1993 Supp.), in pertinent part provides:

16-8-115. Release from commitment after verdict of not guilty by reason of insanity or not guilty by reason of impaired mental condition. (1) The court may order a release hearing at any time on its own motion, on motion of the prosecuting attorney, or on motion of the defendant. The court shall order a release hearing upon receipt of the report of the chief officer of the institution in which the defendant is committed that the defendant no longer requires hospitalization, as provided in section 16-8-116, or upon motion of the defendant made after one hundred eighty days following the date of the initial commitment order. Except for the first hearing following the initial commitment order, unless the court for good cause shown permits, the defendant is not entitled to a hearing within one year subsequent to a previous hearing.
. . . . .
(2) The court shall order a release examination of the defendant when a current one has not already been furnished or when either the prosecution or defense moves for an examination of defendant at a different institution or by different experts. The court may order any additional or supplemental examination, investigation, or study which it deems necessary to a proper consideration and determination of the question of eligibility for release. The court shall set the matter for release hearing after it has received all of the reports which it has ordered under this section. When none of said reports indicates that the defendant is eligible for release, the defendant's request for release hearing shall be denied by the court if the defendant is unable to show by way of an offer of proof any evidence by a medical expert in mental disorders that would indicate that he is eligible for release.... The release hearing shall be to the court or, on demand by the defendant, to a jury of not to exceed six persons. At the release hearing, if any evidence of insanity is introduced, the defendant has the burden of proving restoration of sanity by a preponderance of the evidence; if any evidence of ineligibility for release by reason of impaired mental condition is introduced, the defendant has the burden of proving, by a preponderance of the evidence, that he is eligible for release by no longer having an impaired mental condition.
(3)(a) If the court or jury finds the defendant eligible for release, the court may impose such terms and conditions as the court determines are in the best interests of the defendant and the community, and the jury shall be so instructed. If the court or jury finds the defendant ineligible for release, the court shall recommit the defendant.
(b) When a defendant is conditionally released, the chief officer of the institution in which the defendant is committed shall forthwith give written notice of the terms and conditions of such release to the executive director of the department of institutions and to the director of any community mental health center which may be charged with continued treatment of the defendant. The director of such mental health center shall make written reports every three months to the executive director of the department of institutions and to the district attorney for the judicial district where the defendant was committed and to the district attorney for any judicial district where the defendant may be required to receive treatment, concerning the treatment and status of the defendant. Such reports shall include all known violations of the terms and conditions of the defendant's release, and any changes in the defendant's mental status which would indicate that the defendant has become ineligible to remain on conditional release as defined in section 16-8-102(4.5).
(c) A defendant who has been conditionally released remains under the supervision of the department of institutions until the committing court enters a final order of unconditional release. When a defendant fails to comply with any conditions of his release requiring him to establish, maintain, and reside at a specific residence and his whereabouts have therefore become unknown to the authorities charged with his supervision or when the defendant leaves the state of Colorado without the consent of the committing court, the defendant's absence from supervision shall constitute escape, as defined in section 18-8-208, C.R.S. Such offense occurs in the county in which the defendant is authorized to reside.
(d) Any terms and conditions imposed by the court on the defendant's release and the defendant's mental status shall be reviewed at least every twelve months unless the court sooner holds a release hearing as provided in this section.
(e) As long as the defendant is granted conditional release and is subject to the provisions thereof, there shall be free transmission of all information, including clinical information regarding the defendant, among the department of institutions, the appropriate community mental health centers, and appropriate district attorneys, law enforcement, and court personnel.
