
16 Cal.App.2d 709 (1936)
In the Matter of the Petition of MICHAEL CONNOLLY for a Writ of Habeas Corpus.
Crim. No. 1920. 
California Court of Appeals. First Appellate District, Division Two.  
October 6, 1936.
 Wilbur S. Pierce and Marvin Sherwin for Petitioner.
 Earl Warren, District Attorney, R. H. Chamberlain, Assistant District Attorney, and Cecil Mosbacher, Deputy District Attorney, for Respondent. *710
 Leo R. Friedman, as Amicus Curiae on Behalf of Respondent.
 Nourse, P. J.
 The petitioner seeks his release from custody under an indictment charging the receiving of bribes, extortion and a violation of section 653f of the Penal Code. The respondent has demurred to the petition and has also filed a return thereto. The petitioner has traversed the return in the nature of both demurrer and answer. Stipulations were made at the oral argument covering minor differences in the various statements of facts and the cause was submitted upon all these pleadings as thus agreed to. Hence, when we refer to any allegation in the pleadings it is to be understood that the matter was either admitted by demurrer or by express stipulation.
 The indictment rests upon the activities of the petitioner while acting as an employee of the state board of equalization in the enforcement of the liquor control statutes. The first two counts charged the petitioner with asking for and receiving from one Jack Biale two separate payments of money upon promises that he would not commence proceedings against Biale on account of violations of the Liquor Control Act. The third and fourth counts charged extortion arising out of the same transactions. The fifth count charged the petitioner with soliciting Jack Biale to commit the crime of bribery as denounced by section 653f of the Penal Code.
 The basis of the petition is that all the matters relating to the transactions with Biale and upon which each count of the indictment is founded were fully covered in the testimony of the petitioner when called as a witness before a legislative investigation committee duly appointed by the state assembly at its last legislative session. Because of this the petitioner relies upon the immunity granted by section 304 of the Political Code, which reads:
 "Witnesses not to be held to answer criminally. Refusal to testify. No person sworn and examined before either house of the legislature, or any committee thereof, can be held to answer criminally or be subject to any penalty or forfeiture for any fact or act touching which he is required to testify; nor is any statement made or paper produced *711 by any such witness competent evidence in any criminal proceeding against such witness; nor can such witness refuse to testify to any fact or to produce any paper touching which he is examined, for the reason that his testimony or the production of such paper may tend to disgrace him or render him infamous. Nothing in this section exempts any witness from prosecution and punishment for perjury committed by him on such examination."
 The respondent does not controvert the assertion that each count of the indictment relates to a fact or act "touching which" the petitioner testified before the legislative committee. It is his contention that this testimony was given voluntarily and that the petitioner was not therefore "required to testify". The evidence relating to this feature is not satisfactory in all respects, but a fair statement of the circumstances is that the petitioner was requested to appear as a witness, that he apparently welcomed the opportunity, and that he volunteered some testimony which was not in answer to any specific question directed from the committee.
 [1] Upon this state of the record but two questions arise which require consideration: (1) Can the petitioner rely on section 304 in a proceeding in habeas corpus or must he await the day of trial and tender it as a defense? (2) Does the expression "touching which he is required to testify" limit the immunity to those facts or acts only regarding which the witness was compelled to testify, or does it cover all facts and acts regarding which he gave testimony after having been duly sworn as a witness?
 The first question would seem to find a complete answer in the express provisions of our statutes. Section 1487 of the Penal Code permits a discharge on habeas corpus "When the process, though proper in form, has been issued in a case not allowed by law." Section 1484 of the same code provides that the petitioner may allege any fact to show that his detention is unlawful "or that he is entitled to his discharge". The same section provides that the court "must thereupon proceed in a summary way to hear such proof as may be produced against such imprisonment ... and to do and perform all other acts and things necessary to a full and fair hearing and determination of the case". Since section 304 of the Political Code declares that one *712 sworn and examined before a legislative committee cannot "be held to answer criminally" for any fact or act touching which he was required to testify, it cannot be said that one who is indicted and compelled to stand trial before a jury has not been "held to answer criminally" within the meaning of section 304, and there is less room for argument that the process so issued is not issued "in a case not allowed by law" within the meaning of section 1487.
 The respondent rests upon the early case of Rebstock v. Superior Court, 146 Cal. 308 [80 P. 65], and cases from outside jurisdictions. The Rebstock case involved an interpretation of section 64 of the Penal Code which relieved from prosecution a witness who had testified in a proceeding concerning offenses of the election laws. The Supreme Court there held that the immunity from prosecution granted by that section was a matter of defense and did not limit the jurisdiction of the superior court to proceed with the trial under the indictment. This case was followed by Ex parte Blake, 155 Cal. 586 [102 P. 269, 18 Ann. Cas. 815], where the court held that the statute of limitations is a mere matter of defense and not ground for discharge on habeas corpus. The decision was based wholly upon the rule that habeas corpus will not lie for the correction of mere errors which may be reached by motion or on appeal.
 This ancient rule relating to the office of habeas corpus has been followed in many cases which are cited in respondent's briefs. It would serve no purpose to refer to them specially; it is sufficient to say that they adopt the rule upon the doctrine that the function of the writ of habeas corpus is to enquire into the jurisdiction of the court from which the process is issued and that such question must be determined upon the face of the proceedings alone. There is, however, a distinct line of cases which recognize an exception to the general rule where the question of the statute of limitations is involved. In Ex parte Vice, 5 Cal.App. 153 [89 P. 983], the prisoner was held to answer upon a complaint charging that, while acting as a clerk of a corporation in April, 1903, there came into his possession certain funds which he embezzled in October, 1906. The complaint was filed October 25, 1906. Upon the hearing of the writ the appellate court found that the prisoner had been discharged from the company's employ *713 on May 1, 1903, that the alleged embezzlement occurred in April of that year, and that the three-year statute of limitations barred the prosecution. For this reason he was discharged from custody. In In re Berman, 104 Cal.App. 259 [286 P. 1043], the plea of once in jeopardy had been interposed and this was followed by a motion to dismiss the indictment. The appellate court heard the whole matter on the return to the writ of habeas corpus and found that the plea was good. It thereupon ordered the discharge of the prisoner. In People v. McGee, 1 Cal.2d 611 [36 PaCal.2d 378], the defendant was convicted upon an information filed November 3, 1930, alleging the commission of an offense on March 30, 1926. On March 18, 1933, he moved to set aside the judgment on the ground that the prosecution was barred by the statute of limitations. The motion was denied and on appeal, though the defendant had pleaded guilty to the information, the Supreme Court reversed the order and upon the question whether the statute was jurisdictional or a mere matter of defense said:
 "Whether the statute of limitations in criminal cases is jurisdictional, or a matter of defense to be affirmatively pleaded by the defendant, is a question upon which there exists some diversity of opinion. In California the law is in a most confused state. This court, in Ex parte Blake, 155 Cal. 586 [102 P. 269, 18 Ann. Cas. 815], declared that the statute was a mere matter of defense, and not ground for discharge on habeas corpus. The District Court of Appeal, in Ex parte Vice, 5 Cal.App. 153 [89 P. 983], came to the opposite conclusion; and in People v. Hoffman, 132 Cal.App. 60 [22 PaCal.2d 229], the court held that a motion to set aside a judgment would lie where the information showed on its face that the statute had run. A hearing in the Hoffman case was denied by this court. The early case of People v. Miller, 12 Cal. 291, also lends support to this conclusion."
 "It is necessary that his confusion be eliminated, and that the rule which shall govern prosecutions in this state be declared. In our view, the more desirable rule is that the statute is jurisdictional, and that an indictment or information which shows on its face that the prosecution is barred by limitations fails to state a public offense. The *714 point may therefore be raised at any time, before or after judgment."
 It is the contention of the petitioner that the McGee case overruled both Rebstock v. Superior Court and Ex parte Blake, and we take the same view. The Blake case was expressly overruled and, since it followed and rested upon the Rebstock case, it is a fair assumption that the court intended to overrule both. The language of the McGee case is clear. It states that the statute is jurisdictional and not a mere matter of defense; that the state has declared that it will not prosecute crimes after the period has run, "and hence has limited the power of the courts to proceed in the matter."
 There is not such a difference in principle between a statute which limits the period of prosecution for certain offenses and one which declares that at no time can one "be held to answer criminally" for any act touching which he testified before a legislative committee so that the first should be declared jurisdictional and the other a mere matter of defense. In view of the positive rule of the McGee case there is no reason left in the Rebstock case, which was a plain repudiation of the language of section 64 of the Penal Code declaring that "no prosecution can afterwards be had against such witness". To hold that one may nevertheless be indicted, imprisoned or compelled to furnish bail, and put to the expense of employing counsel and furnishing evidence to the jury, has not been "prosecuted" or "held to answer criminally" is subversive of the plain intent of the statute.
 But the respondent argues that the rule cannot be applied unless the fact of immunity appears on the face of the indictment. The argument is based upon the all-too-broad statement that the function of habeas corpus is limited to the question of jurisdiction as it appears on the face of the proceedings. The accepted rule in this state (and the only one applicable under the code sections above cited) is clearly stated in In re Lake, 65 Cal.App. 420, 423 [224 P. 126], where the court says:
 "The scope of the inquiry which the court can make upon either habeas corpus or certiorari is precisely the same. (Ex parte Drew, 188 Cal. 717 [207 P. 249, .250]; Commercial Bank, etc., v. Superior Court, 192 Cal. 395 [220 *715 P. 422, 423].) While neither writ is one of error, both extend to the entire record of the court below and to the evidence itself when necessary to determine jurisdiction. (Hotaling v. Superior Court, 191 Cal. 501 [217 P. 73, 75, 29 A.L.R. 127].) This inquiry, of course, cannot go beyond the question of jurisdiction and the review of the evidence is limited to the sole purpose of determining, first, whether jurisdiction existed; and, second, whether jurisdiction was exceeded. Thus, where the question is whether jurisdictional facts were or were not proved, the review extends not only to the entire record but to the evidence itself. (Stumpf v. Board of Supervisors, 131 Cal. 364, 367 [63 P. 663, 82 Am.St.Rep. 350]; McClatchy v. Superior Court, 119 Cal. 413, 419 [51 P. 696, 39 L.R.A. 691]; Estate of Paulsen, 179 Cal. 528, 529, 530 [178 P. 143]; Great Western Power Co. v. Pillsbury, 170 Cal. 180, 185 [149 P. 35]; Van Hoosear v. Railroad Com., 189 Cal. 228 [207 P. 903, 907]; Hotaling v. Superior Court, 191 Cal. 501 [217 P. 73, 75, 29 A.L.R. 127].)"
 To the same effect are In re Chaus, 92 Cal. App. 384, 388 [268 P. 422], and King v. Superior Court, 12 Cal.App.2d 501 [56 PaCal.2d 268], both resting on the clear statement of the rule found in Hotaling v. Superior Court 191 Cal. 501, 506 [217 P. 73, 29 A.L.R. 127], where the court, in defining the scope of certiorari, said: "While the writ of certiorari is not a writ of error, it nevertheless extends to the whole of the record of the court below and even to the evidence itself where necessary to determine jurisdiction. (Schwarz v. Superior Court, (111 Cal. 106 [43 P. 580]), supra; McClatchy v. Superior Court, supra; Great Western Power Co. v. Pillsbury, 170 Cal. 180 [149 P. 35].)"
 The whole theory of these cases is that, since both habeas corpus and certiorari are confined to the question of jurisdiction alone, the court may consider evidence which discloses a lack of jurisdiction. Hence, if the immunity from prosecution shows lack of jurisdiction and that fact does not appear on the face of the indictment, evidence to prove that fact may be heard, otherwise there is no meaning in that portion of section 1484 of the Penal Code which provides that the court "must thereupon proceed in a summary way to hear such proof" that the imprisonment is *716 unlawful or that the process "has been issued in a case not allowed by law" (sec. 1487, Pen. Code).
 The contrary view, for which the respondent contends, is found in that portion of the opinion in the Rebstock case which held that the immunity granted by section 64 of the Penal Code was a matter of defense to be pleaded under section 1020 of that code and which there says: "under his plea of not guilty defendant may therefore show the facts here alleged, just as he could show a defense under the statute of limitations, and if improperly denied his rights in this regard may have the error corrected on appeal". (Italics ours.) As has been clearly pointed out in People v. McGee, supra, the statute of limitations is not a matter of defense but one of jurisdiction. The rule of the Rebstock case was manifestly based upon the wrong theory and must be deemed to have been rejected by the later decision.
 [2] The second question rests upon the facts pleaded concerning which there is no real dispute. The respondent first argues that petitioner was not served with a subpoena, that he appeared before the committee voluntarily. The petitioner alleged that on June 12, 1936, he was served with a subpoena to appear and testify before the committee. The respondent denies that petitioner was served with a subpoena. From the transcript of the testimony before the committee it appears that petitioner "having been first duly sworn as a witness, was examined and testified as follows". The transcript closes with the statement of Assemblyman Chatters, "You are excused, Mr. Connolly ... You are still under subpoena, and we will ask you to check in with the committee upon your return" (i. e., from Oakland). But we do not consider the matter of a subpoena as controlling. The statute reads: "No person sworn and examined." Anyone sworn as a witness undertakes to testify and it makes no difference how he is brought before the examining body. If he is sworn he is required to testify truthfully and may be compelled to do so under ordinary circumstances notwithstanding the manner of his appearance.
 It is then argued that, after he had testified upon direct examination by members of the committee, he was asked if there was anything further he would like to state and that *717 the material testimony upon which the indictment rests was then given voluntarily. The transcript supports this statement of the circumstances. When the question was put to him the witness replied that he would like to give the committee the facts of what happened in Oakland and added: "I believe that's giving me a chance to explain for myself something I have to explain to the grand jury when I appear before them in Oakland tomorrow."
 Bearing in mind that the code section grants immunity from prosecution "for any fact or act touching which he is required to testify", it is incumbent upon the petitioner to show that evidence relating to the matters covered by the indictment was obtained by some form of compulsion and that it was not given by him voluntarily. Though the code section has not been interpreted in this state, similar statutes in other jurisdictions support the conclusion that "compulsion is a condition precedent to immunity". (Scribner v. State, 9 Okl. Cr. 465 [132 P. 933, Ann. Cas. 1915B, 381]; Burt v. State, 20 Ala. App. 296 [101 So. 768]; United States v. Skinner, 218 Fed. 870.) The prevailing rule and the reason for it is well expressed in the case last cited where the court, at page 878, said: "The witness is clothed with an option to testify without asserting his privilege, in which event his testimony is voluntary, and entitles him to no immunity, or to testify only after the assertion of his privilege, and after its denial to him, in which event the evidence given by him is compulsory and entitles him to immunity. The government is entitled to know which option the witness selects. The government is also entitled to be informed, before the examination of the witness, that the witness claims the answer he is asked to give will tend to incriminate him, and in what way. The government is itself clothed with an option which cannot be intelligently exercised until there has been an assertion of privilege by the witness. It is entitled to know whether immunity will follow from the examination of the witness. It has the option to receive the testimony and thereby grant immunity, or to reject the testimony and deny the immunity. The question of privilege cannot be determined until the witness has been summoned and sworn before the examining tribunal. Then for the first time the government must make its election. In order to intelligently make the election, it *718 must be apprised first as to whether the witness gives his testimony voluntarily for the purpose of exoneration, or involuntarily, because he would be compelled to testify if he refused. Only in the latter case would immunity flow from his evidence. If the witness fails to assert his privilege, the government would have the right to assume that immunity was not desired by him, and that permitting him to testify would not be attended with that result."
 The same principle is found in the opinion of the three dissenting justices in People v. Fryer, 175 Cal. 785, 796 [167 P. 382], where it is said: "That no witness who, without objection in any manner or form whatsoever, takes the stand and gives testimony whereby he incriminates himself can claim immunity under the statute; that, if he would claim immunity from prosecution, he must first object or in some manner show that he is not a voluntary witness, and that until he does this, the provision presuming him to have asked to be excused does not apply."
 For the purpose of this proceeding we do not hold that it is necessary for the witness in all cases to claim the immunity granted under the section. But we do hold that, before he can successfully assert the claim of immunity in a proceeding of this kind, it is incumbent upon him to show that his testimony before the committee was not voluntary but was given under some form of compulsion. It has often been said that the object of these immunity clauses is to assist the state in procuring credible evidence to aid in the enforcement of the law, and that it is not their object to prevent a witness from voluntarily incriminating himself or to enable a clever criminal, by voluntarily and surreptitiously including criminal with noncriminal facts, to secure wholesale immunity.
 The writ is discharged and the petitioner remanded.
 Sturtevant, J., and Spence, J., concurred.
