delivered the opinion of the Court.
This is an appeal from an order of .the Criminal Court of Davidson County dismissing without a hearing a petition, which is designated a petition for habeas corpus, which was filed by the plaintiff in error pro se in that Court. The order of the Trial Court states:
“The matters alleged therein are not such as can he determined by writ of habeas corpus and, therefore, said petition appears to be without any merit, either in law or fact, and is, consequently, dismissed.”
Court appointed counsel for the plaintiff in error has duly perfected an appeal to this Court and assigned errors.
The petition filed in the Trial Court alleges that Ciar*496ence L. Jordan /was convicted of burglary in the third degree on April 4, 1962 in the Criminal Court of Smith County and sentenced to serve three years in the State Penitentiary. It states that Jordan had.been seriously injured about his arm and shoulder in an automobile accident in Nashville in January 1962 and was until the time of his incarceration in the State Penitentiary on April 6, 1962 under the care of Dr. Cleo Miller, a Nashville physician. The petition further states that Jordan, following his confinement in the penitentiary, “repeatedly requested to see a doctor as pain grew worse and the arm became more useless day by day.” It further alleges that on May 23, 1962 the petitioner was taken to the Criminal Court of Davidson County, Tennessée, where he was tried on another charge of third degree burglary, was found guilty, and sentenced to serve four years and one day in the penitentiary, his two terms to be served consecutively, that thereafter, on July 26, 1962, he was seen by Dr. Don Eyler, a State employed doctor who “operated on the shoulder of petitioner finding certain tissues damaged along with the bone and inserted a metal screw into the arm and shoulder joint to hold the shoulder in position. ’ ’ He remained in the prison hospital approximately twelve days on this occasion, and a short time after his release was returned to the hospital for two weeks, during which time an aid gave him arm exercises and then he was returned to work.
It' is alleged that about November 14, 1962 petitioner was confined in the maximum security building, that he requested to see a doctor at that time and “was denied this until finally in March 1963 petitioner was examined by Doctor Lipton and Doctor Jones, prison doctors,” who ordered X-rays of petitioner's shoulder. Petitioner states he was advised at that time by the doctors that he had an *497infected and inflamed shoulder and arm tendon, that “Doctor Jones ordered heat treatments to- be given petitioner by the hospital superintendent for two weeks but this was refused to petitioner by the hospital superintendent.” The petition states that thereafter Dr. Jones advised petitioner that possibly the tendon in the shoulder was pinched between the bones in the shoulder area and that another operation might be necessary. Petitioner states Dr. Jones “told petitioner an operation would be performed on him (the petitioner) July 10, 1963. This date came and petitioner seen (sic) Doctor Jones again and was told he (petitioner) was being transferred to Fort Pillow State Farm and would not be operated on after all.” It is alleged that on this occasion Dr. Jones advised the petitioner there were good doctors at Fort Pillow and that he would be cared for.
The petitioner states he .was transferred to Fort Pillow on July 24, 1963, where he. was required -to perform manual labor which caused extreme physical pain in his arm and shoulder, that he constantly requested to see a doctor but was denied that right. He avers that he asked “Mr. J. C. Warpool, Deputy Warden of Fort Pillow State Farm, personally, to allow him (petitioner) to see a, doctor” and was advised theré was nothing the doctors could do for him.
The petition asserts that Jordan first was seen by a doctor in November 1963 after he arrived at Fort Pillow, when Dr. Thomas from Ripley, Tennessee, came to the Fort Pillow Stale Farm. Petitioner states this doctor ordered “hot water treatments consisting of shower three times a day” for petitioner and requested petitioner be brought to his office in Ripley, Tennessee, the .following Monday if petitioner’s condition had not' im*498proved. It is alleged that Jordan did not receive the hot water treatments, nor was he given medicine which was left with the prison officials by the doctor, and was not taken to the doctor’s office in Ripley.
Jordan alleges he was sent back to heavy manual labor and did not see another doctor until several months later when he was “in such great pain and the arm and shoulder was so inflamed and swelled petitioner was unable to use it in any manner, that he was taken to Ripley, Tennessee, to a clinic wherein petitioner was examined and given some medicine to lessen his pain and received only (2) two and (1) one-half pills over a (3) three day period whereas the doctor specifically directed petitioner should have (1) one pill every (6) six hours or when needed.” Jordan further alleges that he heard the doctor on this occasion tell Mr. Crook, the officer who drives the official prison transfer car for Fort Pillow State Farm, that the petitioner should be taken to the main penitentiary at Nashville the very next trip of the transfer car to Nashville so that petitioner could receive proper medical attention, but petitioner remained at Fort Pillow and no effort was made to return him to Nashville.
The petition further alleges that on February 15, 1964 petitioner was returned to the penitentiary at Nashville and placed in the maximum security building there, “and though petitioner has requested to see doctor being in constant pain has not at this date March 16, 1964, seen a doctor. ”
T.C.A. sec. 4-616 requires the appointment of a physician for each of the state prisons. By the terms of T.C.A. sec. 41-313 the physician is required to visit the prison each day and examine the physical condition of. the con*499victs and pass on their ability to work. T.C.A. see. 41-314 provides:
“He (the physician) shall also visit and examine any convict who complains of illness, npon notice from any of the officers of the penitentiary; which notice it is their duty to give immediately on complaint made, and if, in his opinion, the illness is such as to require removal to the hospital, the convict shall be removed accordingly, and allowed to remain there until the physician determines that he may be removed without injury. ’ ’
The brief of the defendant cites a number of the decisions of this Court which hold:
“It is, of course, well settled that one imprisoned under judicial authority may obtain relief by writ of habeas corpus only where the sentence is void, not merely voidable; or the term of imprisonment has expired.” Adams v. Russell, 179 Tenn. 428, 430, 167 S.W.2d 5, 6.
See also State ex rel Grandstaff v. Gore, 182 Tenn. 94, 98, 184S.W.2d 366; State ex rel. Holbrook v. Bomar, 211 Tenn. 243, 246, 364 S.W.2d 887.
In State ex rel. Warren v. Jack, 90 Tenn. 614, 18 S.W. 257, a petition for habeas corpus was filed by a prisoner lawfully subject to imprisonment in the State Penitentiary. There the petitioner complained that he was required to work at hard labor in coal mines for a sub-lessee of the State. The record showed that a branch of ' the penitentiary had been lawfully established at Brice-ville, in which the petitioner in that case was confined. Also the record showed petitioner was under the control of an assistant or deputy warden. The Court held:
*500“So long as lie remains in the custody of a warden, acting under the supervision of the board of inspectors, there is no illegality in his confinement at a branch prison.
“A remedy for the evils complained of in the proof and argument is provided in clear terms by the statute, but the case before us does not present a question making its discussion necessary.”
In a supplemental reply brief of the defendant in error, the Attorney Generál candidly calls our attention to the fact that there are some cases from other jurisdictions which hold that a prisoner, thoug’h lawfully in custody, may seek relief by way of habeas corpus upon the ground of unlawful treatment during such custody. These cases are collected in an annotation appearing in 155 A.L.fi. 145.
Having examined the authorities, we agree with the rule heretofore stated in this State that habeas corpus will not lie to superintend the treatment of prisoners confined in the penitentiary, but that writ is only available where the sentence is void or the. term of imprisonment has expired, We find this to be the rule in most jurisdictions.
In Sarshik v. Sanford, 5 Cir., 143 F.2d 676, a petition for habeas corpus was filed by a prisoner against the warden of the United States Penitentiary at. Atlanta alleging that the prisoner was ill, and so treated as to aggravate his illness. The Court in affirming the judgment of the District Court, 53 F.Supp. 425, discharging the writ stated:
“The courts have no function to superintend the treatment of prisoners in the penitentiary, but only to *501deliver from prison those who are illegally detailed there.” < '• ■
In State ex rel. Baldwin v. Superintendent, etc., 192 Md. 712, 63 A.2d 323, the opinion states that the petition for habeas corpus alleged, “He states that,he.has tuberculosis, but was denied proper treatment in the prison hospital, by the Doctor in charge or the attendants, He also complains of the lack of proper-food. He states, that complaints to the Superintendent have been ignored.” In the light of these averments the Maryland Court held:
“As we have pointed out in several recent cases, such complaints do not afford any basis for release upon writ of habeas corpus. (Citing cases) They should be addressed to the Board of Correction,which is respon- . sible for proper prison management. ’ ’
In dismissing a petition for habeas corpus alleging mistreatment and denial of rights while confined in prison, the Supreme Court of Oregon in Gibbs v. Gladden, Warden, etc,, 227 Or. 102, 359 P.2d 540, 541, stated the purpose of the writ of habeas corpus as follows:
“It is to inquire into the legality of the imprisonment, not to supervise the administration of the institution. ’ ’
As stated in State ex rel. v. Jack, supra, there is a remedy for the alleged evils complained of. If in this case, because of the petitioner’s lack of knowledge of legal writs, we were disposed to treat this petition as a petition for writ of mandamus to require the prison officials to furnish medical attention as provided by T.C.A. sec. 41-314, we could not do so. This is true because the case originated in the Criminal Court. Criminal Judges do not have jurisdiction to issue writs of mandamus, T.C.A. sec. 23-2001. ¥e could not, therefore, remand the cause *502with direction to issue an alternative writ of mandamus for the purpose of determining the truth or falsity of the averments of the petition.
We believe, however, that if court appointed counsel for the petitioner will malte known to the Commissioner of Corrections of the State the substance of the aver-ments of the petition relating to a denial of medical care, the matter will be properly investigated and, if there is any truth in the claim petitioner has been denied such care, the same will be furnished without further legal proceedings.
Court appointed counsel has ably presented this case and rendered valuable legal service without any hope of compensation. The Court appreciates that service. It is in keeping with the highest traditions of the legal profession.
The judgment of the Trial Court dismissing the petition for writ of habeas corpus pursuant to T.C.A. sec. 23-1809 is affirmed at the cost of the plaintiff in error.