
58 Cal.Rptr.3d 60 (2007)
149 Cal.App.4th 1294
The PEOPLE, Plaintiff and Respondent,
v.
Phillip Anthony KROHN, Defendant and Appellant.
No. G036762.
Court of Appeal of California, Fourth District, Division Three.
March 28, 2007.
*61 Correen Ferrentino, Costa Mesa, under appointment by the Court of Appeal, for Defendant and Appellant.
Bill Lockyer and Edmund G. Brown, Jr., Attorneys General, Mary Jo Graves, Chief Assistant Attorney General, Gary W. Schons, Assistant Attorney General, Scott C. Taylor, Deputy Attorney General, for Plaintiff and Respondent.

OPINION
IKOLA, J.
Defendant Phillip Anthony Krohn challenges his conviction for possession for sale of a controlled substance and possession of marijuana. He contends the court wrongly denied his motion to suppress the evidence related to the drugs because the police acquired the evidence as the result of an illegal detention. We agree. The officer detained defendant because he suspected defendant was illegally drinking alcohol in a public place, but the suspicion was unreasonable. Defendant was detained inside his gated apartment complex, which was not readily accessible to the public. Thus, the officer lacked reasonable suspicion defendant was drinking alcohol in a public place. We reverse and remand with directions for the court to grant defendant's motion.

FACTS
An investigation led a Tustin police officer to a gated, two-story apartment complex in Tustin. The front entryway to the apartment complex's courtyard is guarded by a tall, metal fence with spikes on top. In the middle of the fence is a circular gate. The gate has a lock, which requires a key or code to open. The gate, when closed, automatically locks. Because the gate automatically locks, it is often propped open. The rear of the apartment complex's courtyard leads through another gate to a private parking area with garages and parking stalls. Automobile access to the parking area from the street is protected by an electric gate extending across the driveway. The gate has spikes on top. It has signs indicating unauthorized cars will be towed away. The gate requires a remote control or key to open. It shuts automatically after a car passes through, then automatically locks.
The driveway to the private parking area was blocked by the electric gate when the officer arrived. He used his emergency access key to open the gate. After he *62 drove his car into the parking area, the gate automatically shut. The officer found a car related to his investigation. The car was illegally parked in a handicapped stall, so he issued it a parking citation.
The officer saw defendant carrying a garbage bag and a beer can down an external flight of stairs connecting the second-story breezeway to the ground-floor courtyard. The stairs led to the rear of the courtyard, toward the rear gate and the parking area.[1] The parking area contained at least one trash dumpster.
The officer did not see defendant drink from the beer can. The officer was too far away to notice whether defendant smelled of alcohol. The officer could not determine whether the can still contained any beer.
Nonetheless, the officer directed defendant to come to him. Defendant got a nervous look on his face, hesitated, and started back up the stairs. The officer told him, "No, come here." The officer gestured with his hand to direct defendant to approach him. Defendant complied. As defendant approached the officer, he crushed the beer can in his hand, spilling some liquid. The officer asked defendant if he had any weapons or drugs on him. Defendant replied he had drugs. The officer asked to search defendant, and defendant said, "Yeah."
The officer found three clear plastic bags in defendant's pocket. One bag contained several smaller bags containing methamphetamine. The second bag contained marijuana. The third bag contained six Vicodin pills. The officer arrested defendant. A pre-booking search revealed more methamphetamine in defendant's shoe.
The district attorney filed an information charging defendant with one count each of possession for sale of a controlled substance (Health & Saf.Code, § 11378),[2] possession of a controlled substance (§ 11350, subd. (a)), and possession of marijuana (§ 11357, subd. (b)).
Defendant moved to suppress the drugs, contending they were found as a result of an illegal detention. At the hearing, the prosecutor conceded the officer had detained defendant by instructing him to approach. But he argued the detention was lawful because the officer reasonably suspected defendant had been illegally drinking alcohol in a public place. The prosecutor stressed the automatically-locking front entryway gate was often propped open.
The court denied the motion. Defendant pleaded guilty to possession for sale of a controlled substance and possession of marijuana. The court dismissed the possession of a controlled substance count. The court sentenced defendant to two years in state prison.

