
395 N.E.2d 276 (1979)
Leslie PRUITT, Sheriff, Lake County Commissioners, Lake County Common Council, and Lake County Auditor, Appellants (Respondents below),
v.
Phillip JOINER, John Haybron, James Faison, and Terrance White, Appellees (Petitioners below).
No. 3-176A22.
Court of Appeals of Indiana, Third District.
September 27, 1979.
Rehearing Denied January 9, 1980.
*277 Lorenzo Arredondo, Asst. Lake County Atty., East Chicago, Martell B. Royer, Hammond, Robert L. DeLoney, Asst. Lake County Atty., East Chicago, for appellants.
Ivan E. Bodensteiner, Dean L. Sutton, Valparaiso, for appellees.
GARRARD, Presiding Judge.
This case arises on appeal from an order issued by the Lake County Superior Court on a writ of habeas corpus. On January 23, 1975 appellees, four pre-trial detainees in the Lake County Jail, filed a petition for the writ naming Leslie Pruitt, Sheriff of Lake County, as respondent alleging that they were being subjected to illegal and unconstitutional living conditions in the jail and illegal treatment by jail personnel, to-wit: beatings, deprivation of food, detention in solitary cells without bedding, punishment without due process of law and denial of medical care, visitation and mailing privileges. The lower court found that Sheriff Pruitt had denied the appellees their constitutional rights and entered an extensive order, which included requiring Pruitt to provide minimum due process before punishing any inmates; to promulgate and provide to all inmates a detailed set of rules and regulations, which were subject to the approval of the court; to provide specified medical care to all inmates; and further, to increase jail staff and provide training to all personnel. Upon argument by Sheriff Pruitt that he would be unable to comply with the order without the appropriation of additional funds, the court ordered the cause reopened to allow appellees to amend their petition to include the Lake County Commissioners, the Lake County Common Council and the Lake County Auditor as additional respondents. Such amendment was made over the objection of the additional respondents. All respondents appeal from the judgment.[1] The major issue raised by appellants is whether a writ of habeas corpus can be used to challenge illegal and unconstitutional conditions of detention, although the detention is stipulated to be had under lawful process. Our determination of this issue makes discussion of the other issues raised unnecessary.
The writ of habeas corpus is an ancient common law remedy for imprisonment without just cause. Its function was to obtain the release of a person illegally restrained of his physical liberty. The scope of the writ was limited to a determination of the cause of the imprisonment. If such *278 cause was found to be unlawful, the person was ordered released or discharged from the restraint. 39 C.J.S. Habeas Corpus § 7 p. 472. By virtue of its recognition by the Bill of Rights of the Constitutions of the United States and of Indiana, the privilege of the writ exists independent of statute. Therefore the writ is not a purely statutory remedy in the strict sense. However, the legislature may, and has, provided regulation for its use. Witte v. Dowd (1951), 230 Ind. 485, 102 N.E.2d 630; State ex rel. Allen v. Fayette Circuit Court (1948), 226 Ind. 432, 81 N.E.2d 683. While such regulation may, of course, enlarge the privileges and scope of the writ, the common law privilege may not be impaired or abrogated. Walker v. Johnston (1941), 312 U.S. 275, 61 S.Ct. 574, 85 L.Ed. 830; Witte v. Dowd, supra.
Appellees argue that Indiana should follow the decisions of other jurisdictions, including federal courts, which have taken the more "enlightened view" of the scope of habeas corpus. Under this view the scope of the writ includes inquiry into deprivation of fundamental rights, or conditions and treatment which amount to cruel and unusual punishment. However, the federal habeas corpus statute and the statutes of other jurisdictions are substantially different from the Indiana statute. These statutes authorize the court to provide "such relief as justice may require." With the freedom to order relief other than the discharge of the petitioner, those courts have interpreted their respective habeas corpus statutes as enlarging the scope of the privilege in order to remedy the evils confronting them.
Indiana, on the other hand, has not chosen to expand the privilege of the writ as it existed at common law. By statute and judicial interpretation this state has taken the strict common law position that habeas corpus may be used only to inquire into the legality of the cause of the restraint. IC XX-X-XX-X provides:
"Every person restrained of his liberty, under any pretense whatever, may prosecute a writ of habeas corpus to inquire into the cause of the restraint, and shall be delivered therefrom when illegal." (emphasis added)
Our Supreme Court has consistently held that use of the writ is limited to a determination of whether the petitioner is being detained by lawful process. The writ may not be used to determine collateral matters which do not affect the lawfulness of the custody or detention. Coryell v. Crawley (1956), 235 Ind. 139, 131 N.E.2d 467; State ex rel. Cook v. Howard (1945), 223 Ind. 694, 64 N.E.2d 25. The court has recently stated that one is entitled to habeas corpus only if he is entitled to immediate release from unlawful custody. Pierson v. Phend (1978), Ind., 379 N.E.2d 442; see also Dunn v. Jenkins (1978), Ind., 377 N.E.2d 868; Hawkins v. Jenkins (1978), Ind., 374 N.E.2d 496; Hendrixson v. Lash (1972), 258 Ind. 550, 282 N.E.2d 792, cert. den. 410 U.S. 967, 93 S.Ct. 1450, 35 L.Ed.2d 702. Furthermore, a person may only obtain a modification of his commitment or other relief. IC XX-X-XX-XX;[2]Pierson v. Phend, supra; Hawkins v. Jenkins, supra; Shoemaker v. Dowd (1953), 232 Ind. 602, 115 N.E.2d 443.
Appellees do not challenge the legality of their restraint, but merely the manner in which they are being restrained. They have, in fact, stipulated that the process under which they are detained was lawful. They do not allege that they are entitled to immediate discharge, merely that they are entitled to a change in the conditions of their lawful imprisonment. While the law provides a remedy, it does not lie within the scope of habeas corpus. While jail conditions and treatment were deplorable, appellees have failed to pursue the proper remedy. Habeas corpus may not be used to challenge disciplinary or administrative procedures of penal institutions. Relief for the appellees lies in a writ of mandate or prohibition or a civil rights action *279 under 42 U.S.C. § 1983 in either state or federal courts. The privilege of the writ of habeas corpus extends only to inquiries into the legality of the course of physical restraint and the discharge of the person if such cause is found to be illegal.
Therefore, the judgment of the lower court is reversed.
HOFFMAN, J., concurs.
STANTON, J., dissents and files separate opinion.
STATON, Judge, dissenting.
I dissent from the majority opinion, since it ignores a very basic and fundamental issue: whether a writ of habeas corpus requires judicial inquiry beyond a lawful executive commitment. I believe that it does. Historically, the writ has been used to restrain the unbridled distribution of governmental power.[1] Neither the executive nor the legislative may limit its use by the judiciary.[2] In the appeal before this Court, none of the petitioners had been tried and convicted, yet they were subjected to: "beatings, deprivation of food, detention in solitary cells without bedding, punishment without due process of law and denial of medical care, visitation and mailing privileges."[3] This arbitrary, unlawful detention while awaiting trial amounts to a denial of due process by an executive commitment which should not be tolerated. The judiciary is not helpless to correct these conditions because the writ of habeas corpus and due process are inseparable.[4] I do not agree that the petitioners must seek relief from the federal court because none is available from the Courts of Indiana;[5] therefore, I dissent.
NOTES
[1]  This case actually includes two causes, No. 3-176 A 22 brought by the additional respondents and No. 3-775 A 155 brought by Sheriff Pruitt. These causes were consolidated for appeal.
[2]  "The court or judge shall thereupon proceed in a summary way to hear and determine the cause; and if no legal cause be shown for the restraint, or for the continuation thereof, shall discharge the party."
[1]  Meador, John Daniel, Habeas Corpus and Magna Carta (1966), The University Press of Virginia.
[2]  Johnson v. Eisentrager (1950), 339 U.S. 763, at page 798, 70 S.Ct. 936, at page 954, 94 L.Ed. 1255. Justice Black stated in his dissent in which Douglas and Burton joined that: "Its use by courts cannot in my judgment be constitutionally abridged by Executive or by Congress." Anglo-American Legal history gives considerable support to Justice Black's assertion. William Holdsworth, A History of English Law, pp. 110, 118 (1926).

