Appeal from order discharging petitioner forthwith in habeas corpus proceedings. Reversed.
Petitioner alleged an illegal restraint in that prison officials refused him medical attention. He said it amounted to cruel and unusual punishment. Eliminating non-essentials, the record may be abstracted thus: Chapman was a burglar the legality of whose commitment he did not assail. In applying for and obtaining a parole, he assigned as one reason a desire and intention to have an operation on what accurately was described as his “weak and almost useless right arm and hand of 16 years duration” resulting from residual poliomyelitis. The Pardons Board permitted him to go to Mayo Clinic, in Minnesota, where, after one operation, and while awaiting a second in a series, he violated his parole by associating with an ex-convict, and by slugging telephones, which cost him 35 days in jail. His parole was revoked and after fighting extradition unsuccessfully in habeas corpus proceedings, he was returned to Utah.
Chapman claimed that for four months he suffered cruel and unusual punishment when prison officials returned him to Utah before completion of his surgery and by refusing him medical attention and the care of a competent surgeon, all of which endangered his health and threatened loss of use of his arm. The warden, prison physician and the prison medical officer refuted such assertions. The warden said he permitted Chapman to see doctors when requested. Further that Chapman told him more than once that he would not consent to surgery in Utah. Chapman corroborated this last statement of the warden, by admitting twice under oath that he would not consent to such surgery in Utah. The warden and Board of Corrections took a stand: That Chapman would not be allowed to return to Mayo’s, and that any further surgery during his stay at the prison would be performed in Utah and at Chapman’s expense. Chapman was permitted, under guard, to visit Dr. Beck, a competent Salt Lake orthopedic physician, six or seven times. Dr. Beck testified that he could and would perform the surgery for Chapman if the latter would consent, and that it could be done immediately and without necessity of any release from imprisonment. Chapman did not consent to *158such surgery but told Dr. Beck he would like to have the Mayo doctor complete the surgery. It does not appear that Chapman approached Dr. Beck with the idea of having the latter perform any operation, nor that the doctor would condition the performance thereof on any advanced or deferred payment for the service. The doctor, while not committing himself to any exact time, stated that surgery should be undertaken without too much delay to prevent atrophy, and that presently there was no discomfort because the bone fusion was solid.
The trial court discharged Chapman forthwith. We cannot understand why he was discharged at all. His treatment by prison officials was such a far cry from the "cruel and unusual punishment” constitutionally interdicted,1 and ordinarily thought of in terms of the thumbscrew, the rack, burning at the stake, nailing one’s tongue to a post, crucifixion, disembowelment, beheading, quartering, public dissection and ‘the like,2 as to merit no consideration of Chapman’s claim of cruel and inhuman punishment. Discharging Chapman here in habeas corpus proceedings does violence, we believe, to the high prerogative writ which we have learned was conceived in antiquity and nourished by the blood spilled on behalf of the Great Charter. Use of the writ in a case like this would pierce and wound the administrative processes of constitutionally created executive agencies 3 with a habeas corpus lance thrust by the judiciary. Almost universally such use has been condemned, and the function of habeas corpus has been confined to a single test: That of legality of restraint,4 even to the exclusion of those cases where an individual’s health has been shown to be in jeopardy.5 We have adopted such view in Jones v. Moore, 1923, 61 Utah 383, 213 P. 191, 193, where we said that “In habeas corpus proceedings nothing is inquired into except the legality of the restraint”. We re-affirm that principle as it applies to cases like this and as applied to child custody cases where the welfare of children may lend a different complexion to, but not a basic difference in the principle.
*159We are not constrained to sanction the use of this extraordinary remedy to permit him who has run afoul of the law to dictate the terms and conditions incident to the nature, extent and place of medical care to be given^ nor to force out of state travel because one lawfully restrained opines that his physical welfare and comforts better will be served abroad. We prefer to adhere to the principle, until that rare case approaches which to date we have not encountered, that courts, by means of the writ, will not interfere with the management, control or internal affairs, nor will they, nor can they substitute their judgment in discretionary matters for those of administrative agencies of a different department of government.6 In saying all these things, we are not unmindful of the principles enunciated in the leading case of Weems v. U. S., 217 U.S. 349, 30 S.Ct. 544, 54 L.Ed. 793, which includes the precept that in the light of progress and enlightenment, the cruel and unusual punishments of today may be deemed to include some of considerably less severity than those deemed cruel and unusual in the yesteryear.
In this era where public employment is so much more sensitive to the democratic processes than history frequently otherwise has known, it would seem to be a rare case where cruel and unusual punishment would persist where legal and administrative remedies properly had been pursued, — a procedure which must be followed before the writ may be employed.7 At least, for nearly 200 years, the dearth of cases suggesting the use of the writ of habeas corpus as an instrument to discharge from custody for cruel and unusual punishment, where the individual is lawfully restrained, is either a monument to our democratic administrative processes or a testimonial to the belief that the writ has-' not been considered available for such employment.
In passing, we are constrained to suggest that in this case the trial court more properly could have made the petitioner’s discharge conditional upon affirmance by us or upon failure of appeal within the prescribed time, or knowing that this prisoner would depart the state posthaste upon his release admitted him to bail in order to assure his return to proper custody should this court happen to disagree, as we have, with the trial court. Both procedures we have approved,8 although we are aware that a different conclusion was reached in early cases touching the matter.9
This cause is remanded with instructions to vacate the order of discharge entered *160and to enter an order remanding the petitioner to the custody of the warden of the Utah State Prison.
McDonough, c. j., and wade, j., concur in the result.