DISCUSSION
"On review of a motion to suppress, we defer to the trial court's factual findings, where supported by substantial evidence, but must independently assess, as a question of law, whether under the facts as found the challenged search and seizure conforms to the constitutional standards of reasonableness." (People v. Franklin (1987) 192 Cal.App.3d 935, 939, 237 Cal. Rptr. 840.)
*63 The Attorney General concedes, as did the prosecution below, the police officer detained defendant when he ordered defendant to come down the stairs and approach him. "[T]he police can stop and briefly detain a person for investigative purposes if the officer has a reasonable suspicion supported by articulable facts that criminal activity `may be afoot,' even if the officer lacks probable cause." (U.S. v. Sokolow (1989) 490 U.S. 1, 7, 109 S.Ct. 1581, 104 L.Ed.2d 1 (Sokolow), quoting Terry v. Ohio (1968) 392 U.S. 1, 30, 88 S.Ct. 1868, 20 L.Ed.2d 889.)
The only suspected criminal activity here was drinking alcohol in a public place. A local ordinance provides, "It shall be unlawful for any person to drink any alcoholic beverage on any ... public place ... in the City...." (Tustin Mun.Code, § 6310.)[3] Thus, the issue is whether the courtyard of defendant's gated apartment complex is a "public place." Three main public intoxication cases have considered what constitutes a public place.
The term "public place" generally means "a location readily accessible to all those who wish to go there...." (People v. Perez (1976) 64 Cal.App.3d 297, 301, 134 Cal. Rptr. 338 (Perez ).) The key consideration is whether a member of the public can access the place "without challenge." (People v. Olson (1971) 18 Cal.App.3d 592, 598, 96 Cal.Rptr. 132.) Thus, the Olson court considered a house's front yard to be a public place because "defendant, a complete stranger to [the homeowner], was able to walk through the outside area of her home to the front door without challenge." (Ibid.)
In contrast, a location guarded by a fence or locked door is not readily accessible to the public, and is not a public place. In People v. White (1991) 227 Cal.App.3d 886, 278 Cal.Rptr. 48 (White), the court refused to deem another house's front yard a public place because it was "surrounded by a three-and-a-half foot-high fence with a gate which was unlocked at the time." (Id. at p. 892, 278 Cal.Rptr. 48.) It noted "the fence, gate, and [three pet] dogs all provided challenge to public access. (Ibid.) And an interior hallway of an apartment building was considered to be a public place because "[t]here were no locked gates or doors to keep the public from entering" it. (Perez, supra, 64 Cal. App.3d at p. 301,134 Cal.Rptr. 338.)
Here, nothing reasonably suggests the apartment complex's courtyard is a public place. Rather, the record amply supports defense counsel's characterization of the courtyard as "well fortified." The front entryway is guarded by an imposing metal fence and an automatically-locking gate. Nothing in the record suggests the gate was open when the officer detained defendant. The driveway to the private parking area behind the courtyard is guarded by an electric gate, which automatically closes and locks behind cars. The electric gate was closed when the officer arrived at the apartment; he had to use his emergency key to open it,
The fences and gates certainly "challenge" the public's access to the courtyard. (White, supra, 227 Cal.App.3d at p. 892, 278 Cal.Rptr. 48.) This is true even if the front gate is periodically propped open. (See ibid, [fence and unlocked gate challenged access]; cf. Perez, supra, 64 Cal. App.3d at p. 301, 134 Cal.Rptr. 338 [apartment hallway with "no locked gates or doors" did not challenge access].) The courtyard is not readily accessible to the *64 public. It is not a public place. Thus, even if the officer reasonably suspected defendant was drinking beer in the courtyarditself a doubtful propositionthe officer had no reason to suspect defendant was doing so in a public place.
Because the officer had no reasonable suspicion defendant was engaged in criminal activity, he had no right to detain him. (See Sokolow, supra, 490 U.S. at p. 7, 109 S.Ct. 1581.) The officer's illegal detention of defendant vitiated any subsequent consent to the interrogation and search. (Florida v. Royer (1983) 460 U.S. 491, 501, 103 S.Ct. 1319, 75 L.Ed.2d 229 ["statements given during a period of illegal detention are inadmissible even though voluntarily given if they are the product of the illegal detention"].) The drugs found on defendant at the apartment complex and at the pre-booking search thus are fruits of a poisonous tree. (Ibid.; see also Wong Sun v. United States (1963) 371 U.S. 471, 484-488, 83 S.Ct. 407, 9 L.Ed.2d 441.) The court should have suppressed them.

DISPOSITION
The judgment is reversed. The matter is remanded to the court with directions to grant defendant's motion to suppress.
WE CONCUR: SILLS, P.J., and RYLAARSDAM, J.
NOTES
[1]  The rear gate was open at the time. The officer, being in the rear of the apartment complex, did not notice whether the front entryway gate was propped open or closed at the time.
[2]  All further statutory references are" to the Health and Safety Code unless otherwise stated.
[3]  We grant defendant's unopposed request to take judicial notice of the ordinance's legislative history.