Under the Constitution of Indiana, Article 1, § 26 provides:
"Suspension of laws.  The operation of the laws shall never be suspended, except by the authority of the General Assembly."
However, it appears that not even the General Assembly can suspend the privilege of the writ of habeas corpus unless there is a rebellion or invasion and then only if the public safety demands it. Article 1, § 27 provides:
"Suspension of habeas corpus.  The privilege of the writ of habeas corpus shall not be suspended, except in case of rebellion or invasion; and then, only if the public safety demand it."
Clearly under the Indiana Constitution, the General Assembly can not regulate the writ of habeas corpus. A statute may expand its scope, but a statute may not restrict its proper function or suspend its use except as provided under the Indiana Constitution.
[3]  Majority opinion, page 2.
[4]  Meador, Habeas Corpus and Magna Carta, pp. 18, 19 discusses the origins of the due process concept as it developed in Anglo-American jurisprudence. He notes on page 19 that "In their struggle toward constitutionalism the common lawyers revitalized chapter 39 of Magna Carta to provide the principle  due process  by which, on habeas corpus, the legality of detention would be judged and to which, they asserted, even the King was subject."

Reflecting upon the consequences of the Darnel's Case tried in 1627, Meador noted "Its most immediate consequence was to set the stage for parliamentary debates the next year which led to the Petition of Right. The case is also noteworthy because it shows how the writ of habeas corpus is no greater protector of liberty than the judges' view as to what constitutes lawful custody."
(See also: Sir Edward Coke, The Second Part of the Institutes of the Laws of England, p. 50 (6th ed. 1681).)
[5]  "Cruel and unusual punishments shall not be inflicted." Constitution of Indiana Article 1, § 16. Not only has punishment been administered without a trial as required by due process of law, but the punishment administered here could be characterized as "cruel and unusual" even after trial and conviction. I do not think that it is absolutely necessary to bring a civil rights action under 42 U.S.C. § 1983 as suggested by the majority. The petitioners are entitled to immediate relief from the Indiana Courts. This is not a question of civil rights. It is a question of due process of law: under what conditions does a lawful executive commitment become unlawful as a violation of due process of law?
