
391 S.W.2d 667 (1965)
STATE of Tennessee ex rel. Scott N. BROWN, Plaintiff in Error,
v.
Gilbert Frank NEWELL, Defendant in Error.
Supreme Court of Tennessee.
June 2, 1965.
*668 John S. Wrinkle, Chattanooga, for plaintiff in error.
George M. McCanless, Atty. Gen., Edgar P. Calhoun, Asst. Atty. Gen., Nashville, for defendant in error.
WHITE, Justice.
This is an appeal from a dismissal of a petition for the writ of habeas corpus. Petitioner seeks a ruling on the merits of his petition as well as a decision by this Court on the question of whether or not a prisoner has a right to bail while appealing a dismissal of a habeas corpus petition.
The petitioner was convicted on May 17, 1963, of fraudulent breach of trust in the Criminal Court of Hamilton County, Tennessee. He was sentenced to serve not less than three years nor more than three years in the State Penitentiary. An appeal was perfected to this Court and the judgment of the lower court was affirmed in an opinion dated January 8, 1964.
A petition to rehear was filed and denied by this Court in an opinion dated March 5, 1964. A second petition to rehear was filed and this petition was dismissed on April 7, 1964. Subsequently, the petitioner filed a petition for the writ of certiorari in the Supreme Court of the United States and that petition was denied on October 15, 1964. A petition for a rehearing was then filed in the Supreme Court of the United States and this was denied on December 7, 1964.
During the time the petitioner was appealing the case to this Court, the records of this Court will show that the petitioner was free on bond. After this Court affirmed the judgment, execution thereof was stayed pending the proceedings in the Supreme Court of the United States, and on October 15, 1964, this Court again stayed execution of judgment for ninety days from and after October 15, 1964, one of the reasons therefor was to allow the peitioner an opportunity to defend certain other charges *669 brought against him in the Criminal Court of Hamilton County. The final stay of execution expired on or about January 13, 1965, and the petitioner was taken into custody by the defendant in this cause in his official capacity as Sheriff of Hamilton County, to commence serving the judgment of imprisonment which had been rendered against him as heretofore stated.
After being taken into custody by the Sheriff of Hamilton County, the petitioner filed, on January 15, 1965, a petition for the writ of habeas corpus. Thereupon, the Criminal Court of Hamilton County issued the writ on the same date. A demurrer thereto was filed on behalf of the defendant stating that the petition showed on its face that it was a collateral attack against a valid judgment. A hearing was held on January 15, 1965, and was continued to January 25, 1965, whereupon the court ordered that the petition be dismissed and the relief prayed for denied. Also, the court refused to set bond for petitioner pending appellate review of the case. A petition to rehear was filed and, thereafter, denied on February 8, 1965, Petitioner now has perfected his appeal to this Court.
Petitioner has made four assignments of error to the trial judge's actions, which can be summarized as follows:
1. That petitioner was indicted under T.C.A. § 39-2246 [sic] [39-4226], but was tried and convicted under T.C.A. § 47-1020.
2. That his conviction under T.C.A. § 47-1020 was void because the Code section was enacted after his contract with the Chase Manhattan Bank, out of which the original prosecution arose, and, therefore, this section had no application.
3. That the judgment of conviction was void because the trial judge withheld the indictment from the trial jury.
4. That the judgment was void because the contract between petitioner and the Chase Manhattan Bank was made in 1951, and T.C.A. § 47-1020 was not enacted by the General Assembly until 1959, making the section a retrospective law.
In dismissing the petition the trial judge held:
A review of the petition in this matter, and an examination of the three (3) opinions of the Supreme Court of Tennessee, in this same matter (original opinion filed January 8, 1964, and opinions on petitions to rehear filed March 5, 1964, and April 8, 1964), has been made, and it appears that the petition herein does not contain any new questions which have not already been considered in those three (3) opinions.
The well settled law of this State is that the writ of habeas corpus may not be used to make a collateral attack against a valid conviction and judgment, and this is particularly true when such verdict of the jury and the judgment of the Trial Court thereon has been reviewed by the Supreme Court of Tennessee and found without error. State ex rel. Smith v. Bomar, 212 Tenn. 149, 368 S.W.2d 748, and cases cited therein.
It is axiomatic that we may take judicial notice of facts in an earlier proceeding of the same case and our final action thereon. Likewise, we may look to the record of petitioner's direct appeal to this Court from his original conviction and judgment. State ex rel. Wilkerson v. Bomar, 213 Tenn. 499, 376 S.W.2d 451 (1963).
We have carefully studied our former opinions in this case and we find that the matters complained of by petitioner have already been fully considered. Therefore, we see no reason or good purpose to be served in considering petition on the merits. For a full discussion of petitioner's assignments of error and our ruling thereon, see our opinion filed January 8, 1964.
It is the well settled law of this State that a writ of habeas corpus may not *670 be used as a substitute for or in lieu of an appeal. State ex rel. v. West, 139 Tenn. 522, 201 S.W. 743 (1918); State ex rel. Underwood v. Brown, 193 Tenn. 113, 244 S.W.2d 168 (1951); State ex rel Potter v. Bomar, 209 Tenn. 577, 354 S.W.2d 767; State ex rel. Holbrook v. Bomar, 211 Tenn. 243, 364 S.W.2d 887 (1963).
Petitioner's basic arguments have already been considered on appeal to this Court and we see no reason for reviewing those arguments upon petition for habeas corpus. Thus, we must affirm the action of the lower court in dismissing the petition.
The only matter of substance complained of in the case is whether or not the trial court erred in refusing to fix bail for the petitioner pending his appeal in this cause.
Counsel for petitioner ably argues that petitioner is entitled to bail for two reasons. The first is that the right to bail is conferred under Article I, § 15, of the Constitution of Tennessee, which reads:
That all prisoners shall be bailable by sufficient sureties, unless for capital offences, when the proof is evident, or the presumption great.
This provision is carried into the Code under Section 40-1201.
Likewise, petitioner looks to the Eighth Amendment to the Constitution of the United States, to-wit:
Excessive bail shall not be required, nor excessive fines imposed, nor cruel or unusual punishments inflicted.
We are of the opinion that there is no merit in this contention for a reason that this constitutional guaranty of bail is lost after conviction. At the time of filing of this petition, the petitioner's term of imprisonment under a final judgment had begun. Butt v. State, 131 Tenn. 415, 175 S.W. 529 (1914); Hicks v. State, 179 Tenn. 601, 168 S.W.2d 781 (1943); Goins et al. v. State, 192 Tenn. 32, 327 S.W.2d 8 (1951); Rosenbaum v. Campbell, 196 Tenn. 555, 268 S.W.2d 580 (1954).
Counsel for petitioner next argues that petitioner has a right to bail under T.C.A. § 23-1828.
Adjustment of bail.  The plaintiff may also, in any case, be committed, let to bail, or his bail diminished or increased, as justice may require.
We recognize that the writ of habeas corpus is a high prerogative writ of ancient origin in the common law, the vital purpose of which is to obtain immediate relief from illegal confinement; to liberate those who may be imprisoned without sufficient cause; and to deliver them from unlawful custody. It is essentially a writ of inquiry and is granted to test the right under which a person is detained, not to determine the guilt or innocence of a prisoner, but only to ascertain whether he is restrained of his liberty by due process of law. See T.C.A. § 23-1801.
Our interpretation of T.C.A. § 23-1828 is that the statute outlines three possible courses of action: (1) committal (denial of bail); (2) let to bail; or (3) diminish or increase bail. We are unable to find language in the statute which would extend the right to bail beyond those instances where bail is allowed under T.C.A. § 40-1201 et seq.
The only authority for granting bail in post-conviction cases is contained in T.C.A. §§ 40-1204, 40-3406, 40-3407. These sections apply only to direct appeals or writ of error from conviction.
Indicative of the language contained in these sections is T.C.A. § 40-1204:
Admission pending appeal.  In the cases in which the defendant may be admitted to bail upon appeal or writ of error, as before provided, the order admitting him to bail may be made either by the court wherein the judgment *671 was rendered, or the judge thereof, or by the Supreme Court.
Admission to bail pending proceedings for review of an order or judgment in a habeas corpus proceeding is largely statutory. We are unable to find clear statutory authorization for admitting to bail in such a case. It, therefore, appears to us that where the petition for habeas corpus is dismissed and the prisoner remanded, we should not admit to bail pending an appeal. To hold otherwise would be to grant indirectly the very relief which was previously denied the prisoner, that is his freedom.
If a prisoner could obtain release, on bond, from restraint by the mere filing of a petition for the writ, he could and probably would file the same ad infinitum, and, thereby, escape restraint indefinitely.
The Iowa Supreme Court in several instances has likewise denied bail to a prisoner upon the dismissal of his habeas corpus petition, and in so doing construed a statute almost identical to T.C.A. § 23-1828. See 2 Code of Iowa § 663.39, I.C.A. (1962); Elsner v. Shirgley, 80 Iowa 30, 45 N.W. 393 (1890); Orr v. Jackson, 149 Iowa 641, 128 N.W. 958 (1910); Allen v. Wild, 249 Iowa 255, 86 N.W.2d 839 (1957).
In Orr v. Jackson, supra, the Iowa Supreme Court held:
The habeas corpus proceeding was not a criminal proceeding. * * * And, if it were, Seidlitz was plaintiff therein, and not defendant. The statutes in relation to bail have no application to such a case. The purpose of bail on appeal in a criminal case is only to suspend the execution of a judgment pending the appeal. There was no such function to be performed in the case under consideration. The effect of the order for bail was not to maintain the status quo. On the contrary, it operated affirmatively to grant such petitioner the very relief which was denied him in the order of dismissal. 149 Iowa at 643, 128 N.W. at 960.
Finally, T.C.A. § 23-1831 provides that in a habeas corpus proceeding the trial judge shall remand the petitioner to custody if it appears that his detention is authorized by law. This statutory mandate appears to close the door as to the question of bail in the instant case.
The petition was properly dismissed in the court below, and the denial of bail to petitioner upon appeal to this Court was also proper. Affirmed.
BURNETT, C. J., and DYER, HOLMES and CHATTIN, JJ., concur.
