
214 Cal.App.2d 136 (1963)
THE PEOPLE, Plaintiff and Respondent,
v.
CONRAD L. ALLEN, Defendant and Appellant.
Crim. No. 1850. 
California Court of Appeals. Fourth Dist.  
Mar. 15, 1963.
 Thomas Whelan, under appointment by the District Court of Appeal, for Defendant and Appellant.
 Stanley Mosk, Attorney General, William E. James, Assistant Attorney General, and Jack K. Weber, Deputy Attorney General, for Plaintiff and Respondent.
 COUGHLIN, J.
 The issue on this appeal is whether the search of a person unlawfully incarcerated in a jail, and the seizure of a narcotic in his possession which was revealed by this search, was illegal because in violation of the constitutional guarantee against unreasonable searches and seizures.
 [1a] The defendant was arrested and placed in jail on a burglary charge; was not taken into custody under a warrant of arrest, as no complaint had been filed charging him with such, nor was there a showing that probable cause existed for believing that he had committed that offense; and, following a refusal to issue a burglary complaint against him, had been ordered released. In the meantime, two officers approached his cell; ordered him to step into an adjoining passageway; one of them started to search his bed, then noticed him take his hand from his pocket, cup it, put it to and place something inside his mouth; both of them then attempted to prevent him from swallowing the same and to recover it; engaged in a terrific struggle with him, in which they were assisted by three other officers; forced his mouth open with a metal spoon; found nothing inside; but did find a moist packet on the floor at the place where his head had been. Thereafter it was determined that the packet contained heroin. The defendant was charged with unlawfully possessing a narcotic, viz., a violation of section 11500 of the Health and Safety Code; was tried therefor; objected to the introduction of the packet of heroin discovered and seized after the aforedescribed search, which was the basis of the charge against him, but his objection was overruled; was found guilty; moved for a new trial which was denied; and appeals from the order denying his motion for a new trial and from the judgment, contending that the packet of heroin in question was obtained from him illegally. This contention is meritorious and the judgment must be reversed. No appeal lies from an order denying a motion for a new trial and the attempted appeal therefrom must be dismissed. (People v. Eppers, 205 Cal.App.2d 727, 728 [23 Cal.Rptr. 222].) *138
 The defendant was unlawfully arrested; thereupon was unlawfully detained in jail; while there was subjected to the probability of an imminent search of his person; took measures attempting to frustrate any incriminating results therefrom; by doing so caused the officers to believe that he was committing an offense in their presence; and in the course of a search that followed, released and disclosed his possession of the narcotic that was admitted in evidence as proof of the charge made against him. [2] Evidence obtained from a defendant as a "direct result" or the "immediate product" of an unlawful arrest is obtained in violation of the constitutional guarantee against unlawful searches and seizures. (Badillo v. Superior Court, 46 Cal.2d 269, 273 [294 P.2d 23]; People v. Macias, 180 Cal.App.2d 193, 198 [4 Cal.Rptr. 256]; Gascon v. Superior Court, 169 Cal.App.2d 356, 359 [337 P.2d 201].) [1b] The search which led to the disclosure in question was a direct result ]of the defendant's unlawful detention; was tainted by the illegality of that detention; and violates the constitutional guarantee in the premises. [3] Even assuming that the defendant's apparent effort to conceal something in his mouth constituted probable cause for believing that he then had a narcotic in his possession (generally see People v. Tyler, 193 Cal.App.2d 728, 732 [14 Cal.Rptr. 610]), his actions were prompted by the threat of an obviously impending search of his person which, under the circumstances of this case, would have been unlawful because directly related to his unlawful detention; were the result of a type of coercion; and may not be relied upon to justify the search actually made. (Walder v. United States, 347 U.S. 62, 64 [74 S.Ct. 354, 98 L.Ed. 503, 509]; People v. Dixon, 46 Cal.2d 456, 458 [296 P.2d 557]; Badillo v. Superior Court, supra, 46 Cal.2d 269, 273; People v. Macias, supra, 180 Cal.App.2d 193, 198; Gascon v. Superior Court, supra, 169 Cal.App.2d 356, 359; United States v. Dixon, 117 F.Supp. 925, 927; People v. Stewart, 232 Mich. 670 [206 N.W. 337, 338].)
 In support of the judgment, the respondent contends that prisoners in a jail may be subjected to a search at any time as a disciplinary measure and security precaution, citing People v. Pope, 168 Cal.App.2d 666 [366 P.2d 236]; that where the right to search exists independently of any unlawful detention, it is proper even though conducted while the subject of the search is unlawfully detained (see e.g., People v. Walker, 203 Cal.App.2d 552, 556-557 [21 Cal.Rptr. 692], and *139 cases therein cited); that evidence relating the conduct of a defendant allegedly induced by the unlawful act of law enforcement officers but shown not to be a result thereof, is admissible, citing People v. Melody, 164 Cal.App.2d 728, 734 [331 P.2d 72]; People v. Ambrose, 155 Cal.App.2d 513, 524 [318 P.2d 181]; that a person who commits an offense while unlawfully detained in custody is not immune from prosecution therefor, citing People v. Jones, 163 Cal.App.2d 118, 121-122 [329 P.2d 37]; and that a person lawfully incarcerated is not afforded many of the rights and privileges to which he otherwise might be entitled. (Lanza v. New York, 370 U.S. 139, 142 [82 S.Ct. 1218, 8 L.Ed.2d 384]; Price v. Johnston, 334 U.S. 266, 284 [68 S.Ct. 1049, 92 L.Ed. 1356]; People v. Morgan, 197 Cal.App.2d 90, 93 [16 Cal.Rptr. 838]; Davis v. Superior Court, 175 Cal.App.2d 8, 20 [345 P.2d 513].) [4] These contentions are not applicable to the case at bar; the defendant was not lawfully in custody and consequently was not subject to the status of a prisoner; the impending search of his person, justifiable on the ground that he was a prisoner, was not justifiable in the absence of such status; his disclosure indicating the presence of contraband on his person was the immediate product of the impending unlawful search and of his unlawful detention in custody purportedly authorizing the same; and the issue at hand does not involve a determination respecting the legality of his conduct but of the legality of the conduct of the officers who searched him while he was unlawfully detained in jail; or stated otherwise, the question for decision is not whether the defendant committed the offense with which he is charged, but whether the evidence offered in proof of that offense was obtained in a lawful manner.
 The judgment is reversed. The attempted appeal from the order denying the motion for a new trial is dismissed.
 Griffin, P. J., and Brown (G.), J., concurred.
