
241 Cal.App.2d 173 (1966)
THE PEOPLE, Plaintiff and Respondent,
v.
RUBEN ACOSTA MURILLO, Defendant and Appellant.
Crim. No. 200. 
California Court of Appeals. Fifth Dist.  
Mar. 28, 1966.
 Gerald L. Thuesen, under appointment by the District Court of Appeal, W. Stuart Home and Lerrigo, Thuesen & Thompson for Defendant and Appellant.
 Thomas C. Lynch, Attorney General, and John L. Giordano, Deputy Attorney General, for Plaintiff and Respondent. *174
 CONLEY, P. J.
 The defendant was charged with a violation of section 11500.5 of the Health and Safety Code--possession for sale of a narcotic (heroin) other than marijuana. He was also alleged to have had two prior felony convictions. Sometime after his original pleas were entered, he finally admitted the second prior conviction, and the district attorney then moved to dismiss the first charge of a prior conviction. The court, sitting without a jury, found the defendant guilty, and, when he waived a probation officer's report and requested immediate sentence, he was sent to state's prison.
 [1] Only one point is made on the appeal, namely, that the court erroneously admitted in evidence the contents of an attache case, belonging to the defendant; it was locked and in the apartment of a woman named Tony Lira, who, unknown to the defendant, was an informant of the enforcement agents; the officers did not have a search warrant and the defendant did not give specific permission to unlock the case; entry into it was made by means of a key removed, without permission, from the defendant's pocket by one of the law enforcement agents. In the attache case, was a rubber contraceptive containing a large quantity of heroin and also an improvised hypodermic syringe, including an eye dropper and a needle, apparently used by the defendant for the purpose of injecting heroin into his own arm. If the heroin taken from the locked case was properly admitted in evidence, there was an ample showing to support the conviction; in its absence, however, there was a failure of sufficient proof on the charge that the defendant not only had heroin in his possession, but that it was in such quantity that, inferentially, he intended it for sale. (People v. Coblentz, 229 Cal.App.2d 296, 320 [40 Cal.Rptr. 116]; People v. Aguilar, 232 Cal.App.2d 173, 178 [42 Cal.Rptr. 666].)
 The defendant thus relies upon his claim that he was not afforded the constitutional protection to which he was entitled. (U.S. Const., 4th and 14th Amends.; Mapp v. Ohio, 367 U.S. 643 [81 S.Ct. 1684, 6 L.Ed.2d 1081, 84 A.L.R.2d 933]; People v. Cahan, 44 Cal.2d 434 [282 P.2d 905, 50 A.L.R.2d 513]; Manwaring, California and The Fourth Amendment, 16 Stan. L. Rev. 318, 322.)
 Murillo had an apartment in Oakland, and he rather frequently occupied rooms at several different motels, but for approximately a month before his arrest he had been living in her apartment with Tony Lira, who, unquestionably, during all of that time was an informant of the enforcement officers. *175 Defendant, Murillo, began residing with her at 2640 Berkeley Street in Fresno on about December 12, 1964; Tony Lira called Agent Lloyd Duggins of the bureau to tell him that defendant was living with her, that he was engaged in the sale of forbidden drugs, and that he intended to go to Mexico to buy a supply of narcotics; Agent Duggins asked her to let him know when defendant planned to leave on the trip, the kind of automobile he was going in, with whom he planned to travel, and whether she intended to accompany him. He also asked her to let him know from whom Murillo bought the drugs and when they would return. The first contact between Tony Lira and Agent Duggins concerning Murillo was on December 12; the next consultation by telephone was on December 14, 1964; another conversation between the two with reference to the alleged narcotic activities of defendant, again by telephone, was on December 17; the next telephone conference was on December 19; on December 20 or 21, Tony Lira and Agent Duggins talked about defendant and other alleged narcotic lawbreakers; on December 28, 1964, a contact was effected between them with reference to the activities of defendant; on December 28, Tony Lira told Agent Duggins by telephone that she and defendant were traveling to Mexico to buy narcotics, gave him the license number and a description of the automobile they would use, the route they would take, the names of those who would join in the trip, and that they would return from Mexico on December 31. The next contact between the agent and the informer was at her apartment on the evening of January 1, when defendant was arrested; Agent Duggins testified that Tony Lira had been giving information as to lawbreakers for some nine months, that it had been reliable information and had resulted in the arrest and conviction of other persons.
 On January 1, 1965, agents of the Bureau of Narcotic Enforcement placed Tony Lira's apartment under surveillance; at about 6 o'clock in the evening, defendant was watched as he left her dwelling and entered a taxi. The car was stopped by agents Sherwood and Lacey at Fresno and Cambridge Streets; armed with a search warrant directed toward the person of the defendant, the agents searched him but found no contraband; however, judging from the appearance of the defendant and the fact that he had fresh needle marks on his arm, the officers inferred that he was under the influence of narcotics and arrested him. The subsequent search of the apartment hereinafter referred to could not be justified *176 as an incident of the arrest. (Castaneda v. Superior Court, 59 Cal.2d 439, 442 [30 Cal.Rptr. 1, 380 P.2d 641]; Tompkins v. Superior Court, 59 Cal.2d 65, 67 [27 Cal.Rptr. 889, 378 P.2d 113]; People v. Haven, 59 Cal.2d 713, 719-721 [31 Cal.Rptr. 47, 381 P.2d 927]; People v. Martinez, 232 Cal.App.2d 796, 799-800 [43 Cal.Rptr. 197].)
 Agent Lacey went to the residence at 2640 Berkeley Street about 200 or 300 yards from the intersection where the arrest was made; he joined agents Newland and Velasquez; they knocked at the door and an unidentified person from inside said, "Who is it?" Velasquez then identified himself as a narcotics officer and asked permission to come into the house to find out whether or not it would be all right to conduct a search; Velasquez, Newland and Lacey entered pursuant to permission; Newland went to the front room where he talked to Tony Lira and obtained her general consent to search the apartment; Lacey walked through the front room into a hallway and looked into several of the rooms; in the southwest bedroom he observed a green attache case on the shelf. He put the case on the bed, intending to open it, but discovered that it was locked; he notified Newland, who was the senior officer in charge of the search, and immediately left the dwelling to see the defendant, thinking that he might have a key; Lacey met Agent Sherwood and his prisoner outside of the apartment; the agents took Murillo into the bedroom where the case was resting on the bed; without permission, Newland reached into the defendant's pocket and removed his keyring on which there was a key which fitted the case; he opened the attache case in the presence of the defendant and found the narcotic; the defendant did not authorize the removal of the key from his pocket, or its use, or give consent to the search; there was no warrant allowing a search of the house, or any of its contents.
 During the trip to Mexico, Tony Lira had kept some of her toilet articles in the case. But she had removed all of her personal property earlier on the day of defendant's arrest before the officers arrived. Unknown to the officers, the defendant had given Tony Lira a key to the attache case on the day in question, but she did not tell the officers that she had a key, and it was never used.
 Summarizing, the evidence shows that the defendant had been living for approximately a month in the apartment of Tony Lira. During the Mexican visit, he carried along an attache case in which the woman had placed various toilet *177 articles of her own. Presumably in Mexico the defendant added to the contents of the attachee case a contraceptive containing a large quantity of heroin, and other personal property of his own. Upon their return to Fresno on the day of his arrest, the woman removed all of her personal property from the case. Before he left the apartment, Murillo let her have a case key, which she possessed during all of her subsequent talks with the police, but which she never mentioned to any member of the enforcement squad. Murillo was arrested in the street some hundreds of yards from the dwelling, which he had been sharing as a guest with Tony Lira; when the enforcement agents entered her home, the Lira woman gave them general permission to search the apartment and she also later mentioned the fact that the forbidden drug was in a little bag in the next room. The trial judge was of the opinion that Tony Lira thus gave her consent to a search of the locked attache case, and that she had the right to do so, saying: "I have come to the conclusion, Mr. Murillo, that in your case the search that was made was made with the consent of the lady who was in charge of the premises and who had actual authority to permit a search of the very case that contained the narcotic substance; that this consent and this authority is indicated primarily by her testimony that you and she shared this case on a trip just a short time before this search was made and that on the very day that the search was made you had given her the key to the locked case, indicating clearly your intention to allow her to exercise authority over it." However, there is no evidence that Tony Lira gave more than a general consent to a search of the rooms; there is no testimony that she purported to give specific authorization to open the locked attache case. As a witness, she denied that she gave consent to open the case, or that she even told the officers that she had a key to it. Furthermore, the defendant himself, although under arrest and presumably handcuffed, was personally present in the room where his locked attache case was, and, without his permission, the officers removed from his trousers pocket the key which they used to open the locked case.
 The question arises, then, whether the mere fact that, unknown to the officers, Tony Lira also had a key which fitted the case requires a different assessment of the legal rights involved. We think that it does not, and that there was no legal consent by any one to open the locked case; in conformity with the law, the officers should have applied for a search *178 warrant if they were unable to get the specific consent of the defendant to open the case; they should not have resorted to self-help in carrying on their search for evidence.
 The leading case in this jurisdiction affirming the principle that the officers had no right to open defendant's locked receptacle is People v. Cruz, 61 Cal.2d 861, 866-867 [40 Cal.Rptr. 841, 395 P.2d 889], where the court states: "Nor can the search in the case at bench be justified on the ground of consent. Before undertaking the search the officers had learned that defendant and Ann were merely transient guests in the apartment. The officers had neither asked for nor received defendant's consent, express or implied, to search through any of his belongings on the premises. The general consent given by Ann and Susan that the officers could 'look around' did not authorize Agent Van Raam to open and search suitcases and boxes that he had been informed were the property of third persons. ..."
 "* * *"
 "Agent Van Raam failed to make such simple inquiries, but instead carried out a general exploratory search of (as he described it) 'every possible place that there was that conceivably narcotics may have been concealed [in].' It follows that the search and seizure of defendant's blue suitcase and its contents cannot be sustained on consensual grounds, and its admission into evidence over defendant's timely objections was error under both federal and state law. (Holzhey v. United States (5th Cir. 1955) 223 F.2d 823, 825-827 [2]; United States v. Blok (D.C. Cir. 1951) 188 F.2d 1019, 1020 [2] -1021 [7]; see also Tompkins v. Superior Court (1963) supra, 59 Cal.2d 65, 68 [5]-69 [6], and cases there cited.)"
 (See Holzhey v. United States, 223 F.2d 823; United States v. Blok, 188 F.2d 1019.)
 Marshall v. United States, 352 F.2d 1013, does not involve a locked container, and so, factually, for that reason, if no other, it does not constitute persuasive contrary authority.
 The officers knew that defendant was living with Tony Lira in her apartment and that the attache case belonged to appellant. No matter what the previous authority of Tony Lira was to authorize a search in the defendant's absence, he was personally present in the room where the officers opened the locked case, and he then had the constitutional right to the preservation of his privacy. In People v. Frank, 225 Cal.App.2d 339, 343-344 [37 Cal.Rptr. 202], the court held: "Unlike the factual situations existing in the Gorg [People v. Gorg, 45 *179 Cal.2d 776 (291 P.2d 469)] and Caritativo [People v. Caritativo, 46 Cal.2d 68 (292 P.2d 513)] cases, the defendant in the present case was in his room at the time of the entry and search. Consequently, the problem is not what Mrs. Day's authority might reasonably have appeared to the officers to be had the defendant been absent from his room. The crucial defect in the reasoning of the trial court was the failure to recognize that the defendant, unlike a mere inanimate object in the room, was possessed of a substantial right of privacy with respect to his place of abode and was entitled to rely upon the constitutional protection against unreasonable search. As aptly stated by Mr. Justice Frankfurter in Jones v. United States, 362 U.S. 257, at page 266 [80 S.Ct. 725, 4 L.Ed.2d 697, 705, 78 A.L.R.2d 233]: 'Distinctions such as those between "lessee," "licensee," "invitee" and "guest," often only of gossamer strength, ought not to be determinative in fashioning procedures ultimately referable to constitutional safeguards.'"
 "There was evidence which, if believed by the trier of fact, would have sustained an inference that the defendant, upon being confronted in his room by the officers, did not consent to the search but insisted that the officers first have a search warrant. His constitutionally protected right of privacy was not so under the control of the person from whom he rented the room that he could not personally assert it under the circumstances of this case. If he did not consent to the search, it was unlawful. (See Tompkins v. Superior Court, 59 Cal.2d 65, 69 [27 Cal.Rptr. 889, 378 P.2d 113].) The trial court erroneously failed to determine that issue of consent."
 Tompkins v. Superior Court, supra, 59 Cal.2d 65, 69, pointed out: "Joint occupancy of property, particularly residential property, obviously demands reasonable restrictions on the right of each joint occupant either by himself or through another to exercise full control over the property at all times regardless of the wishes of another joint occupant present on the premises. A joint occupant's right of privacy in his home is not completely at the mercy of another with whom he shares legal possession. (See Verdier v. Verdier, 152 Cal.App.2d 348, 352-353 [313 P.2d 123]; People v. Weaver, 241 Mich. 616 [217 N.W. 797, 799, 58 A.L.R. 733]; United States v. Blok, 188 F.2d 1019, 1021; Holzhey v. United States, 223 F.2d 823, 826-827; 2 Tiffany, Real Property (3d ed.)  457, pp. 274-275.) Accordingly, we hold that one joint occupant who is away from the premises may not authorize police officers to enter *180 and search the premises over the objection of another joint occupant who is present at the time, at least where as in this case, no prior warning is given, no emergency exists, and the officer fails even to disclose his purpose to the occupant who is present or to inform him that he has the consent of the absent occupant to enter."
 The defendant's right to the preservation of his privacy was not effectively recognized by the law enforcement officials; there is here a clear case of illegally-seized evidence as to which a timely and proper objection was made during the trial.
 People v. Fierro, 236 Cal.App.2d 344, 347 [46 Cal.Rptr. 132], holds: "The purpose of the rule excluding illegally seized evidence is deterrence of the lawless acts of federal and state officials. (Mapp v. Ohio, 367 U.S. 643, 648 [81 S.Ct. 1684, 6 L.Ed.2d 1081, 84 A.L.R.2d 933]; People v. Cahan, 44 Cal.2d 434, 448-449 [282 P.2d 905, 50 A.L.R.2d 513].)" (See also People v. Peterson, 233 Cal.App.2d 481, 493- 494 [43 Cal.Rptr. 457].) As is said in People v. Thomsen, 239 Cal.App.2d 84, 92 [48 Cal.Rptr. 455]: "Erroneous introduction of illegally-seized evidence does not require a reversal unless on the entire record of the case, including the evidence, the reviewing court concludes that a miscarriage of justice has ensued." (See also People v. Cruz, supra, 61 Cal.2d 861, 867; People v. Parham, 60 Cal.2d 378, 385-386 [33 Cal.Rptr. 497, 384 P.2d 1001].) The exclusion of the improperly admitted evidence would leave the record without adequate proof that heroin was possessed for the purpose of sale; we conclude, therefore, that the erroneous ruling resulted in a miscarriage of justice (Cal. Const., art. VI,  4 1/2).
 The judgment is reversed.
 Brown (R.M.), J., and Stone, J., concurred.
