
11 Cal.2d 751 (1938)
In the Matter of the Application of MYRA CRITCHLOW for a Writ of Habeas Corpus.
Crim. No. 4164. 
Supreme Court of California. In Bank.  
August 9, 1938.
 Freitas, Duffy & Keating for Petitioner.
 A. E. Bagshaw, District Attorney, for Respondent.
 SHENK, J.
 This proceeding in habeas corpus presents the question of the scope of immunity from prosecution afforded by section 334 of the Penal Code enacted in 1872.
 The petitioner, Myra Critchlow, was adjudged guilty of contempt of court by the Superior Court in Marin County for refusing to answer certain questions propounded to her before the grand jury of that county. *754
 In August, 1937, Tony Quadros, chief of police of the town of Sausalito, reported to the district attorney of Marin County that the petitioner, then employed by the Sausalito News, a newspaper published by Frank B. Anderson, had handed him an unaddressed and sealed plain white envelope in which he found $25 in currency. He also reported that the petitioner told him that the money came from the Golden Hill (or Golden Rule) Business Men's Club, Inc., in Sausalito, whose membership was Chinese, and that he would receive a like sum on the 15th of every month. As the result of investigations then made by the grand jury the petitioner was indicted on two bribery counts on both of which she was acquitted by a jury in December, 1937. In the meantime the Chinese club was raided, arrests were made on charges of gambling, and the place was closed. Trials on those charges were had and the defendants convicted. They paid fines on October 21, 1937.
 On February 24, 1938, the petitioner was subpoenaed to appear before the grand jury. She was informed by the foreman that the grand jury was conducting an investigation into gaming law violations in connection with the Chinese Golden Hill Club, and she was asked certain questions. Upon her refusal to answer on the ground that the answers might tend to incriminate her, the foreman read to her section 334 of the Penal Code, which is as follows: "No person, otherwise competent as a witness, is disqualified from testifying as such concerning the offense of gaming, on the ground that such testimony might criminate himself; but no prosecution can afterwards be had against him for any offense concerning which he testified." The petitioner persisted in her refusal to answer certain of the questions put to her, placing her refusal on the ground that they related to an investigation of bribery charges, as to which she contended the section read afforded her no immunity. The questions asked of the petitioner and which she refused to answer were the following:
 "Did Mr. Andy Anderson ever discuss with you the operation of the Golden Hill Business Men's Club ...?"
 "Did Mr. Anderson ever in 1937 give you any money contained in a plain white envelope with instructions to give that to Mr. Tony Quadros, Chief of Police of the City of *755 Sausalito, and to tell him that was coming from the persons operating the Chinese Social Club ...?"
 "Did you when you gave Mr. Quadros that envelope (referring to one admittedly given on August 7, 1937) or shortly thereafter or at any time thereafter tell Mr. Quadros that Mr. Anderson had given you that money for him and that it was coming from the Chinese Social Club ...?"
 "Did you on October 20, 1937, tell Chief of Police Quadros of Sausalito that Andy Anderson wanted him to have this $25.00 you had previously given him and it was from the Chinese Social Club ... and Andy said it was alright for him to take the money?"
 "Did you in that same conversation with Tony Quadros, Chief of Police of Sausalito, on October 20, 1937, approximately in front of the Sausalito News ... tell Mr. Quadros you had money in the safe for all of the boys and you did not know what to do with it?"
 The petitioner attempts to justify her refusal to answer by contending that section 334 of the Penal Code does not offer immunity from prosecution for the offense of bribery to which the questions very plainly relate. It is her claim that the supposed investigation into gaming violations, and the offer of immunity under section 334, was merely a pretense for the purpose of eliciting information from her in connection with the grand jury's investigation into alleged bribery activities; and that the section does not purport to grant immunity from prosecution for any bribery offense disclosed by any self-incriminating testimony which the petitioner, except for the invocation of the constitutional privilege, would be compelled to give.
 The constitutional section (art. I, sec. 13), provides that no person shall be compelled, in any criminal case, to be a witness against himself.
 The history of the origin of the privilege and its adoption in this country as an inviolable right by constitutional enactment has often been stated. (Counselman v. Hitchcock, 142 U.S. 547 [12 S.Ct. 195, 35 L.Ed. 1110]; Brown v. Walker, 161 U.S. 591 [16 S.Ct. 644, 40 L.Ed. 819]; Ex parte Cohen, 104 Cal. 524 [38 P. 364, 43 Am.St.Rep. 127, 26 L.R.A. 423]; Duckworth v. District Court, 220 Iowa, 1350 [264 N.W. 715]; In re Doyle, 257 N.Y. 244 [177 N.E. 489, 87 A.L.R. 418, and note at page 435].) *756
 [1] It has never been questioned that, where legislation grants immunity to witnesses in return for testimony, such testimony ceases to be self-incriminating. But in order that the immunity from prosecution be a substitute for the constitutional privilege it must, in addition to eradicating the self-incriminating character of the testimony to be adduced, also exonerate the witness from prosecution for the offense thereby disclosed. The leading case to that effect, followed by the weight of authority in this country, holds that the immunity offered must be coextensive with and a full substitution for the constitutional prohibition. (Counselman v. Hitchcock, supra, followed in In re Doyle, supra, Ex parte Cohen, supra, and numerous other cases.) As said in In re Doyle, supra, "To force disclosure from unwilling lips, the immunity must be so broad that the risk of prosecution is ended altogether."
 [2] It is not questioned that the application of the constitutional provision and the immunity statute is not limited to an investigation in the witness' own case. The immunity may also be asserted in any case by a witness compelled in law to appear and answer before any investigating body. The immunity proceeds from the statutory provision and is not an implied or inherent incident of the power to investigate. (In re Doyle, supra; Ex parte Clarke, 103 Cal. 352 [37 P. 230]; Ex parte Cohen, supra; In re Tahbel, 46 Cal.App. 755, 758, 759 [189 P. 804].)
 [3] In accordance with the foregoing authorities it is apparent that section 334 of the Penal Code grants full protection from self-accusation by reason of testimony which the petitioner might give concerning the offense of gaming. There has been no general immunity statute in this state since the repeal of section 1324 of the Penal Code by Statutes of 1917, page 291. And there is no statute in this state affording immunity in a bribery investigation. The district attorney concedes that two investigations of the activities of the Chinese club were pending before the grand jury: one an investigation of the violation of the gaming laws, and the other of the bribery activities in connection with the operation of that club. He seeks to uphold the action of the court in committing the petitioner for contempt on the theory that the investigations were related and that an investigation *757 into the bribery activities is an investigation of offenses concerning gaming.
 The authorities appear to uphold the view that a witness would be protected by the immunity statute, section 334, in giving self-incriminating testimony relating to bribery in an investigation concerning violation of the gaming law, provided the testimony was elicited for the purpose of disclosing the gaming operations, and it was relevant for that purpose. The immunity statute is very broad, providing as it does for protection from prosecution on account of "any offense concerning which" the witness testified. [4] This is not necessarily to be restricted to any "gaming" offense. Had such restriction been expressly made, it is questionable that the statute would have met the test as a complete offer of immunity laid down by the authorities hereinabove cited; and obviously it is not to be read into the statute when the effect might be to lay open to prosecution a witness who had given testimony relevant and material in an investigation, but which disclosed another offense of a class different from that to which the investigation pertained. The statute involved herein was clearly designed to meet the requirements stated in the authorities. Such a construction of the provisions thereof, contrary to the fears of the petitioner, would not leave them open as a sanctuary for criminals within which they could voluntarily confess any crime with impunity, however unrelated to the general matter embodied in the immunity statute. It must therefore be concluded that the legislature intended that meaning which would effect the manifest object of the statute. (Ex parte Cohen, supra.) The Cohen case does not involve the exact situation before us, but the language of the court in that case indicates the correct premises for the foregoing conclusion. The court said at page 531: "The immunity thus given includes not only the offense with which the defendant then under examination is charged ... but also any other offense with which the witness may be charged, and to which such testimony may have reference or which it may tend to establish. 'The offense with reference to which his testimony was given' is broader in its terms and has a wider scope than 'the offense with which the defendant is charged', and the exemption from prosecution or punishment consequent upon his giving *758 testimony in reference thereto, when considered in view of the personal privilege given by the Constitution, must receive a liberal construction in its favor. The statute purports to compel him to testify 'in the same manner as any other person', and as the equivalent for his constitutional protection gives him a legislative protection of equal scope and effect by exempting him from all liability to punishment for the offense with reference to which he testifies. The exemption is as broad as the compulsion, and the protection is equal to that given by the Constitution. The testimony which he may be compelled to give is the same as that which could be required of any other witness, and includes any matter within his knowledge which is relevant to the offense under investigation and material to its determination. If, in giving such testimony, the testimony has reference to another offense committed by himself, he is within the protection of the statute, and upon any prosecution for such offense is authorized to plead or prove in bar thereof that under the compulsion of this section he gave testimony with reference to such offense."
 Likewise in the statute here under consideration the language "any offense concerning which he testified", must be deemed to include any offense concerning which he may be compelled to give testimony material to the determination of the investigation at hand. (United States v. Weinberg, 65 Fed.2d 394.) This view also has support in the language used in In re Williams, 127 Cal.App. 424, at 431 [16 PaCal.2d 172], even though in that case the question was left open whether testimony concerning certain offenses of bribery in connection with the gaming statute would result in immunity. The court said: "What the statute means is that a witness called to testify to facts concerning or relating to the offense of gaming can safely testify for the reason that he is forever free from the possibility of punishment for any crime in the proof of which such testimony would be material. Such a construction is literally what the statute says, and it preserves the whole meaning and intention thereof. Such construction brings the statute within the rule that it must be coextensive with the Constitution."
 [5] Certainly a statute giving immunity in one class of offenses cannot apply or be used to give immunity in an investigation concerning another and different class. (Foot *759 v. Buchanan, 113 Fed. 156; Ex parte Werner, 46 R. I. 1 [124 Atl. 195].) But we cannot accede to the view that the questions asked of the witness here were not so related to an appropriate investigation of gaming violations as to leave the witness unprotected in any answer which she might have given. [6] A witness may not invoke the privilege for the purpose of shielding some third person from prosecution. The compromise afforded by the ancient custom of granting amnesty or immunity is for the purpose of eliciting evidence against other offenders--here offenders against the gaming law. However, the questions asked should have some relation to the investigation in the course of which the immunity is allowed. (People v. Newmark, 312 Ill. 625 [144 N.E. 338]; People v. Boyle, 312 Ill. 586 [144 N.E. 342].) When they do have some relation or connection with the matter under investigation the witness is compelled to testify because the immunity statute affords the protection guaranteed by the Constitution. In this respect the Newmark and Boyle cases, supra, overruled any intimation in People v. Argo, 237 Ill. 173 [86 N.E. 679], and People v. Goldberg, 287 Ill. 238 [122 N.E. 530], that the fact that gambling and bribery may be related afforded no justification for compelling the witness to answer questions as to the offense of gambling to which the immunity statute was not directed. If the question, the answer to which might reveal an offense of a different class, indicates that it is related to the investigation to which the immunity statute is applicable, then the answer is under the protection of the statute. (People v. Rockola, 346 Ill. 27 [178 N.E. 384].) In that case it was said: "While the people may not ask questions of a witness calling for self-incriminating answers which do not show some relation to the bribery charge being tried or investigated, if such questions are so related the order granting him immunity is a complete protection to the witness, and he is not excused from answering the question because his answer may furnish a link in the chain of evidence against him for some other or different offense. The order of immunity protects him. (People v. Boyle, supra.) ... Nor does the fact that the questions asked may relate to another offense not being tried or investigated furnish an excuse for refusal to answer if it can be seen that such questions also relate to the charge *760 of bribery on trial or under investigation. (People v. Boyle, supra.)"
 [7] It may not be said, therefore, that in a proper case testimony revealing the offense of bribery committed by the witness in connection with gambling activities then under investigation, would be unprotected by the immunity statute. If, however, answers to the questions here asked could no longer have any bearing in proving the case against the persons charged or to be charged with the offense of gaming, because, forsooth, all of the offenders involved had been tried and convicted, then we must say that the prosecuting authorities or the investigating body could not attempt to misuse the statute by engaging upon a fishing expedition to catch perpetrators of other and different penal offenses. The protection is afforded only when the testimony is given in investigations of offenses which are the subject of the statute, viz., gaming; and not when for any reason the investigation is of a different class of offense. (Maxie v. State, 133 Miss. 243 [97 So. 560].) [8] The district attorney contended before the court which committed the petitioner that the investigation concerning the gaming operations was still pending, and that all violators of the gaming laws involved in the Golden Hill Business Men's Club had not been apprehended. The court found that such investigation was still pending. It could also properly conclude that the questions were relevant to further necessary proof connecting with the gambling operations persons who had not yet been apprehended. It was therefore acting within its jurisdiction in directing the petitioner to answer the questions hereinabove quoted.
 [9] Furthermore, the court properly may have been of the opinion that the testimony sought from the petitioner had reference solely to the offenses of which she was acquitted in December, 1937. The questions themselves so indicate. The petitioner may not invoke the constitutional privilege when the answers she might give would reveal an offense of which she had been acquitted, for the reason necessarily that the testimony could no longer incriminate her, and she is not excused from answering. (Ex parte Cohen, 104 Cal. 524, 528 [38 P. 364, 43 Am.St.Rep. 127, 26 L.R.A. 423]; People v. Boyle, 312 Ill. 586 [144 N.E. 342, 346].) From the record here presented we must *761 conclude that the committing court could also have found that the witness had been acquitted of any participation in any bribery offenses which would be revealed by the answers to the questions propounded to her. She therefore could be required to answer those questions, and the court would then be acting within its jurisdiction in adjudging her in contempt for her refusal.
 [10] The foregoing examination of the record and evidence before the committing court is within the proper scope of the inquiry which this court may make in this proceeding. (Hotaling v. Superior Court, 191 Cal. 501 [217 P. 73, 29 A.L.R. 127]; In re Lake, 65 Cal.App. 420 [224 P. 126]; In re Connolly, 16 Cal.App.2d 709 [61 PaCal.2d 490].)
 The writ is discharged and the petitioner is remanded.
 Seawell, J., Curtis, J., Langdon, J., Houser, J., and Waste, C.J., concurred.
