
18 Cal.2d 884 (1941)
MARTIN KRELING et al., Petitioners,
v.
THE SUPERIOR COURT OF LOS ANGELES COUNTY et al., Respondents.
S. F. No. 16575. 
Supreme Court of California. In Bank.  
Nov. 1, 1941.
 John J. Taaffe and Leo R. Friedman for Petitioners. *885
 Earl Warren, Attorney General, and Warren Olney, Burdette J. Daniels and Herbert E. Wenig, Deputies Attorney General, for Respondents.
 GIBSON, C.J.
 In these consolidated cases petitioners seek to challenge the validity of a judgment of contempt issued against them by the Superior Court of Los Angeles County. The judgment of contempt arose out of a proceeding in equity in which the Attorney General sought to enjoin the wide-spread activities of the Annenberg racing news service throughout the state. The complaint for an injunction alleged that the Annenberg organization was composed of numerous branches throughout the United States, and that it was engaged in furnishing supplies and facilities used in the illegal operation of bookmaking and pool selling establishments maintained for wagering on horse races. The complaint named 112 specific persons as defendants, 99 unknown persons as John Does and five unknown corporations. Petitioners herein were sued fictitiously as John Doe Twenty-eight and John Doe Thirty, respectively, and their proper names were inserted later by amendment to the complaint. In the action of People v. Annenberg, Superior Court of Los Angeles, Number 451,935, the Attorney General obtained a temporary restraining order which enjoined these petitioners and others from engaging in any acts in furtherance of their conspiracy to furnish information, materials and facilities for the illegal operation of bookmaking establishments. Thereafter the superior court found upon the basis of affidavits and testimony introduced by the Attorney General that petitioners had wilfully and intentionally violated the terms of the restraining order. Petitioners were adjudged guilty of contempt of court upon 148 separate counts, and each petitioner was sentenced to pay an aggregate fine of $29,600 and also to serve 296 days in the county jail.
 Petitioners seek, in S. F. 16,575, to have the order adjudging them guilty of contempt annulled upon a writ of certiorari. It is contended that the temporary restraining order is void because in excess of the court's jurisdiction. [1] If the order is void, it is perfectly clear that the judgment of contempt must be annulled, for no one may be punished in contempt for the disobedience of a void order. *886 (Wutchumna Water Co. v. Superior Court, 215 Cal. 734, 736 [12 PaCal.2d 1033]; Ex parte Brown, 97 Cal. 83, 85 [31 P. 840].) Petitioners argue that the complaint in the main action does not present facts sufficient to justify the intervention of a court of equity. The restraining order as well as the permanent injunction was sought upon the theory that petitioners' activities contributed to the maintenance of bookmaking or gambling houses which were said to constitute public nuisances.
 In People v. Lim, S. F. 16,414, ante, p. 872 [118 PaCal.2d 472] (this day decided), we held that such an action in equity on behalf of the state to enjoin the operation of a gambling house must be based upon the provisions of our statutes rather than upon the common law definitions of "public nuisance." The argument advanced on behalf of the state in the present case is identical with the one which was rejected in the Lim case, that is, that gambling establishments, which were public nuisances at common law, should be considered inherent public nuisances in this state for the purposes of an equity injunction apart from the provisions of our statute. The complaint upon which the restraining order in the present case is based alleges in detail the nature of the organization of which petitioners formed a part. It sets forth the manner in which services and supplies necessary to the functioning of bookmaking establishments were furnished by the organization, and it alleges a conspiracy among the defendants for the purpose of furnishing these services and supplies. [2] But the complaint does not set forth facts from which it can be concluded that the activities of these petitioners constituted a public nuisance within the terms of our statute. Allegations of fact are required from which it can be determined that the furnishing of such services and supplies is within the statutory definition of "public nuisance" as activity "... which is injurious to health, or is indecent or offensive to the senses, or an obstruction to the free use of property. ..." (Civil Code, secs. 3479, 3480; People v. Lim, supra.) [3] In the absence of such allegations the court had no adequate basis for the issuance of its restraining order which, in broad terms, enjoined petitioners from printing or distributing racing forms and scratch sheets, from gathering or disseminating horse racing news and from using their printing plants or communication facilities *887 for such purposes. It is clear, therefore, that the restraining order granted in the present case exceeded the authority of the trial court and is invalid. (People v. Lim, supra; People v. Seccombe, 103 Cal.App. 306 [284 P. 725]; Code of Civil Procedure, sec. 527.) In view of our conclusion upon this point it is unnecessary to consider the numerous other issues of importance raised by this proceeding. The judgment of contempt must be annulled.
 [4] Petitioners also sought, in Criminal 4353, to obtain their release by a writ of habeas corpus upon the theory that the judgment of contempt under which they were imprisoned exceeded the authority of the trial court. It is settled that habeas corpus is an appropriate remedy to halt the enforcement of an invalid judgment of contempt. (Ex parte Brown, supra; Ex parte Clarke, 126 Cal. 235 [58 P. 546, 77 Am.St.Rep. 176, 46 L.R.A. 835].)
 The judgment of contempt is annulled and the petitioners are discharged.
 Curtis, J., Edmonds, J., Carter, J., and Traynor, J., concurred.
