
71 Cal.2d 80 (1969)
THE PEOPLE, Plaintiff and Respondent,
v.
MORRIS LEE WHITE, Defendant and Appellant.
Crim. No. 13110. 
Supreme Court of California. In Bank.  
May 6, 1969.
 Donald F. Roeschke, under appointment by the Supreme Court, for Defendant and Appellant.
 Thomas C. Lynch, Attorney General, William E. James, Assistant Attorney General, Philip C. Griffin, Michael L. Abrams and Frederick R. Millar, Jr., Deputy Attorneys General, for Plaintiff and Respondent.
 BURKE, J.
 Morris Lee White was found guilty of possession of marijuana (Health & Saf. Code,  11530).probation was denied, and he was sentenced to imprisonment in the state prison for the term prescribed by law. He appeals from the judgment, contending that the evidence is insufficient to support his conviction and that, if the conviction is sustained, the case should be remanded to the trial court with directions to reconsider the sentence in view of a recent amendment to *82 section 11530, which permits the trial court in certain cases to impose a county jail term.  [fn. 1] We have concluded that only the latter contention has merit.
 On March 4, 1966, law enforcement officers, pursuant to a search warrant, conducted a search of a two-bedroom house in Los Angeles that was rented by defendant. The officers found in "the bedroom area on the dresser" two marijuana roaches and four marijuana cigarettes.  [fn. 2] In the dresser drawer they discovered documents bearing defendant's name, and in the room containing the dresser there was a double bed and a woman's clothing. Defendant stated that he and his girl friend occupied one of the bedrooms and that her brother occupied the other. Defendant arrived at the residence shortly before the search and was the only person in the house other than the officers at the time of the search.
 Defendant took the stand in his own behalf and denied any knowledge of the marijuana. He and a friend testified that they went to Las Vegas on March 1 or 2 and returned to Los Angeles on March 4. Defendant further testified that upon their return he went to his residence a couple of hours or so before the search, went into his bedroom and unpacked, and then went out again. Another friend testified that there was a party at defendant's residence on March 3.
 [1] When the sufficiency of evidence is challenged an appellate court must, of course, affirm the judgment if the record contains substantial evidence of all elements of the crime. (People v. Groom, 60 Cal.2d 694, 696-697 [36 Cal.Rptr. 327, 388 P.2d 359].) [2] The elements of the crime of possession of narcotics are physical or constructive possession thereof coupled with knowledge of the presence of the drug and its narcotic character (People v. Groom, supra; People v. Redrick, 55 Cal.2d 282, 285 [10 Cal.Rptr. 823, 359 P.2d 255]; People v. Gorg, 45 Cal.2d 776, 780 [291 P.2d 469]); possession need not be exclusive. (People v. Prieto, 191 Cal.App.2d 62, 71 [12 Cal.Rptr. 577] [overruled on another issue in People v. Butler, 64 Cal.2d 842, 844-845] [52 Cal.Rptr. 4, 415 P.2d *83 819]; cf. Rideout v. Superior Court, 67 Cal.2d 471, 474 [62 Cal.Rptr. 581, 432 P.2d 197].) [3] The elements may be established by circumstantial evidence and any reasonable inferences drawn from such evidence. (People v. Groom, supra.)
 [4] Here the recited evidence is sufficient to support the conviction. The evidence that marijuana was found in defendant's bedroom in which he had admittedly been within a few hours before the search raised a reasonable inference that the marijuana was his even though he shared the room with another. (People v. Elliott, 186 Cal.App.2d 178, 185 [8 Cal.Rptr. 795]; People v. Van Valkenburg, 111 Cal.App.2d 337, 340 [244 P.2d 750]; People v. Crews, 110 Cal.App.2d 218, 219-220 [242 P.2d 64].) [5, 6] From the evidence the trier of fact could properly conclude that defendant had knowledge of the presence of the marijuana (cf. People v. Prieto, supra, 191 Cal.App.2d 62, 71 [overruled on another issue in People v. Butler, supra, 64 Cal.2d 842, 844-845]), and the mere possession of a narcotic constitutes substantial evidence that the possessor of the narcotic knew of its nature. (People v. Bretado, 178 Cal.App.2d 465, 469 [3 Cal.Rptr. 216]; People v. Woods, 108 Cal.App.2d 50, 52 [238 P.2d 124]; People v. Physioc, 86 Cal.App.2d 650, 652 [195 P.2d 23].)
 [7] The question remains whether the case should be remanded to the trial court with directions to reconsider the matter of probation and sentence. Here, as in People v. Francis, ante, page 66 [75 Cal.Rptr. 199, 450 P.2d 591], at the time defendant was sentenced the penalty prescribed for a violation of that section where, as in the instant case, no prior narcotic offenses were alleged and found to be true was imprisonment in the state prison for one to ten years (Stats. 1961, ch. 274,  7). The trial court could also grant probation to a defendant eligible therefor (Pen. Code,  1203) and could impose as a condition of probation a county jail term for a period not exceeding one year (Pen. Code,  1203.1 and 19a). While the present case was pending on appeal, section 11530 was amended to provide for alternative sentences of imprisonment in the county jail for not more than one year or in the state prison for one to ten years where no prior narcotics offenses are shown. (Stats. 1968, ch. 1465,  1.)
 As explained in People v. Francis, supra, under the holding of this court in In re Estrada, 63 Cal.2d 740 [48 Cal.Rptr. 172, 408 P.2d 948], the amendment to section 11530 is applicable *84 retroactively to cases not final before the effective date of the amendment, and in order to give full effect of the change in legislative policy with respect to such offenses the case should be remanded to the trial court with directions to reconsider the matter of probation and sentence.
 The judgment of conviction is reversed insofar as it commits defendant to imprisonment in the state prison and is otherwise affirmed. The case is remanded to the trial court for the sole purpose of resentencing defendant or placing him on probation, whichever action the trial court concludes is appropriate.
 Traynor, C. J., McComb, J., Peters, J., Tobriner, J., and Sullivan, J., concurred.
 MOSK, J.
 I concur and dissent for the same reasons set forth in my opinion filed this day in People v. Francis, ante, p. 66, 79 [75 Cal.Rptr. 199, 450 P.2d 591].
NOTES
[fn. 1]  1. The second contention is also presented in People v. Francis, ante, p. 66 [75 Cal.Rptr. 199, 450 P.2d 591], decided the same day as the instant case.
[fn. 2]  2. The briefs of both sides state that the four marijuana cigarettes were in one bedroom and the two marijuana roaches were in the other bedroom, but the record shows that the evidence which supports the statement was stricken. However, whether all or only part of the marijuana was found in the bedroom that, as we shall see, was occupied by defendant and his girl friend does not appear to affect the result.
