
70 Cal.2d 8 (1968)
In re GENE ALLEN McKINNEY on Habeas Corpus.
Crim. No. 12698. 
Supreme Court of California. In Bank.  
Dec. 20, 1968.
 Allen, Perry & Davis, Harold L. Perry, Treuhaft, Walker & Burnstein and Robert E. Treuhaft for Petitioner.
 Thomas C. Lynch, Attorney General, Albert W. Harris, Jr., Assistant Attorney General, and Michael J. Phelan, Deputy Attorney General, for Respondent.
 PETERS, J.
 Gene Allen McKinney petitions for a writ of habeas corpus. The Superior Court of Alameda County found that by refusing to answer questions as a witness at a trial, McKinney was guilty of criminal contempt of court in violation of subdivision 6 of section 166 of the Penal Code which defines the crime as a misdemeanor.petitioner was sentenced to imprisonment in the county jail for six months less time previously served for violation of this section.
 The problem arises under the following circumstances:petitioner was called as a defense witness on August 21, 1968, in the trial of Huey Newton who was charged with the murder of Police Officer Frey and with an assault with a deadly weapon against Officer Heanes. In response to defense counsel's questions, petitioner stated his name, that he was a passenger in a vehicle with Huey Newton, near the scene of the crime, and that he could not remember how he was dressed on the occasion.
 Defense counsel then asked petitioner whether he had shot Officer Frey or Officer Heanes.petitioner refused to answer either question, invoking the privilege against self-incrimination. The prosecution on cross-examination asked when he first came in contact with Newton; petitioner refused to answer on grounds that his answer would tend to incriminate him. The trial court ordered him to answer; he refused on grounds of self-incrimination. The trial court again directed him to answer; he again refused on self- incrimination grounds. The question was reread; he was again ordered to answer, and he persisted in his refusal.
 The trial court then asked petitioner whether he understood that if found in contempt he could be jailed, and then stated: "The Court finds you in contempt and directs you go to jail immediately until such time as you consent to answer the question."
 The Newton trial ended and the jury was discharged on September 8, 1968. Petitioner remained in custody under the contempt order of August 21, 1968, until September 16, when he was brought before the superior court that had already punished him for the claimed offense. It found him "guilty of *10 a misdemeanor, to wit: criminal contempt of Court, a violation of Section 166, Subdivision 6, of the Penal Code ... of the following kind: The contumacious, wilful, and unlawful refusal of petitioner to answer a material question after being ordered by the Court to answer said question."
 Section 166 of the Penal Code provides: "Criminal Contempts. Every person guilty of any contempt of Court, of either of the following kinds, is guilty of a misdemeanor: ... 6. The contumacious and unlawful refusal of any person to be sworn as a witness; or, when so sworn, the like refusal to answer any material question; ..."
 The Code of Civil Procedure, section 1209, also defines such conduct as contemptuous: "9. Disobedience of a subpena duly served, or refusing to be sworn or answer as a witness; ..." Section 1218 of the Code of Civil Procedure provides that the punishment for contempt is a fine "not exceeding five hundred dollars" or imprisonment "not exceeding five days, or both; ..."
 The Attorney General concedes that the superior court had no jurisdiction under Penal Code section 166. He does not rely on Code of Civil Procedure, sections 1209 and 1218.  [fn. 1] Rather, the Attorney General argues that in cases of direct contempt  [fn. 2] the court has inherent power to impose an "adequate" sentence, and that the Legislature may not curtail that power.
 [1] It is well established, as the Attorney General points out, that a court has inherent power to punish contempts of court. (See In re Shortridge, 99 Cal. 526, 532 [34 P. 227, 37 Am.St.Rep. 78, 21 L.R.A. 755]; see, e.g., Hull v. Superior Court, 54 Cal.2d 139, 153 [5 Cal.Rptr. 1, 352 P.2d 161] [concurring opinion]; Bridges v. Superior Court, 14 Cal.2d 464, 480 [94 P.2d 983]; In re San Francisco Chronicle, 1 Cal.2d 630, 634 [36 P.2d 369]; Briggs v. Superior Court, 211 Cal. 619, 627 [297 P. 3]; In re Shuler, 210 Cal. 377, 397 [292 P. *11 481]; Blodgett v. Superior Court, 210 Cal. 1, 14 [290 P. 293, 72 A.L.R. 482]; Lamberson v. Superior Court, 151 Cal. 458, 461 [91 P. 100, 11 L.R.A. N.S. 619]; Vaughn v. Municipal Court, 252 Cal.App.2d 348, 358 [60 Cal.Rptr. 575]; In re Hallinan, 126 Cal.App. 121, 132-133 [14 P.2d 797].)
 It does not, however, follow that the Legislature may not place reasonable limitations on this inherent power. In Ex parte Rowe, supra, 7 Cal. 175, the petitioner, who had refused to answer questions as a witness in a legal proceeding, was jailed, and not released after the proceedings had been terminated. The court granted petitioner's writ. "We do not deny that each Court is the sole judge of its own contempts; ... But the exercise of this power is regulated by the statute. The cases in which a Court may punish for contempt, are pointed out, and the penalty fixed." (7 Cal. at p. 176.) "As long as the case was in existence, that long the party might be imprisoned, ..." (Id., at p. 177.)
 The language in Rowe, although characterized as dictum, was approved in In re Garner, 179 Cal. 409, 411-412 [177 P. 162], which after reviewing a series of cases containing similar language regarding statutory limitations on the contempt power, stated: "While it may be conceded that these quoted expressions were dicta, nevertheless such recognition of the validity and binding force of the statute, together with long acquiescence therein, furnish ... 'an almost irresistible reason for not overturning it.'"
 "No doubt exists as to the inherent power of a constitutional court, in the absence of statutory provision therefor, to impose punishment for a contempt. Its very existence depends upon the exercise of such power. Hence, it may be conceded that a statute without constitutional authority therefor, which takes from the courts all power to punish for contempt, or fixes a penalty wholly inadequate for the purpose, would not be countenanced by the courts. Nevertheless, and while in such cases conceding the existence of such power vested in the courts, we are not prepared to adopt respondent's theory that our constitutional courts possess inherent power to the full extent as did the courts of England, which in some cases we find imposed enormous fines and imprisonment for years. To do so would not only be inconsistent with the spirit and genius of our institutions, but likewise, would be tantamount to a denial of legislative power to regulate the practice and procedure by which our courts are governed, ..."
 Although Garner involved constructive contempt, the language and reasoning of the case apply equally to direct contempt, *12 and the Attorney General suggests no reason to apply a different rule to a direct contempt.
 As the Garner court noted, the penalty must "be sufficient to enable the courts to vindicate their authority and maintain the dignity and respect due to them." (179 Cal. at p. 413.) It cannot properly be said that the power to summarily imprison a contemnor for five days and impose a fine of $500 for each offense (Code Civ. Proc.,  1218; Donovan v. Superior Court, 39 Cal.2d 848, 855 [250 P.2d 246]) is inadequate for a court to vindicate its authority. Nor can it properly be said that the power to imprison a contemnor until he performs the ordered act (Code Civ. Proc.,  1219; In re McCausland, 130 Cal.App.2d 708, 709 [279 P.2d 820]) or for the duration of a judicial proceeding (Ex parte Rowe, supra, 7 Cal. at p. 177) is inadequate. When to these powers is added the power of the court to initiate an additional prosecution under Penal Code section 166 (see In re Morris, 194 Cal. 63, 69 [227 P. 914]), it is clear that the court has sufficient power to maintain its dignity. As the court said in In re Garner, supra, 179 Cal. 409, 414, a judge, "in vindicating his authority ... [or] in maintaining the dignity of the high and exalted office which he occupies, should not have unbridled power to summarily commit a citizen to prison for a term of years, however long, ..."
 It should be pointed out that, although the Attorney General carefully avoids a statement that Code of Civil Procedure sections 1218 and 1219, are unconstitutional as applied to a direct contempt, the position is implicit in the argument that the court has an inherent power which the Legislature cannot curtail. This court has held a legislative limitation on the contempt power unconstitutional in only one circumstance, and that is where the Legislature had completely stripped the courts of power to treat or punish as contempt a class of offenses. (Code Civ. Proc.,  1209 ["No speech or publication ... shall be treated or punished as a contempt ... unless made in the immediate presence of [the] court while in session and in such a manner as to actually interfere with its proceedings."]; In re San Francisco Chronicle, supra, 1 Cal.2d 630, 634; see also, Bridges v. Superior Court, supra, 14 Cal.2d 464, 479-480, reversed, 314 U.S. 252 [86 L.Ed. 192, 62 S.Ct. 190, 159 A.L.R. 1346]; In re Shuler, supra, 210 Cal. 377, 397-398; Matter of Shay, 160 Cal. 399, 406-407 [117 P. 442].)
 [2a] The Legislature has not here deprived the court of all power to punish a class of contempts. The petitioner was imprisoned for the duration of the trial. The Attorney *13 General, though framing the limits of the court's inherent power in language of an "adequate" sentence in fact argues for "unbridled power" (In re Garner, supra, 179 Cal. at p. 414). His argument is without merit and must be rejected.
 [3a] We agree with the Attorney General's concession that the superior court had no jurisdiction to hear and convict the petitioner of the misdemeanor of contempt of court under section 166 of the Penal Code.
 Authority both venerable and recent supports the general rule that a superior court has no jurisdiction over misdemeanor offenses. (See Cal. Const., art. VI,  5, 10; Pen. Code,  1462; People v. Mulholland, 16 Cal.2d 62, 65-66 [104 P.2d 1045]; In re Application of Luna, 201 Cal. 405, 412 [257 P. 76]; People v. Lawrence, 82 Cal. 182 [22 P. 1120]; People v. Joselyn, 80 Cal. 544, 545 [22 P. 217]; Green v. Superior Court, 78 Cal. 556, 562 [21 P. 307, 541]; People v. Smith, 231 Cal.App.2d 140, 142 [41 Cal.Rptr. 661]; In re Joiner, 180 Cal.App.2d 250, 254-255 [4 Cal.Rptr. 667]; People v. Palermo Land & Water Co., 4 Cal.App. 717, 720-721 [89 P. 723]; see also, In re Williamson, 43 Cal.2d 651, 655 [276 P.2d 593]; Rocklite Products v. Municipal Court, 217 Cal.App.2d 638, 644-645 [32 Cal.Rptr. 183].)
 An exception to the general rule has been made by statute where the jurisdictional provisions relating to the superior court clash with a legislative requirement that all offenses "connected together in their commission" be joined. Where a defendant is charged with both a felony and a misdemeanor, the superior court has jurisdiction to hear the misdemeanor case. (Pen. Code,  954; Kellett v. Superior Court, 63 Cal.2d 822, 826, 827-828 [48 Cal.Rptr. 366, 409 P.2d 206]; see also, People v. Hardin, 256 Cal.App.2d Supp. 954, 961 [64 Cal.Rptr. 307].)
 [2b] The joinder requirements of Penal Code section 954 and consequent jurisdiction of the superior court over misdemeanor offenses have no application to the instant case, where the only offense charged is a misdemeanor. Moreover, here, in contrast to a joinder situation as in Kellett, the petitioner was subject to consecutive punishments, under Code of Civil Procedure section 1219 and Penal Code section 166.
 [4] In In re Morris, supra, 194 Cal. 63, the court explained the purpose of section 166 of the Penal Code. "It is the plain intent of section 166 of the Penal Code, however, to give another and different aspect to the contempts there enumerated and to expressly attach to each of them the definite *14 quality of a criminal offense. ...plainly the legislature did not intend to take away from the court contemned the power to punish a violator of its orders, but intended rather to provide an additional remedy which should be in a sense cumulative, and which should be available in the courts possessing the appropriate criminal jurisdiction." (In re Morris, supra, 194 Cal. at pp. 67, 69 [italics added].)
 People v. Saffell, 74 Cal.App.2d Supp. 967, 982 [168 P.2d 497], held that a "violation of section 166 of the Penal Code is a misdemeanor and as such it is to be prosecuted in the same manner as other misdemeanors" rather than under the Code of Civil Procedure for summary contempts. [4b] The jurisdiction of the justice courts over prosecutions for violation of section 166 was recognized in In re Bruns, 15 Cal.App.2d 1, 4 [58 P.2d 1318].
 It is true that in Smith v. Smith, 120 Cal.App.2d 474, 479, 487 [261 P.2d 567], the court relied on both Penal Code section 166 and Code of Civil Procedure section 1209 in sentencing a contemnor before the District Court of Appeal to one day in jail, but since the commitment was within the court's powers under Code of Civil Procedure section 1218, the suggestion that section 166 of the Penal Code also warranted the commitment was unnecessary and should not be and is not approved. The same applies to the citation of section 166 in In re Gannon, 69 Cal. 541, 543 [11 P. 240].
 Thus, independently of the Attorney General's concession, we reach the conclusion that the superior court has no jurisdiction under section 166 of the Penal Code to punish for contempts committed in its presence. [2c] We have already concluded that the superior court has no "inherent" power in these circumstances to punish petitioner.
 Since the writ must be granted on jurisdictional grounds, we need not reach petitioner's other contentions, that is, that the proceedings deprived him of due process of law, and that the conviction violated petitioner's constitutional right not to incriminate himself. Those issues will be decided when, as, and if, they are properly presented. The writ of habeas corpus is granted and the petitioner discharged from custody.
 Traynor, C. J., McComb, J., Tobriner, J., Mosk, J., Burke, J., and Sullivan, J., concurred.
NOTES
[fn. 1]  1. Code of Civil Procedure section 1219 authorizes imprisonment until the contemnor performs an act which he is ordered to and capable of performing. Since the trial ended September 8, 1968, this provision does not apply. (See Ex parte Rowe, 7 Cal. 175.)
[fn. 2]  2. The basic distinction between direct and indirect contempt is that direct contempt is committed in the presence of the court while indirect, or constructive, contempt is committed outside the presence of the court. (See, e.g., Chula v. Superior Court, 57 Cal.2d 199, 203-204 [18 Cal.Rptr. 507, 368 P.2d 107, 97 A.L.R.2d 421]; but see Chief Justice Traynor dissenting at p. 208: "The classification of contempts as direct and indirect is merely a semantic device for differentiating contempts that can be adjudicated summarily from those that can be adjudicated only after adequate notice and hearing."
