Opinion
BLEASE, Acting P. J.Following a consolidated court trial and hearing defendant Darius Tilehkooh was found guilty of the misdemeanor offense of *1436possession of marijuana and found that he violated his probation on the basis of evidence he possessed and used marijuana. His probation was revoked. His defense to both charges under Health and Safety Code section 11362.5 was rejected.1 The misdemeanor conviction was reversed on appeal to the appellate division of the superior court and only the appeal of the probation violation is before us.2
Section 11362.5 was added to the Health and Safety Code by Proposition 215, the Compassionate Use Act of 1996, adopted by the electorate in 1996. (Prop. 215, § 1, as approved by voters, Gen. Elec. (Nov. 5, 1996).) Its purpose is “[t]o ensure that seriously ill Californians have the right to obtain and use marijuana for medical purposes” upon the recommendation of a physician. (§ 11362.5, subd. (b)(1)(A).) The section applies to “any . . . illness for which marijuana provides relief.”3 (Ibid.) In aid of this purpose “patients ... are not subject to criminal prosecution or sanction,” and sections 11357 (possession of marijuana) or 11358 (cultivation of marijuana) shall not apply. (§ 11362.5 subds. (b)(1)(B) & (d).) The California Supreme Court has analogized the use of marijuana pursuant to section 11362.5 to the use of a *1437prescription drug. (People v. Mower (2002) 28 Cal.4th 457, 482 [122 Cal.Rptr.2d 326, 49 P.3d 1067] (hereafter Mower).)
The trial court ruled that section 11362.5 did not apply to defendant because he could not satisfy a medical necessity defense.4 We disagree because that defense is not the measure of the right to obtain and use marijuana for medical purposes granted by section 11362.5.
On appeal the People claim that section 11362.5 is not a defense to a revocation of probation and that, in any event, the possession of marijuana violated a condition of defendant’s probation that he obey the criminal laws of the United States.
We conclude that defendant may assert section 11362.5 as a defense to the criminal sanction of revocation of his probation where, as here, there is no claim that his conduct endangered others or that he diverted marijuana for nonmedical purposes. (See § 11362.5, subd. (b)(2)). Nor does a probation condition which prohibits the lawful use of a prescription drag serve a rehabilitative purpose.
We also conclude the People may not evade section 11362.5 on the ground defendant violated a probation condition that he obey the federal criminal marijuana law. It is only as an offense against state laws that a federal criminal law may be given effect. Since the federal marijuana law is given effect only by its incorporation in the state law as a probation condition, it is subject to the state law defense of section 11362.5.
We shall reverse the judgment (order revoking probation).
FACTUAL AND PROCEDURAL BACKGROUND
The probation violation arises from a consolidated trial and hearing at which defendant was adjudged guilty of a misdemeanor violation of section 11357, subdivision (b) and found to have violated a condition of his probation on the same evidence that he used and possessed marijuana.
The misdemeanor conviction was reversed by the Appellate Division of the Mono County Superior Court because the trial court measured defendant’s *1438right to present a compassionate use defense by the wrong standard. Defendant was not retried within the period permitted by law.5 Accordingly, the resolution of the issues in this case is not premature, as claimed by the People.
In 1999 the defendant was placed on supervised probation in case no. EH0451 for maintaining a place for the use of a controlled substance. (§ 11366.) The record does not show the circumstances of the offense. As conditions of probation he was ordered to serve 90 days in the Mono County jail, pay a fine, “obey the laws”, “not possess/consume controlled substances unless prescribed ... by a physician,” and “not use or possess any dangerous drugs [or] narcotics . . . .”
In February 2000, defendant informed Probation Officer Sandra Pallas that his next drug test would be positive for marijuana. He gave her a notarized “Physician’s Certificate,” dated December 9, 1999, signed by Dr. Marion Fry, MD, that recommended cannabis use for defendant’s medicad condition, and a card with defendant’s picture and signature that identified him as a medical marijuana user. Pallas gave defendant a drug test, which showed positive for THC metabolite and conducted a search of defendant’s apartment, confiscating less than an ounce of marijuana.
This was followed with a request for revocation of probation, signed by a judge and a deputy district attorney, “based upon” a declaration that:
“One of the conditions of said probation was that defendant obey all laws;
“Another condition of said probation was that defendant shall not possess/consume controlled substances [jzc];6
“On [February 23, 2000], defendant was charged with violation of Section 11357(b) of the Health and Safety Code.”
The trial court issued an order to show cause re: probation violation, stating defendant should show cause on March 20, 2000, “why your probation should not be revoked based on your failure to obey all laws.”
*1439In the following month (March) Pallas again obtained a positive marijuana test from defendant and again searched his home, seizing less than an ounce of marijuana.
The probation officer then filed a report alleging defendant “violated] the Court’s orders directing him to not use or possess any illicit substances” in four respects: (1) testing positive for THC in a urine sample on February 10, 2000; (2) possessing less than an ounce of marijuana in his home on February 10, 2000; (3) possessing less than an ounce of marijuana in his home on March 8, 2000; and (4) testing positive for THC on March 8, 2000. (Pen. Code, § 1203.2.)
In May 2000, defendant moved in limine to bar prosecution for violation of section 11357, subdivision (b) in case No. EH5660 and to bar prosecution for a probation violation in case No. EH0451, asserting he was a marijuana user with a “notarized ‘physician’s statement.’ ” Over the prosecution’s objection, the trial court agreed to permit defendant to present his medical marijuana defense in both the probation violation and marijuana possession cases.7 On August 7, 2000, the trial court ordered the cases consolidated.
However, on September 11, 2000, the trial court reversed itself and barred the defendant from presenting a medical marijuana defense because he was not seriously ill. Defendant waived a jury trial on the underlying marijuana possession case.
On September 4, 2001, the court conducted a consolidated trial and hearing of the criminal offenses (EH5660) and the probation violations (EH0451). It took judicial notice of the probation conditions concerning the use and possession of “controlled substances” and “dangerous drugs,” but did not refer to the “obey the laws” condition.
Probation Officer Pallas testified to the commission of four offenses—two positive THC tests and two incidents of marijuana possession. Pallas agreed defendant had given her copies of a 1999 Physician’s Statement authorizing marijuana use and a marijuana user’s identity card.
The trial court found section 11362.5 inapplicable as an affirmative defense because defendant was not a “patient” within the meaning of section 11362.5, *1440because he was not “seriously ill,” because he was not in “imminent danger,” and because he had not established a “legal alternative” to marijuana use. The court asserted that “all four allegations of the violation have been proved by a preponderance of the evidence . . . .” (Italics added.)
At sentencing, defendant was reinstated on probation on condition that he complete a drug program in another county.
DISCUSSION
I.
The defendant’s possession of marijuana was the basis of a conviction pursuant to section 11357 and the possession and the use of marijuana was the basis of a revocation of defendant’s probation for a prior offense.
The criminal conviction was reversed on appeal and that ruling is final. Accordingly, we review the revocation of defendant’s probation based on the noncriminal possession and use of marijuana. We also determine whether revocation may be founded upon the violation of the federal marijuana law.
The trial court revoked defendant’s probation for violation of the condition that he not “possess/consume controlled substances . . . .” The court did not claim the use or possession endangered others or that defendant diverted marijuana for nonmedical purposes. (§ 11362.5, subd. (b)(2).)8
A.
Section 11362.5 Applies to Any Illness for Which Marijuana Provides Relief
The court rejected a defense under section 11362.5 because defendant was not “seriously ill,” he was not in “imminent danger,” and he had not established a “legal alternative” to marijuana use.9
These criteria derive from the “medical necessity” defense, which has been rejected in both the federal (United States v. Oakland Cannabis Buyers’ Cooperative (2001) 532 U.S. 483, 491 [149 L.Ed.2d 722, 732, 121 S.Ct. *14411711]) and state courts (People v. Galambos (2002) 104 Cal.App.4th 1147, 1152 [128 Cal.Rptr.2d 844].)
The medical necessity defense is not the measure of the right to obtain and use marijuana for medical purposes granted by section 11362.5. In Mower, the court said the holding of the Supreme Court in United States v. Oakland Cannabis Buyer’s Cooperative, supra, 532 U.S. 483 [149 L.Ed.2d 722], that there was no “ ‘medical necessity’ defense under the [federal] Controlled Substances Act . . . , which involves the interpretation of federal law, has no bearing on the questions [involving the construction of section 11362.5], which involve state law alone.” (Mower, supra, 28 Cal.4th at p. 465, fn. 2.)
Although section 11362.5 affords a defense to “seriously ill Californians” who obtain and use marijuana for medical purposes, it includes within that category a list of illnesses, including arthritis, and “any other illness for which marijuana provides relief.” (Subd. (b)(1)(A); italics added.) To meet the requirements of section 11362.5 it is the defendant’s burden to show “that he or she was a ‘patient’ or ‘primary caregiver,’ that he or she ‘possesse[d]’ or ‘cultivate[d]’ the ‘marijuana’ in question ‘for the personal medical purposes of [a] patient,’ and he or she did so on the ‘recommendation or approval of a physician’ (§ 11362.5(d)).” (Mower, supra, 28 Cal.4th at p. 477.)
For these reasons the court deprived the defendant of the opportunity to show he satisfied the requirements of section 11362.5
B.
Section 11362.5 Is a Defense to Probation Revocation
Prior to the enactment of section 11362.5 it was unlawful to possess marijuana (§ 11357) and lawful to consume marijuana (§§ 11550, 11054, subd. (d)(13)),10 although the prohibition of both could be made conditions of probation if they related to the offense for which probation was granted and the purpose of the condition was to rehabilitate the offender.
Under section 11362.5 both the use of marijuana and the possession of marijuana are lawful if its conditions are satisfied. Accordingly, the use and possession of marijuana under that section can be made a condition of probation only if section 11362.5 does not apply to probation.
*1442Section 11362.5, subdivision (b), sets forth the purposes that govern the immunity it provides.
“(b)(1) The people of the State of California hereby find and declare that the purposes of the Compassionate Use Act of 1996 are as follows:
“(A) To ensure that seriously ill Californians have the right to obtain and use marijuana for medical purposes where that medical use is deemed appropriate and has been recommended by a physician who has determined that the person’s health would benefit from the use of marijuana in the treatment of cancer, anorexia, AIDS, chronic pain, spasticity, glaucoma, arthritis, migraine, or any other illness for which marijuana provides relief.
“(B) To ensure that patients and their primary caregivers who obtain and use marijuana for medical purposes upon the recommendation of a physician are not subject to criminal prosecution or sanction.
“(C) To encourage the federal and state governments to implement a plan to provide for the safe and affordable distribution of marijuana to all patients in medical need of marijuana.” (§ 11362.5, italics added.)
In aid of these purposes subdivision (d), provides: “Section 11357, relating to the possession of marijuana, and Section 11358, relating to the cultivation of marijuana, shall not apply to a patient, or to a patient’s primary caregiver, who possesses or cultivates marijuana for the personal medical purposes of the patient upon the written or oral recommendation or approval of a physician.”
Subdivision (d) plainly prohibits the application of the penal provisions of “[sjection 11357, relating to the possession of marijuana, and [sjection 11358, relating to the cultivation of marijuana,” to a patient who satisfies the requirements of section 11362.5. It does not include the use of marijuana for the obvious reason that the use of marijuana is not unlawful. (See fn. 9, ante.)
It might be argued that the only operative language of section 11362.5 is subdivision (d), which decriminalizes the possession and cultivation of marijuana, leaving the lawful use and possession of marijuana subject to regulation by a probation condition. But section 11362.5 is not so limited. Subdivision (b)(1)(A) says the purpose of section 11362.5 is to “ensure . . . the right to obtain and use marijuana for medical purposes” and subdivision (b)(1)(B) says the purpose is “[tjo ensure that patients . . . who obtain and use *1443marijuana for medical purposes upon the recommendation of a physician are not subject to criminal prosecution or sanction.” (Italics added.)
We are directed to give sense to all of the terms of an enactment. To do so requires that we give effect to the purposes of section 11362.5 to ensure the right to obtain and use marijuana. In particular, we must give effect to subdivision (b)(1)(A), which establishes a “right to obtain and use marijuana for medical purposes” and which links the right to use marijuana with the prohibition on the imposition of a “criminal prosecution or sanction.” It is readily apparent that the right to obtain or use marijuana is not “ensure[dj” if its use is not given protection from the adverse consequences of probation. Since the use of marijuana is not a crime, the term “prosecution or criminal sanction” must be read to apply to any criminal sanction for the use of marijuana. The immediate candidate is probation, the regulation of which is within the Penal Code provisions on punishment and the violation of which subject a probationer to significant restrictions on his or her liberty. (Pen. Code, § 1203.2.)
Indeed, it would completely frustrate the purpose of section 11362.5 if a violation of probation for the medical use or possession of marijuana is permitted while barring a criminal prosecution for the identical conduct.
Mower did not consider the application of section 11362.5 to probation revocation hearings because it concerned the criminal possession and cultivation of marijuana. It held that section 11362.5 could be raised in a motion to set aside an information because the motion “broadly would be considered a ‘defense in court’ because, if successful, it would obviate the need for a trial.” (Mower, supra, 28 Cal.4th at p. 473.) The court recognized that “the defendant must proceed under the common law if the limited immunity [provided by section 11362.5] operates for reasons extrinsic to the criminality of the underlying conduct.” {Ibid.) The criminal sanction of probation revocation for the lawful use or possession of marijuana does so operate. Section 11362.5 provides a “defense in court” in a probation revocation proceeding because if successful it would obviate any need for the criminal sanction of revocation.
C.
The Revocation of Probation for the Medical Use of Marijuana Serves No Rehabilitative Purpose
As noted, Mower analogized the right to use marijuana for medical purposes granted by section 11362.5 to the right to use a prescription drug. “As a result of the enactment of section 11362.5(d), the possession and cultivation of marijuana is no more criminal—so long as its conditions are *1444satisfied—than the possession and acquisition of any prescription drug with a physician’s prescription.” (Mower, supra, 28 Cal.4th at p. 482.)
A court may grant probation “upon those terms and conditions as it shall determine” (Pen. Code, § 1203.1) and probation may be revoked for “violating any term or condition of . . . probation . . . .” (Pen. Code, § 1203.2, subd. (a).) However, the judicial discretion to create a condition of probation is not unlimited. (See generally 3 Witkin & Epstein, Cal. Criminal Law (3d ed. 2000) Punishment, § 546, pp. 731-732.) “California Courts have traditionally been wary of using the probation system for any nonrehabilitative purpose, no matter how superficially rational.” (People v. Richards (1976) 17 Cal.3d 614, 621, fn. 4 [131 Cal.Rptr. 537, 552 P.2d 97].) A rehabilitative purpose is not served when the probation condition proscribes the lawful use of marijuana for medical purposes pursuant to section 11362.5 any more than it is served by the lawful use of a prescription drug.
A probation condition, even if it is not a violation of the criminal law, must be “reasonably related to the crime of which the defendant was convicted or to future criminality.” (People v. Lent (1975) 15 Cal.3d 481, 486 [124 Cal.Rptr. 905, 541 P.2d 545].) However, it ordinarily cannot be said that the treatment of an illness by lawful means is so related.
The statutory power of the trial court to supervise probationers and its discretion to revoke probation is limited by statutory and common law restraints. {People v. Richards, supra, 17 Cal.3d at p. 619.) “A condition of probation will not be held invalid unless it ‘(1) has no relationship to the crime of which the offender was convicted, (2) relates to conduct which is not in itself criminal, and (3) requires or forbids conduct which is not reasonably related to future criminality ....’” (People v. Lent, supra, 15 Cal.3d at p. 486, 3 Witkin & Epstein, Cal. Criminal Law, supra, § 563, p. 756.)
Probation may be limited by other statutes. Recently, this court and other appellate courts upheld the specific limits on probation established by Proposition 36, adopted in November 2000. (See, e.g., Pen. Code, §§ 1210, 1210.1; People v. Davis (2003) 104 Cal.App.4th 1443, 1447-1448 [129 Cal.Rptr.2d 48]; In re Mehdizadeh (2003) 105 Cal.App.4th 995, 1000 [130 Cal.Rptr.2d 98].) We held these prohibitions limited the trial court’s authority to condition probation and to determine the punishment for probation violators. (People v. Davis, supra, 104 Cal.App.4th at pp. 1447-1448; People v. Murillo (2002) 102 Cal.App.4th 1414, 1418-1421 [126 Cal.Rptr.2d 358].)
We see no reason to treat the plain language of section 11362.5 differently. It precludes the imposition of a “criminal sanction” for the use and possession of marijuana and ensures the right to use and possess marijuana when *1445the user satisfies the conditions of section 11362.5. For this reason section 11362.5 provides a defense to a probation revocation based on marijuana possession or use.
In this case, depriving defendant of the right to predicate a defense to a probation revocation upon section 11362.5 denied him due process. (Black v. Romano (1985) 471 U.S. 606, 611-612 [85 L.Ed.2d 636, 642-643, 105 S.Ct. 2254].)
II.
The Incorporation of Federal Law As a State Ground of Probation Violation Is Subject to Section 11362.5
Failing these arguments the People claim defendant violated the federal criminal law and the “[possession of marijuana remains a crime under the laws of the United States.”11
The People rely on this court’s decision in People v. Bianco (2001) 93 Cal.App.4th 748, 753 [113 Cal.Rptr.2d 392], decided before Mower, for the rule that section 11362.5 is not a defense to a violation of probation that directs the defendant to obey all laws. Although in this case the trial court did not cite the federal law as a ground of probation revocation, the only probation condition which defendant could have violated was that he “obey the laws” of the state and United States. Accordingly, for purposes of this argument we treat the claim that defendant violated the federal law as seasonably raised in this case.12
The People have misunderstood the role that the federal law plays in the state system. The California courts long ago recognized that state courts do not enforce the federal criminal statutes. “The State tribunals have no power to punish crimes against the laws of the United States, as such. The same act may, in some instances, be an offense against the laws of both, and it is only as an offense against the State laws that it can be punished by the State, in *1446any event.”13 (People v. Kelly (1869) 38 Cal. 145, 150; orig. emphasis; see also People v. Grosofsky (1946) 73 Cal.App.2d 15, 17-18 [165 P.2d 757].)
Since the state does not punish a violation of the federal law “as such,” it can only reach conduct subject to the federal criminal law by incorporating the conduct into the state law. The People do not claim they are enforcing a federal criminal sanction attached to the federal marijuana law. Rather, they seek to enforce the state sanction of probation revocation which is solely a creature of state law. (§ 1203.2.) The state cannot do indirectly what it cannot do directly. That is what it seeks to do in revoking probation when it cannot punish the defendant under the criminal law.
It is claimed that a violation of probation presents a different question. It has been said the “obey the laws” condition is implicit in statutory law and common sense. (Pen. Code, § 1203; People v. Arreola (1994) 7 Cal.4th 1144, 1149 [31 Cal.Rptr.2d 631, 875 P.2d 736].) A trial court may find a defendant has violated a condition even if he has been acquitted of a charged crime or never charged. (See, e.g., In re Coughlin (1976) 16 Cal.3d 52, 59 [127 Cal.Rptr. 337, 545 P.2d 249].) However, this rule does not extend to the medical treatment of a disease by use of a prescription drug or by means which have been sanctioned by the state law.
In People v. Beaudrie (1983) 147 Cal.App.3d 686 [195 Cal.Rptr. 289], the defendant was found to have violated probation by the commission of the offense condemned by 18 United States Code section 876, by sending a threatening letter through the mail. The defendant argued the trial court lacked jurisdiction to determine whether he had violated a federal statute. The appellate court held that, although defendant had not been charged with or convicted by a federal court of violating this statute, it was irrelevant what law defendant had violated. (Id. at p. 691.) The sole question was whether defendant could conform his conduct to the law. (Ibid.)
We find significant differences between this situation and the one in Beaudrie. There was no contention in Beaudrie that a state law barred the imposition of a sanction for the conduct made a violation of the federal law, the improper use of the United States mail. Although both the California and the federal law proscribe marijuana possession, the California law precludes the imposition of a sanction in the circumstances addressed by section 11362.5.
*1447California courts do not enforce the federal marijuana possession laws when defendants prosecuted for marijuana possession have a qualified immunity under section 11362.5. Similarly, California courts should not enforce federal marijuana law for probationers who qualify for the immunity provided by section 11362.5.
The court held to the contrary in People v. Bianco, supra, a case which preceded Mower and did not consider the fact that what was being enforced was state and not federal law.
ra.
Lastly, defendant contends the complete exclusion of the section 11362.5 defense was “structural error,” requiring an automatic reversal. We need not reach this issue because defendant was deprived of a due process right to present the defense that his marijuana use was within the criteria of section 11362.5.
DISPOSITION
The judgment (order revoking probation) is reversed.
Robie, J., concurred.
A reference to a section is to the Health and Safety Code unless otherwise designated.
See footnote 5, post.
Section 11362.5 provides:
“(a) This section shall be known and may be cited as the Compassionate Use Act of 1996.
“(b)(1) The people of the State of California hereby find and declare that the purposes of the Compassionate Use Act of 1996 are as follows:
“(A) To ensure that seriously ill Californians have the right to obtain and use marijuana for medical purposes where that medical use is deemed appropriate and has been recommended by a physician who has determined that the person’s health would benefit from the use of marijuana in the treatment of cancer, anorexia, AIDS, chronic pain, spasticity, glaucoma, arthritis, migraine, or any other illness for which marijuana provides relief.
“(B) To ensure that patients and their primary caregivers who obtain and use marijuana for medical purposes upon the recommendation of a physician are not subject to criminal prosecution or sanction.
“(C) To encourage the federal and state governments to implement a plan to provide for the safe and affordable distribution of marijuana to all patients in medical need of marijuana.
“(2) Nothing in this section shall be construed to supersede legislation prohibiting persons from engaging in conduct that endangers others, nor to condone the diversion of marijuana for nonmedical purposes.
“(c) Notwithstanding any other provision of law, no physician in this state shall be punished, or denied any right or privilege, for having recommended marijuana to a patient for medical purposes.
“(d) Section 11357, relating to the possession of marijuana, and Section 11358, relating to the cultivation of marijuana, shall not apply to a patient, or to a patient’s primary caregiver, who possesses or cultivates marijuana for the personal medical purposes of the patient upon the written or oral recommendation or approval of a physician.
“(e) For the purposes of this section, ‘primary caregiver’ means the individual designated by the person exempted under this section who has consistently assumed responsibility for the housing, health, or safety of that person.”
There was no claim the conditions of probation which defendant violated concerned the rehabilitative purposes of the probation law or that defendant’s marijuana use and possession endangered others or was diverted for nonmedical purposes. (§ 11362.5, subd. (b)(2).)
We grant defendant’s request to take judicial notice of the letter dated March 4, 2003, from the Mono County Superior Court, stating the People did not refile case No. EH5660 following the filing of the remittitur on October 17, 2002. The case cannot now be retried. (Pen. Code, § 1382, subd. (a)(3).)
This statement omits the defeasing clause that defendant shall not “possess/consume controlled substances unless prescribed to you by a physician.” (Italics added.)
Section 11362.5 can be read to satisfy the defeasing clause on the view the recommendation for marijuana use is analogous to a prescription. (See Mower, supra, 28 Cal.4th at p. 482.)
The validity of the documents proffered in evidence by defendant is not challenged on appeal. The trial court reviewed two medical marijuana physicians’ certificates, one signed by Dr. Marion Fry, M.D., on December 15, 1999, and one signed by Dr. R.D. Chapman, M.D., on April 19, 2000. The trial court excluded Dr. Chapman’s April 19 certificate because it was issued after the alleged offense and violations on February 10 and March 8, 2000. We assume, for purposes of argument, as do the parties, that defendant’s documentation is sufficient to establish he was a medical marijuana user within the meaning of section 11362.5.
Nor did the court claim the conditions of probation served a rehabilitative purpose regarding the crime for which defendant was placed on probation.
The People do not contest defendant’s argument, adopted by the appellate division of the superior court, that the trial court improperly evaluated the preliminary facts necessary to establish the section 11362.5 defense.
Section 11357 proscribes the possession of marijuana. The use of a controlled substance is proscribed by section 11550 but does not include marijuana because it does not cross reference paragraph (13) of subdivision (d), of section 11054, which lists marijuana.
Title 21 United States Code section 844(a): “It shall be unlawful for any person knowingly or intentionally to possess a controlled substance . . . .” Marijuana is a controlled substance under the federal law. However, the mere use of marijuana is not a federal offense.
The wording of the probation condition that defendant “obey the laws” included a specific condition that he “obey the laws of the State of California, and of the United States . . . .” Whether his probation could be violated for violating federal law prohibiting marijuana possession even if the trial court had permitted him to raise his qualified immunity under California law, is relevant to the question whether exclusion of his defense is prejudicial and requires reversal.
See also Penal Code section 777, first adopted in 1872. It states: “Every person is liable to punishment by the laws of this State, for a public offense committed by him therein, except where it is by law cognizable exclusively in the courts of the United States . .. .” (Stats. 1872; see also Stats. 1905, ch. 529, § 1, p. 691; Stats. 1919, ch. 55, § 1, p. 81; Stats. 1951, ch. 1674, § 8, p. 3831.) The federal criminal law is cognizable as such only in the federal courts.