Petitioner was convicted in the Municipal Court for the San Leandro-Hayward Judicial District of wilful trespass in violation of subdivision (l) of section 602 of the Penal Code.1 The judgment of conviction was affirmed without opinion by the Appellate Department of the Superior Court of Alameda County, which certified that a transfer of the case to the District Court of Appeal appeared necessary to settle important questions cof law. The District Court of Appeal denied the transfer, and petitioner, who is presently on bail commenced this habeas corpus proceeding.
The Shipwrights, Joiners, Boatbuilders and Caulkers, Local 1149, United Brotherhood of Carpenters and Joiners of America, AFL-CIO, which had been certified by the National Labor Relations Board as the collective bargaining agent for the employees of Chris Craft Corporation at its Hayward plant, instituted a strike after negotiations for a contract proved unsuccessful. The Southern Pacific Company served the plant by means of a spur track, and, in connection with picketing commenced by the union, petitioner, an official of the union, entered Southern Pacific’s right-of-way and stationed himself at or near the junction of the spur track and the main line. Petitioner was arrested by an agent of Southern Pacific after he refused to leave the property.
Habeas corpus is available in cases where the court has acted in excess of its jurisdiction. (Pen. Code, § 1487, subd. 1; Neal v. State of California, 55 Cal.2d 11, 16 [9 Cal.Rptr. 607, 357 P.2d 839].) For purposes of this writ as well as prohibition or certiorari, the term “jurisdiction” is not limited to its fundamental meaning, and in such proceedings judicial acts may be restrained or annulled if *668determined to be in excess of the court’s powers as defined by constitutional provision, statute, or rules developed by courts. (Neal v. State of California, supra, 55 Cal.2d 11, 16 [habeas corpus]; Auto Equity Sales, Inc. v. Superior Court, 57 Cal.2d 450, 454-455 [20 Cal.Rptr. 321, 369 P.2d 937] [certiorari]; Abelleira v. District Court of Appeal, 17 Cal.2d 280, 287 et seq. [109 P.2d 942, 132 A.L.R. 715] [prohibition] .) In accordance with these principles a defendant is entitled to habeas corpus if there is no material dispute as to the facts relating to his conviction and if it appears that the statute under which he was convicted did not prohibit his conduct. (Cf. In re Allen, 59 Cal.2d 5, 6 [27 Cal.Rptr. 168, 377 P.2d 280]; Neal v. State of California, supra, 55 Cal.2d 11, 16; In re McVickers, 29 Cal.2d 264, 279 [176 P.2d 40]: Ex parte Greenall, 153 Cal. 767, 770 [96 P. 804]; Ex parte Mirande, 73 Cal. 365, 371 [14 P. 888].)
The question to be determined is whether it appears from undisputed facts concerning petitioner’s conduct that the general trespass provision contained in subdivision (?) of section 602 of the Penal Code is to be interpreted as inapplicable to him. It should be stressed at the outset that, since we are not confronted with the availability of civil remedies but with the construction of a criminal statute, petitioner must be given the benefit of every reasonable doubt as to whether the statute was applicable to him. (Walsh v. Department of Alcoholic Beverage Control, 59 Cal.2d 757, 764-765 [31 Cal.Rptr. 297, 382 P.2d 337]; In re Tartar, 52 Cal.2d 250, 256-257 [339 P.2d 553].)
Vital to the proper construction of subdivision (?) in this ease is the article of the Penal Code (§§ 552-555.5) which, in prohibiting the entering or remaining upon certain industrial properties posted against trespassing, provides (§ 552.1, subd. (a)) that it does not prohibit any “lawful activity for the purpose of engaging in any organizational effort on behalf of any labor union, agent, or member thereof, or of any employee group, or any member thereof, employed or formerly employed in any place of business or manufacturing establishment described in this article, or for the purpose of carrying on the lawful activities of labor unions, or members thereof.” Among the industrial properties designated in this article are railroad rights-of-way.
Thus the Legislature in dealing with trespasses on a railroad right-of-way posted against trespassing has specifically subordinated the rights of the property owner to those of persons engaging in lawful labor activities. Sections 552-*669555.5 of the Penal Code must be read together with subdivison (Z) of section 602, and that subdivision must be treated as also subject to the labor activity exception when, as here, unposted property of the type designated in the posting law is entered. Where property is not posted, an unauthorized person about to enter it does not receive the same formal notice or warning that is given in the case of posted property, and it would be anomalous to hold that a picket who enters unposted property is in a worse position than one who enters posted property.
The language which sets forth the exception relating to labor activities is broad enough to exempt conduct on any of the designated industrial properties whether owned by a person directly involved in the labor dispute or by someone else. We would be restricting the exception by judicial construction if we were to read into it a limitation based solely on the ownership of property by persons not involved in the dispute. We find no reason to do so, and, to the contrary, our imposition of such a limitation would be in conflict with the principle that every reasonable doubt as to the meaning of a criminal statute must be resolved in favor of a defendant.
The exception relating to labor activities may, of course, be invoked only where the activities are “lawful.” It is not claimed that the objective of the union in its dispute with Chris Craft was unlawful, and, in furtherance of the established policy of this state to have labor conflicts settled by the free interaction of economic forces, conduct of various types has been treated as a proper means of obtaining a valid labor objective even though the conduct would be considered unlawful in the absence of a labor dispute. (Messner v. Journeymen Barbers etc. International Union, 53 Cal.2d 873, 886 [4 Cal.Rptr. 179, 351 P.2d 347]; see Northwestern Pac. R. R. Co. v. Lumber & S. W. Union, 31 Cal.2d 441, 446-447 [189 P.2d 277]; cf. Republic Aviation Corp. v. National Labor Relations Board, 324 U.S. 793, 797 et seq. [65 S.Ct. 982, 89 L.Ed. 1372, 1376, 157 A.L.R. 1081, 1083-1084].)
It is settled that a union has a right to effectively publicize at the jobsite such matters as union objectives and grievances regarding employers and working conditions. (Wollam v. City of Palm Springs, 59 Cal.2d 276, 284 [29 Cal.Rptr. 1, 379 P.2d 481]; McKay v. Retail Auto, S. L. Union No. 1067, 16 Cal.2d 311, 319, 331 [106 P.2d 373]; see In re Porterfield, 28 Cal.2d 91, 105, 114 [168 P.2d 706, 167 A.L.R. 675].) Communication of the cause of the employees to persons pro*670viding services for a manufacturing plant during a strike is ordinarily of great importance to the union since such persons help the manufacturer maintain the working conditions against which labor is protesting. (Cf. Fortenbury v. Superior Court, 16 Cal.2d 405, 409 [106 P.2d 411].) The picketing involved here was peaceful, without violence or threats of violence, and the place chosen for the picketing, the junction of the main line and the spur track, was reasonably calculated to effectuate the union’s message. The spur track did not cross any public thoroughfare and served only Chris Craft.
The infringement of Southern Pacific’s property rights was technical rather than substantial. No property damage resulted from the picketing, and petitioner did not attempt to physically obstruct the trains or interfere with railroad traffic but only to communicate with the railroad employees. In Northwestern Pac. R. R. Co. v. Lumber & S. W. Union, supra, 31 Cal.2d 441, 446-447, this court recognized that labor activities are not to be treated as unlawful merely because they affect a common carrier which is not directly involved in the dispute but is serving the employer of those engaging in the activities. Although the picketing in that ease was held to be improper, the factual situation there involved is readily distinguishable from the present one since the picketing occurred many miles from the place of employment and on a main line serving persons in addition to the employer, resulted in physical obstruction of train traffic, and was accompanied by threats of violence to employees of the railroad.
We are satisfied that in the light of all the circumstances before us and the requirement that criminal statutes be construed in a defendant’s favor, petitioner’s conduct came within the exception relating to lawful labor activities and that, therefore, subdivision (l) of section 602 of the Penal Code did not prohibit his conduct. This conclusion makes it unnecessary to consider two other theories upon which petitioner urges the invalidity of his conviction, namely, that his activities were subject to exclusive federal jurisdiction and that the application of subdivision (1) to him was in violation of his right of free speech.
The writ is granted, and petitioner is discharged from custody.
Traynor, J., Peters, J., and Peek, J., concurred. Schauer, J., concurred in the judgment.
McComb, J., dissented.
Section 602 of the Penal Code provides: “Every person who wilfully commits any trespass by either: ... (Z) Entering and occupying real property or structures of any kind without the consent of the owner, his agent, or the person in lawful possession thereof; ... is guilty of a misdemeanor. ’ ’