
30 Cal.2d 838 (1947)
In re WILLIAM JEROME PHYLE, on Habeas Corpus.
Crim. No. 4797. 
Supreme Court of California. In Bank.  
Nov. 10, 1947.
 Al Matthews, Morris Lavine and Wallace S. Myers for Petitioner.
 Fred N. Howser, Attorney General, and Clarence A. Linn, Deputy Attorney General, for Respondent.
 TRAYNOR, J.
 William Jerome Phyle was found guilty of first degree murder and sentenced to be executed. The judgment was affirmed by this court (People v. Phyle, 28 Cal. 2d 671 [171 P.2d 428]), and the date of execution was set for December 26, 1946. While defendant was awaiting execution at the state prison at San Quentin, the warden of that prison initiated proceedings pursuant to section 3701 of the Penal Code to determine the question of defendant's sanity. After a jury trial defendant was adjudged insane and committed to the Mendocino State Hospital. On January 18, 1947, the superintendent of that hospital certified to the Governor that defendant had recovered his reason. The Governor then issued a warrant to the warden of the state prison at San Quentin appointing May 2, 1947, the day of execution. One of defendant's attorneys filed a petition for a writ of habeas corpus in this court, contending that the superintendent of the Mendocino State Hospital had no authority under the law of this state to release the defendant to the warden of the state prison at San Quentin without an adjudication of a competent court that defendant had recovered his reason. This court issued the writ for the purpose of giving consideration to this contention.
 Section 1367 of the Penal Code provides that "A person cannot be tried, adjudged to punishment, or punished for a public offense while he is insane." The question of defendant's sanity at the time of the commission of the offense or at the time of his conviction or sentence is not involved in this proceeding. The only question presented is whether a *841 person who has been adjudged insane after conviction, sentence, and delivery to a warden of a state prison for execution, has the right to a judicial determination of the question of his restoration to sanity.
 [1] The procedure for determining the question of the sanity of a prisoner under sentence of death is specified in sections 3700 to 3704 of the Penal Code. Section 3700 provides that, "No judge, court, or officer, other than the Governor, can suspend the execution of a judgment of death, except the warden of the State prison to whom he is delivered for execution, as provided in the six succeeding sections, unless an appeal is taken." Four of the six sections referred to relate to the question of the prisoner's sanity. The other two, which prescribe the procedure for determining the question of the pregnancy of a woman sentenced to death, are not material in this case.
 Section 3701 provides for the determination of the question of defendant's sanity after he has been delivered to the state prison: "If after his delivery to the warden for execution, there is good reason to believe that a defendant, under judgment of death, has become insane, the warden must call such fact to the attention of the district attorney of the county in which the prison is situated, whose duty it is to immediately file in the superior court of such county a petition, stating the conviction and judgment, and the fact that the defendant is believed to be insane, and asking that the question of his sanity be inquired into." Section 3702 provides the procedure for the hearing held pursuant to section 3701. Section 3703 provides that "The verdict of the jury must be entered upon the minutes, and thereupon the court must make and cause to be entered an order reciting the fact of such inquiry and the result thereof, and when it is found that the defendant is insane, the order must direct that he be taken to a State hospital for the insane and there kept in a state of confinement until his reason is restored."
 Section 3704 provides for the disposition of the defendant after the court's order is entered: "... if it is found that the defendant is insane, the warden must suspend the execution and transmit a certified copy of the order mentioned in the last section to the Governor, and deliver the defendant, together with a certified copy of such order, to the medical superintendent of the hospital named in such order. When the defendant recovers his reason, the superintendent must certify that fact to the Governor, who must thereupon issue *842 to the warden his warrant appointing a day for the execution of the judgment, and the warden shall thereupon return the defendant to the State prison pending the execution of the judgment." (Italics added.)
 It is apparent from a reading of sections 3700 to 3704 of the Penal Code that there is no provision for a judicial determination of the question of the sanity of a defendant delivered to the warden of a state prison for execution except as set forth in section 3701. In fact, section 3700 expressly provides that after the defendant has had his appeal to this court, the execution of his sentence lies exclusively within the control of the Governor, and the warden of the prison.
 Petitioner contends, however, that the question of restoration to sanity after a judicial determination that defendant is insane is necessarily a judicial question and that the statute must be interpreted as if it provided that, "when it has been judicially determined that defendant has recovered his reason the superintendent must certify that fact to the Governor. ..." Petitioner maintains that in view of the cases construing statutory provisions regarding the restoration to sanity of a defendant adjudged insane during the course of his trial (Pen. Code,  1367-1372) defendant has a right to a judicial determination of the question of his restoration to sanity. Petitioner relies on the rule that a person confined in a state hospital pursuant to those provisions has a right to habeas corpus to determine whether his sanity has been restored. (Gardner v. Jones, 126 Cal. 614, 618 [59 P. 126]; In re Buchanan, 129 Cal. 330, 331 [61 P. 1120, 50 L.R.A. 378]; see People v. Superior Court, 4 Cal.2d 136, 145 [47 P.2d 724].) It is true that a defendant committed to such an institution has a right to his release therefrom, if it is determined on habeas corpus that he is improperly held because he is presently sane. If it is found that he is sane, he is returned to the custody of the sheriff and his trial proceeds. (In re Buchanan, supra, at p. 336.) In the present case, petitioner does not seek release of defendant from the state hospital, on the ground that he is sane, for if he were found sane he would be delivered to the warden for execution. Instead, petitioner seeks the return of defendant to the state hospital, on the ground that he was improperly discharged therefrom. There is no authority, however, for the proposition that defendant has a right to habeas corpus or other judicial proceeding to determine the question of his sanity after his release from the state hospital. In fact, section 3700 *843 of the Penal Code expressly prohibits such a proceeding. Once the superintendent certifies that defendant is sane, he is remanded to the custody of the warden for execution and "No judge, court or other officer other than the Governor" can then suspend the execution of the judgment, "except the warden of the State Prison to whom he is delivered. ..."
 [2] Nor is there any provision for the superintendent to initiate judicial proceedings to ascertain the fact to which he certifies. The superintendent is not authorized, as the warden is, to call the question to the attention of a district attorney for a judicial determination. Instead, it is his duty to certify the fact to the Governor "who must thereupon issue his warrant appointing a day for the execution. ..." Since the method of determining the question of the sanity of a person awaiting execution is controlled by the Legislature and since the Legislature has provided in Penal Code, section 3700, that the courts cannot suspend the execution of a judgment of death and has provided in section 3701 for a judicial proceeding to determine the question of defendant's sanity only when the warden invokes such a proceeding, it is clear that the question of restoration to sanity under section 3704 is a question for the determination of the superintendent.
 [3] This interpretation of section 3704 is in accord with the interpretation by this court of the almost identical language of section 1372, which relates to the question of the restoration to sanity of a person who has been judicially adjudged insane before conviction. Section 1372, which was amended to its present form at the same time as the provisions with respect to the restoration to sanity of a person adjudged insane after conviction and sentence (Stats. 1905, pp. 699, 704),  [fn. *] provides: "If the defendant is received into the state hospital he must be detained there until he becomes sane. When he becomes sane the superintendent must certify that fact to the sheriff and district attorney of the county. The *844 sheriff must thereupon ... place him in proper custody until he is brought to trial or judgment as the case may be, or is legally discharged." (Italics added.)
 In construing section 1372 in People v. Superior Court, 4 Cal.2d 136, 144-147 [47 P.2d 724], this court held that the question of defendant's restoration to sanity is for the superintendent to determine. The court stated that once a person has been committed to a state hospital under section 1372, " 'no court in this state is authorized to discharge him therefrom, or to restore him to the capacity of a sane person, under any circumstances, except upon a writ of habeas corpus. The power to discharge him otherwise than upon habeas corpus is vested exclusively in the officers of the asylum' ... The Penal Code undoubtedly prescribes the exclusive manner by which the proceedings shall be set in motion when the defendant is restored to sanity or is not insane." (People v. Superior Court, supra, at 145.) After the superintendent determines that a defendant placed in his custody pursuant to sections 1370 to 1372 of the Penal Code is sane, the defendant is returned to the court in which his trial had begun. It is not necessary for the verdict finding him insane to be vacated before the trial court may proceed. (People v. Rice, 83 Cal.App. 55, 60 [256 P. 450].)
 When the provisions in question of both section 1372 and section 3704 were adopted in 1905, a substantially similar provision of the Criminal Practice Act (Stats. 1851, p. 278,  591) relating to the restoration to sanity of a person adjudged insane before judgment had already been interpreted by this court. Section 589 of that act provided for the delivery of a person found to be insane before judgment to the custody of a "proper person" and for his redelivery by such person to the sheriff upon his becoming sane. Section 591 provided that, "If the defendant be received by the person so appointed he must be detained by him until he becomes insane. When he becomes sane, such person shall give notice to the Sheriff and District Attorney of the County of that fact." (Italics added.) In People v. Farrell, 31 Cal. 576, 580, it was held that this provision did not require a judicial determination of the question of restoration to sanity and that the verdict of insanity under which the defendant was committed did not have to be vacated before the defendant could be tried. Accordingly, it was not error for the trial *845 court to proceed with the trial of the defendant without instituting "some form of judicial inquiry into the present sanity of the accused." (People v. Rice, 83 Cal.App. 55, 60, supra; People v. Superior Court, 4 Cal.2d 136, 144-147, supra.)
 Since these statutes are obviously in pari materia, the interpretation of a sentence in one controls the interpretation of virtually the same sentence in the other. It must be assumed also that when the Legislature adopted the present provisions of section 3704, it was aware of the construction that had been given section 591 of the Criminal Practice Act.
 [4] Petitioner contends, however, that section 3704 is modified by section 6760 of the Welfare and Institutions Code, which provides: "A patient committed to a State hospital under the provisions of Chapter VI, Title X, Part II of the Penal Code, shall, upon the certificate of the superintendent that the person has recovered, approved by the superior judge of the county from which the patient was committed, be redelivered to the sheriff of such county, and dealt with in accordance with the provisions of the above-mentioned chapter of the Penal Code." Even if it be assumed that this section requires a judicial determination of the question of the restoration to sanity of one committed pursuant to the chapter of the code referred to (cf. People v. Superior Court, supra, 143-146), it clearly has no application to the present case, for petitioner was not committed under the provisions of that chapter of the Penal Code, but under the provisions of chapter 2, title 3, part 3 of that code with respect to which there is no provision comparable to section 6760 of the Welfare and Institutions Code requiring approval of the superintendent's cretificate by the superior judge of the county from which the patient was committed.
 [5] Petitioner contends also that there is an inherent judicial power to determine the question of restoration to sanity, regardless of the statutes. He cites for this proposition the case of People v. Scott, 326 Ill. 327, 338 [157 N.E. 247] wherein it was held, in the absence of a statutory provision regarding restoration to sanity, that a jury trial of the question of sanity was proper. Where there is a statute that declares that the superintendent of the state hospital where the prisoner is confined may declare the prisoner's sanity restored, a person awaiting execution has no right to a *846 judicial determination of his restoration to sanity. (Barrett v. Commonwealth, 202 Ky. 153, 160 [259 S.W. 25].) By adopting section 3700 of the Penal Code prohibiting the courts from suspending the execution of a judgment of death except on appeal, the Legislature has provided in effect that the courts of this state are without power, except as provided by statute, to determine the sanity of a person who has been sentenced to be executed for a capital offense and is in the custody of the warden of a state prison for the purpose of execution. (See People v. Sloper, 198 Cal. 601, 608 [246 P. 802].) Thus, regardless of what the common law powers of a court may be, when the procedure for the determination of the question of the sanity of a person who has been sentenced to death is covered by statute, a court has no inherent power to determine that question and such a person has no right to a judicial determination of the question unless the statutes so provide. (State v. Alexander, 87 Utah 376, 381 [49 P.2d 408]; Howell v. Kincannon, 181 Ark. 58 [24 S.W.2d 953, 956]; Cribb v. Parker, 119 Ga. 298 [46 S.E. 110]; Baughn v. State, 100 Ga. 554 [28 S.E. 68, 70, 38 L.R.A. 577]; Nobles v. Georgia, 168 U.S. 398, 404 [18 S.Ct. 87, 42 L.Ed. 515]; see Baranoski's Case, 9 Pa. Co. Ct. 264, 266; cases collected 49 A.L.R. 804; 38 L.R.A. 577, 588.)
 In California, moreover, this matter has never been governed by common law principles. Since the first Criminal Practice Act in this state (Stats. 1850, p. 312,  505;  473 of the Criminal Practice Act of 1851, Stats. 1851, p. 264;  1224 of Pen. Code of 1872), the question of the sanity or restoration to sanity of such prisoners has been governed by statute. Until 1905, either the Governor or a judge of the trial court could determine whether or not a prisoner was sane and order his execution after he had been found insane by an inquisition. This provision was changed in 1905 by an amendment to section 1224 of the Penal Code whereby all reference to the court was omitted and the Governor was directed to issue a warrant for the execution of the prisoner on receipt of a certificate from the superintendent of the hospital. Section 3704 is a continuation of this provision. (Pen. Code,  10000.) The courts of this state have therefore never had the right, independent of statute, to determine the question of the restoration to sanity of a defendant who is in the custody of a warden of a state prison for execution pursuant to a lawful judgment of death. *847
 [6] The question remains whether the statutory procedure for determining the question of restoration to sanity is constitutional. Petitioner contends that defendant has a right to an adjudication of the question of his sanity, protected by the due process clauses of the Constitution of the United States and the Constitution of California. There is no such right under either Constitution. The United States Supreme Court has held that the procedure for determining the question of the sanity of a person who has been properly convicted of a capital offense and sentenced to death is a matter for the Legislature and courts of the jurisdiction in which the defendant is convicted and presents no federal question. (Nobles v. Georgia, 168 U.S. 398, 404 [18 S.Ct. 87, 42 L.Ed. 515].) On this ground the court affirmed a decision by the Supreme Court of Georgia (Baughan v. State, 100 Ga. 554 [28 S.E. 68, 70, 38 L.R.A. 577]) that under the laws of Georgia a person convicted of a capital offense and sentenced to death who thereafter becomes insane has no right to a judicial determination of the question of his sanity. (See, also, cases collected in 49 A.L.R. 804.) We see no reason why the due process clause of the California Constitution should be interpreted differently.
 The statutes of this state therefore provide the measure of defendant's rights to any determination of the question of his sanity. Defendant has thus far been afforded the full protection of those statutes. He was entitled to a judicial determination of the question of his sanity after conviction and sentence only because the warden of the state prison at San Quentin believed that he was insane. The effect of the adjudication that he was insane was to prevent his execution until the superintendent of the state hospital to which he was sent certified that he had recovered his reason. His only right to another judicial determination of that question depends on the belief and action of the warden of the prison to whose custody he has been returned. (See People v. Farrell, 31 Cal. 576, 581; People v. Rice, 83 Cal.App. 55, 61 [256 P. 450].)
 This court has already decided that the authority given the warden constitutes adequate protection to one who has been properly convicted of a capital offense. In People v. Sloper, 198 Cal. 601, 607-608 [246 P. 802], the defendant was convicted of murder in the first degree and sentenced to *848 death. On appeal to this court, the judgment was affirmed. Defendant then sought to prevent the fixing of a date for execution and to obtain a trial on the question of his sanity. Upon the denial of this motion, defendant applied to this court for a stay of execution. In denying the application, this court, on the authority of Penal Code section 1221 (now  3700), held that no court in this state has the power to suspend the execution of a judgment of death to determine the question of the sanity of a person who became insane after his conviction and sentence. The court stated that "adequate statutory provision is made for the complete protection of the rights of a defendant who may have become insane after his conviction and sentence. ... If it be found that defendant is insane [pursuant to these statutes], the court must direct that he be taken to one of the state hospitals for the insane, and there kept in safe confinement until his reason is restored. When the defendant recovers his reason the superintendent of the hospital must certify that fact to the Governor, who must thereupon issue to the warden his warrant appointing a day for the execution of the judgment. ... We must conclude, therefore, that it was the intention of the legislature to limit the jurisdiction of the trial court, in proceedings of this nature to the making of the orders necessary to carry the judgment into effect. We are of opinion also, that, in view of the comprehensive and adequate provision made for the determination of the question of the sanity of a defendant who is alleged to have become insane after the rendition of a judgment of death, no substantial right of the defendant Sloper was affected by the action of the court below in denying his motion. ... If it be a fact in this case that the condemned man is insane, it must be assumed that the warden of the state prison will do his full duty to the end that the question of the prisoner's sanity may be judicially determined."
 In the Sloper case, there was no prior adjudication of insanity, but the opinion contains a clear expression of approval of the procedure thus far followed in the present case. [7] Petitioner contends, however, that because a court of law determined that the defendant was insane, only a court of law can determine that he is now sane. This contention is clearly inconsistent with section 3700 of the Penal Code and with the cases interpreting the provision of section 1372 *849 of that code similar to the provision of section 3704. Sections 3700-3704 of the Penal Code provide for the adjudication, not of some continuing status, but only of the question whether the defendant is sane at the time of the hearing initiated by the warden. Moreover, the adjudication relied on by the petitioner did not purport to decide what the condition of defendant's mind would be thereafter. There was no determination that defendant's insanity was incurable, even if it is assumed that such a determination would have been within the court's jurisdiction. The defendant was found insane at that time, and his execution was suspended only until he recovered his reason. It was the order of the court that the defendant be kept in confinement in the state hospital until he recovered his reason and "when said William Jerome Phyle recovers his reason, that the Superintendent of the State Hospital in which he is confined certify that fact to the Governor of the State of California for further proceedings as is required by law." There is therefore no merit to the contention that the adjudication that defendant was insane at the time of this trial gave him a vested right to the status of an insane person thereafter or until a court of law determined that he is sane.
 [8] The petitioner contends also that the separation of powers provision of section 1 of article III of the California Constitution is violated by leaving the final determination of a prisoner's sanity to administrative officers. The contention that the power to determine the question of restoration to sanity of such a person cannot be given to the superintendent has already been answered adversely in this state in People v. Superior Court, 4 Cal.2d 136, 146, supra, and People v. Rice, 83 Cal.App. 55, 60, supra. In these cases it was held to be within the proper scope of the superintendent's powers to determine the question of the restoration to sanity of defendants who had been adjudged insane before conviction. Thereafter the defendants were returned to the judge pursuant to section 1372 of the Penal Code and their trial continued. The judge at that time could again have concluded pursuant to section 1368 that it was doubtful whether the defendant was sane, and provided for a determination of the question in a proper judicial proceeding. (See People v. Farrell, 31 Cal. 576, 581, supra; People v. Rice, supra, at 61.) In this case that power and duty is given to the warden by section 3701 *850 of the Penal Code, for the defendant is returned, not to a court but to the warden.
 [9] Even if the warden's power in this regard is judicial, there is no violation of section 1 of article III of the California Constitution, for section 7 of article X specifically provides that "Notwithstanding anything contained elsewhere in this Constitution, the Legislature may provide for the establishment, government, charge and superintendence of all institutions for all persons convicted of felonies. For this purpose, the Legislature may delegate the government, charge and superintendence of such institutions to any public governmental agency or agencies, officers, or board or boards, whether now existing or hereafter created by it. Any of such agencies, officers, or boards shall have such powers, perform such duties and exercise such functions in respect to other reformatory or penal matters, as the Legislature may prescribe." (Italics added.)
 The delegation of power contained in the former sections of the Penal Code on this subject ( 1221-1224) was validated by the same section of the Constitution in the following terms: "All existing statutes ... purporting ... to so delegate such government, charge and superintendence, to so prescribe such powers, duties or functions ... are hereby ratified, validated and declared to be legally effective until the Legislature provides otherwise." By moving these provisions from one part of the Penal Code to another, the Legislature did not change their effect. (Pen. Code,  10000.)
 [10] Even if it is assumed that the power of the superintendent of the state hospital, to whom defendant was delivered, to determine whether defendant has recovered his reason is a judicial power, the foregoing provisions of the California Constitution authorize the delegation of this power. Under the statutes the prisoner is delivered to the custody of the superintendent as a person convicted of a felony, and thereafter, so far as the superintendent's authority over such a person is concerned the superintendent exercises not only the authority of an officer entrusted with the superintendence of an institution for convicted felons but the duties and functions prescribed in Penal Code, section 3704.
 It follows that unless the warden of the prison in which defendant is incarcerated believes that defendant is now insane, no court of this state has jurisdiction to determine the question of his sanity. It has been suggested that this conclusion must be wrong on the ground that if the matter *851 is left to the discretion of the warden, a circular process may begin whereby defendant will again be found insane, again sent to a state hospital, and again declared restored to sanity. It has therefore been suggested that only a judicial determination of this question at this time will prevent such circuity. This suggestion is based on the assumptions that the warden believes that defendant is insane, that a jury would find him to be insane, and that the superintendent of the Mendocino State Hospital was in error -- assumptions that this court cannot properly make. Moreover, it does not follow that a judicial determination of this question will prevent circuity. If this court were to hold that defendant has a right to a judicial determination of the question of his restoration to sanity under some procedure not specified in Penal Code, sections 3700 to 3704, such a determination would be either that defendant is sane or insane. If the verdict is that he is insane, the defendant would have to be delivered to an institution and detained there until in a judicial proceeding he was found sane. If the verdict is that he is sane, the defendant would be delivered to the warden for execution, and the date for execution would have to be set again. During the interval between this adjudication and the date for execution, the defendant may again become insane. Unless the warden is to execute an insane person in violation of Penal Code, section 1367, it would be the warden's duty, if he had good reason to believe that defendant was insane, to set in motion again the procedure for determining the defendant's sanity. The duty of preventing execution of an insane person is given by statute to the warden and to the Governor, and even if it were held that defendant has a right to a judicial determination of the question of his sanity, the determination that he is sane at the time finally set for his execution must be made by the warden.
 The writ is discharged, and William Jerome Phyle is remanded to custody.
 Gibson, C.J., Shenk, J., Edmonds, J., and Spence, J., concurred.
 SCHAUER, J.
 I dissent.
 I cannot agree that the privilege of the writ of habeas corpus may be denied to a person solely because he has been convicted of crime, sentenced to death, adjudged insane, and *852 committed to a state hospital; nor can I agree that the powers vested in the warden of a state prison or in the medical superintendent of a state hospital for the insane transcend and abrogate the powers of the courts to entertain proceedings on habeas corpus. It is indisputable, I think, that the powers of the courts on habeas corpus proceedings are substantially abrogated in cases of this type by the holding of the majority opinion that the factual determination of an administrative agent is absolutely conclusive on the courts in such proceedings.
 The real issue here is not what is stated in the majority opinion. It really is more simple and much more grave. On behalf of the prisoner it is alleged in material part "That on the 24th day of December, 1946, after a jury trial in the Superior Court ... William Jerome Phyle [the prisoner] was adjudged insane, and said Superior Court committed said ... Phyle to the State Hospital at Talmadge, to be held there as an insane person, and there kept in a state of confinement until his reason be restored. [Italics added.]"
 "That thereafter, said William Jerome Phyle remained in the Mendocino State Hospital at Talmadge, California, until January 18, 1947, at which time the Superintendent of the Mendocino State Hospital presented to the Governor his certificate that the said William Jerome Phyle had recovered his reason, whereas said Phyle was, and still is, insane. [Italics added.]"
 "That thereafter, the Governor of the State of California isued to the Warden [of the state prison] the Governor's warrant, appointing the 2nd day of May, 1947 for the execution by means of lethal gas of William Jerome Phyle. ..."
 "That unless this Court restrains Clinton T. Duffy [the warden of the state prison] from carrying out the warrant of the Governor, that said ... Phyle will be executed on Friday, the 2nd day of May, 1947."
 According to the return to the writ, the prisoner had been sentenced to death; thereafter upon proper legal proceedings under chapter 2, article 3, part 3 of the Penal Code, a jury found he was insane and the superior court on December 24, 1946, ordered that he be confined in a state hospital "until his reason be restored"; the superintendent of such hospital on January 18, 1947, certified to the governor that he was sane; the governor made his warrant of execution; and the *853 warden holds the prisoner pursuant to such sentence and warrant.
 The controlling facts shown by the petition and return are that the prisoner was duly adjudged insane and committed by judgment of the superior court to be confined in a state hospital "until his reason be restored"; that his reason has not in fact been restored (that he "was, and still is, insane") but that, notwithstanding the judgment and his continuing insanity he has been released from the state hospital and the custody of its superintendent and transferred to the state prison and custody of the warden and will be executed while insane unless this court intervenes. It is most important to note that the vital allegation that the prisoner "was, and still is, insane," is not challenged in the return and must be deemed admitted. The majority opinion necessarily holds that this fact, or at least the allegation of it, is wholly immaterial because the superintendent of the hospital has presumptively determined and has certified that the prisoner has recovered his reason; such determination and certification, the majority hold, are conclusive on the prisoner and on this court; hence habeas corpus will be denied. Obviously, the determination of the majority does not rest upon any inquiry or determination by the court as to the fact of sanity or insanity of the prisoner; it rests squarely on the holding that the administrative agent has sole and uncontrolled authority to determine and certify the fact of sanity or insanity and that such fact, when so certified, cannot be disputed by the prisoner or inquired into by the court. This, clearly, is abrogation of the rights and powers of habeas corpus in such a case.
 Contrary to the implications of the majority opinion (the order reads, "The writ is discharged, and William Phyle is remanded to custody" [italics added]), the petition does not seek release of the prisoner; as appears on its face and as is hereinafter shown in detail, it seeks only to have him transferred in custody from an unlawful to a lawful custodian; i.e., from the custody of the warden of the prison to the custody of the superintendent of the state hospital. As is also more particularly shown hereinafter, upon the unchallenged facts alleged, the superintendent of the hospital is the sole lawful custodian of the prisoner. *854
 The relief sought may be granted on petition for habeas corpus. Section 1493 of the Penal Code provides that "In cases where any party is held under illegal restraint or custody, or any other person is entitled to the restraint or custody of such party, the judge or court may order such party to be committed to the restraint or custody of such person as is by law entitled thereto." (Italics added.) Section 1487 of the same code provides that "If it appears on the return of the writ that the prisoner is in custody by virtue of process from any court of this state, or judge or officer thereof, such prisoner may be discharged or remanded to proper custody as provided by section 1486] ... 5. When the person having the custody of the prisoner is not the person allowed by law to detain him." As previously set forth, the petition alleges facts which indubitably entitle the prisoner to the relief sought if the facts be true. Such facts are that the prisoner has been convicted of crime and sentenced to death; that after such conviction he was duly adjudged insane and committed to the state hospital "to be there confined until his reason be restored"; that he "was, and still is, insane"; that notwithstanding the actual continuance of his insanity the superintendent of the hospital has certified that he is sane and he has been transferred from the custody of the hospital superintendent to the custody of the prison warden and that he will be executed by the prison warden unless this court restrains such action.
 From what has been above related it appears that the basic issue here is, is the asserted determination of the medical superintendent that the prisoner is now sane conclusive on the court and on the prisoner in a habeas corpus proceeding wherein it is alleged that the prisoner is in fact insane? In other words, does certification of sanity by the state hospital superintendent preclude the prisoner from alleging and proving and the court from determining that, contrary to the certification, the prisoner is in truth insane? If the answer to these questions is yes, as the majority hold, then the right of habeas corpus is effectively abrogated as to persons in the status of the prisoner before us.
 The holding of the majority opinion that the medical superintendent has exclusive and transcendant powers to determine questions of sanity of prisoners is squarely contrary to earlier holdings of this court. In Gardner v. Jones (1899), 126 Cal. *855 614 [59 P. 126], we find a case which in material legal principles is identical to that now before us. Dr. A. M. Gardner was then (1899) superintendent of the Napa State Hospital. He applied to this court "for a writ to prohibit defendant [judge of the superior court of Contra Costa county, and the superior court of Napa County] from entertaining jurisdiction in a certain habeas corpus case" whereby the Napa County Superior Court was assuming to determine the question of the restoration to sanity of one Buchanan, who had been committed to the state hospital as insane. This court said (pages 615-616 of 126 Cal.), "The question is an important one, inasmuch as it involves the right of an inmate of a state hospital, who happens at the time to be resting under a criminal charge and is committed pending trial for his crime, to have his alleged insanity made the subject of judicial inquiry by the writ of habeas corpus. It is claimed [exactly as here] that 'the medical superintendent is the only person or tribunal vested by law with authority to determine whether or not an insane patient of this class has recovered.' ..."
 "The provisions of the Penal Code regulating the commitment of persons charged with crime are found in sections 1367 to 1373. No question arises as to the regularity of Buchanan's commitment under these provisions. Section 1372 provides as follows 'If the defendant is received into the asylum, he must be detained there until he becomes sane. When he becomes sane, the superintendent must give notice of that fact to the sheriff and district attorney of the county. The sheriff must thereupon, without delay, bring the defendant from the asylum and place him in proper custody until he is brought to trial or judgment, as the case may be, or is legally discharged.'"
 "Section 1473 of the Penal Code provides as follows: 'Every person unlawfully imprisoned or restrained of his liberty, under any pretense whatever, may prosecute a writ of habeas corpus to inquire into the cause of such imprisonment or restraint.'"
 "Section 5, article I, of the constitution reads: 'The privilege of the writ of habeas corpus shall not be suspended unless when, in cases of rebellion or invasion, the public safety may require its suspension.' *856"
 "We find in the statute no authority for making two classes of insane--one civil and the other criminal--and by any such classification to take the latter out of the operation of the statute as to the right of habeas corpus. Section 13, article III, of the insanity law makes no such distinction. But plaintiff contends that section 14 of article III in terms confers authority upon the medical superintendent to determine when the patient of the criminal class is restored to sanity, and, as the authority is not conferred upon any other person or tribunal, it is necessarily exclusive, and also proves that the law recognizes the two mentioned classes of insane. We cannot believe that the legislature intended to enact a law so entirely out of harmony with the spirit and letter of the constitution and the statute to which attention has been called. It is our duty to harmonize sections 13 and 14, article III, of the insanity law, so as to conform to the constitution and to the statutes quoted, if we can, rather than resort to the more extreme necessity of holding section 14 to be unconstitutional, as defendant claims it to be, if given the construction placed upon it by plaintiff. We think it was intended by section 14 to provide means by which a patient of Buchanan's class, whose reason has become restored, could be at once remanded to the sheriff of the proper county for trial; but it was not intended that the arbitrary power should rest with the medical superintendent to deprive the patient of the right to be so returned, nor was it intended that the medical superintendent should be the exclusive judge of the patient's restoration. [Italics added.] ..."
 "[P. 618.] The question of Buchanan's recovery, in our opinion, is jurisdictional and may be examined upon habeas corpus. ..."
 "[P. 619.] Section 1493 [Pen. Code] provides: 'In cases where any party is held under illegal restraint or custody, or any other person is entitled to the restraint or custody of such party, the judge or court may order such party to be committed to the restraint or custody of such person as is by law entitled thereto.' In his petition Buchanan does not ask to be restored to his freedom; he asks to be redelivered to the sheriff of Yuba county. ... We see no reason why the court or judge should not have the power by an order to direct that Buchanan be redelivered to the sheriff as prayed for. ..." *857
 In accord with the reasoning above quoted the application of the medical superintendent for the writ of prohibition was denied and thereafter in the habeas corpus proceeding the superior court proceeded to determine the issue as to the defendant's restoration to sanity. It determined that the defendant-petitioner was still insane and remanded him to the custody of Dr. Gardner. Thereupon application for habeas corpus was made to this court. Chief Justice Beatty, authoring the opinion of the court, again referred to Dr. Gardner's claim of exclusive jurisdiction, as asserted in his application for prohibition, and declared (In re Buchanan (1900), 129 Cal. 330, 332-333 [61 P. 1120, 50 A.L.R. 378]), "It was there [in Gardner v. Jones (1899), supra, 126 Cal. 614] contended that the insanity law of 1897 Stats. 1897, p. 311) has made the superintendent of the asylum the sole and final judge, in a case of this kind, whether the prisoner has become sane, and that the courts no longer have the power to conduct the inquiry by habeas corpus, or otherwise. It was held against this contention that the question of unlawful restraint of the liberty of a citizen is, and must be as long as our present constitution endures, a judicial question to be determined by the courts, and that the statute referred to would be unconstitutional if it required the construction contended for. [Italics added.] ... In consequence of this decision the superior judge proceeded with the hearing upon return to the writ of habeas corpus issued by him, and having concluded upon the evidence that Buchanan was still insane, made an order remanding him to the custody of Dr. Gardner. Thereupon the present proceeding was commenced in this court, and upon the same evidence submitted to the superior judge, and some additional testimony, we must now decide the question of fact whether Buchanan has become sane. [Italics added.]"
 "The question, however, is not whether he has become sane in every sense of the word, but whether he has become sane in the sense of the statute, which requires a suspension of the proceedings in a criminal cause whenever it is found that the defendant is presently insane. In other words, if there is a difference between the medical view of insanity and the view upon which the statute is founded, the question of sanity or insanity is to be determined with reference to *858 the latter as contra-distinguished from the former view. That there is such a difference is notorious. ..." In the light of that difference the writ was sustained and Buchanan was ordered "returned to the custody of the sheriff of Yuba county." (Here we have no way of knowing what standard of sanity or insanity the present superintendent of the state hospital applied in certifying that the prisoner is sane.)
 Several vices in the majority opinion become apparent from what has been quoted from Gardner v. Jones (1899), supra, 126 Cal. 614, and from In re Buchanan (1900), supra, 129 Cal. 330. In the first place, the majority opinion unconstitutionally denies the protection of habeas corpus, at least as exemplified by a court trial of the issue of fact (if there be one under the pleadings in view of the failure to deny that the prisoner is presently insane) to this petitioner. Our state Constitution (art. I,  5) declares that "The privilege of the writ of habeas corpus shall not be suspended unless when, in cases of rebellion or invasion, the public safety may require its suspension." Section 9(2) of article I of the United States Constitution makes the same provision. There is in this case no suggestion that there is extant any status of rebellion or invasion whereby to justify suspension of the writ in the public safety. But the majority opinion, in all practical effect, suspends it--even abrogates it altogether--in so far as concerns persons who have been convicted of crime, sentenced to death, and thereafter adjudged insane. If the prisoner's insanity in fact continues, as is specifically alleged and not denied, the law and the judgment of the superior court require that he be continued in the state hospital until his sanity is restored. As shown hereinabove, habeas corpus is a proper remedy. If we refuse him the relief sought, solely on the ground that the medical superintendent's certificate of restoration is conclusive of the fact of sanity, we are necessarily abrogating our power in the premises--our power to determine the fact of insanity. And, furthermore, we are abrogating the right of the prisoner to even challenge, on habeas corpus, one of the facts upon which the legality of his custody and impending execution depends. That is certainly an abrogation of the right of habeas corpus. No authority is cited for holding that a person in the status of this prisoner may be deprived of the rights of habeas corpus. *859
 It is important also to note that section 1367 of the Penal Code provides that "A person cannot be tried, adjudged to punishment, or punished for a public offense, while he is insane." If this section means anything at all it should mean that it establishes a right which a convicted person, sane or insane, or one who speaks for him, may enforce in the courts. If the courts cannot enforce it, it is a poor right. If the right of habeas corpus is to be denied to such a person it should be by clear constitutional provision, not by court legislation.
 It should be observed also that the State may eventually find that the majority holding here is unfortunate. If the statutes in question, as held by the majority, vest absolute, conclusive, and exclusive power in the superintendent of the state hospital "for the determination of the question of the sanity of a person who has been sentenced to death," and if it be true, as is also held by the majority, that "a court has no inherent power to determine that question," then, of course, the determination of the superintendent is equally final regardless of whether he determine that the prisoner is sane or insane. In some future case such a superintendent may rule that a prisoner remains insane although other state officers have reason to believe that such prisoner has recovered his sanity. Under the majority holding, the fact of recovered sanity would be wholly immaterial; an allegation to that effect, although not denied, would be totally disregarded. Neither the prisoner himself nor the prosecuting officers of the state would be heard to contend that in truth the prisoner had recovered his reason. Only the certificate of the superintendent, based on any standard of sanity (medical or legal) which he might elect to use, could determine that fact; his discretion in any event would be wholly uncontrolled and if he refused to give the certificate the courts of this state would be powerless to intervene.
 The majority opinion devotes much space to a discussion of the duties and powers of the hospital superintendent and to those of the prison warden and suggests that the warden, if so disposed, can again initiate proceedings for another jury trial on the issue of the prisoner's present sanity status. But such speculation is scarcely germane to the issue before us. The duties of the warden are one thing; our duties on habeas *860 corpus are quite another. The petition alleges that "unless this Court restrains Clinton T. Duffy [the prison warden] from carrying out the warrant of the Governor, that said ... [prisoner] will be executed on Friday, the 2nd day of May, 1947." The fact that the writ prayed for originally issued and that in consequence the date of execution has been postponed until this cause is finally decided, does not mean that the jeopardy of the prisoner is lessened. The allegation, coupled with the other averments above quoted, still unmistakably means that the prisoner, although presently insane, will be executed under the warrant which has been issued unless we rule otherwise. Whether that allegation be true, the majority hold, we will not inquire because we have no power in any event to prevent the execution. I cannot subscribe to such a doctrine.
 Failure to espouse such doctrine does not mean that any statute in question is made meaningless. The provisions of Penal Code section 3704 that "When the defendant recovers his reason the superintendent of such [state] hospital must certify that fact to the Governor" and that the defendant may then be returned to prison and executed, like the provisions of section 1372, hereinabove cited and discussed in the quotation from the Gardner case, may be given effect and applied in all proper cases. Under the language of that section ( 3704) it may well be that a superintendent of a state hospital has implied authority to make a prima facie determination that a prisoner has recovered (or not recovered) his sanity and to certify him back to the warden of the state prison for execution. But this does not mean that the prisoner must be denied habeas corpus, or an examination and determination by the court upon habeas corpus, of the fact, if it be alleged, that the prisoner is in fact insane (or sane) although the superintendent may have determined and certified that he is sane (or insane).
 The history of habeas corpus, the great care with which the rights of all persons to invoke that remedy have been guarded by provisions of our national and state constitutions and the jealous solicitude with which the courts have heretofore protected those rights, all combine to forbid the holding which the prosecuting officers of this State now espouse and which the majority make. *861
 The State, if it requests such relief, should be given opportunity to challenge the now admitted averment that the prisoner "still is" insane; that issue should then be tried out before a referee; and our order should depend on our determination of the fact, not on subservience to an asserted "conclusive" determination of an administrative agent. Thus may the right of habeas corpus be preserved, the court maintain its jurisdiction, and justice still run its full course.
 Carter, J., concurred.
NOTES
[fn. *]  *. In 1905 the provisions of 3704 were contained in section 1224, which was repealed and reenacted in 1941 as section 3704 with the addition of the last phrase that "the warden shall thereupon return the defendant to the state prison pending the execution of the judgment." Section 10000 adopted at the same time provides that, "The provisions of Part 3 of this code [which includes sections 3700 to 3704], in so far as they are substantially the same as existing provisions relating to the same subject matter, shall be construed as restatements and continuations thereof and not as new enactments." The addition of the last phrase to section 3704 is clearly not material to this case or to the interpretation of that section with respect to the duties of the superintendent.
