
15 Cal.4th 264 (1997)
THE PEOPLE, Plaintiff and Respondent,
v.
RAUL MENDOZA TELLO, Defendant and Appellant.
Docket No. S055184.
Supreme Court of California.
April 17, 1997.
*265 COUNSEL
Michaelyn Jones, under appointment by the Supreme Court, for Defendant and Appellant.
*266 John T. Philipsborn as Amicus Curiae on behalf of Defendant and Appellant.
Daniel E. Lungren, Attorney General, George Williamson, Chief Assistant Attorney General, Gary W. Schons, Assistant Attorney General, Jean Hume, Esteban Hernandez and Janelle Marie Boustany, Deputy Attorneys General, for Plaintiff and Respondent.
Kent S. Scheidegger and Eric L. Christoffersen as Amici Curiae on behalf of Plaintiff and Respondent.
OPINION
CHIN, J.
A jury convicted defendant of possessing cocaine. Orange County Deputy Sheriff Gomez testified at trial that on October 26, 1994, while on patrol in an unmarked car, he saw the passenger of another car light a marijuana cigarette. He stopped the car and asked defendant, the driver, for his driver's license and registration. Defendant consented to a search of the car. Deputy Gomez testified, "I had him exit the car. At this point I wanted to conduct a physical search of him for more marijuana and/or weapons for officer safety." He told defendant to turn around and put his hands behind his back. When defendant did so, a vial of cocaine fell from his right pant leg.
Defense counsel did not move under Penal Code section 1538.5 to suppress evidence. On appeal, defendant argued counsel was ineffective for not making the motion. A divided Court of Appeal agreed and reversed the judgment. Based solely on the trial record, it concluded that Deputy Gomez violated the law when he commanded defendant to submit to a patdown search, and that the cocaine evidence should have been suppressed.
(1a) We disagree. "Because the legality of the search was never challenged or litigated, facts necessary to a determination of that issue are lacking." (People v. Cudjo (1993) 6 Cal.4th 585, 627 [25 Cal. Rptr.2d 390, 863 P.2d 635].) The issue at trial was whether defendant possessed cocaine, not whether the deputy acted unlawfully. (2) We have repeatedly stressed "that `[if] the record on appeal sheds no light on why counsel acted or failed to act in the manner challenged[,] ... unless counsel was asked for an explanation and failed to provide one, or unless there simply could be no satisfactory explanation,' the claim on appeal must be rejected." (People v. Wilson (1992) 3 Cal.4th 926, 936 [13 Cal. Rptr.2d 259, 838 P.2d 1212], quoting People v. Pope (1979) 23 Cal.3d 412, 426 [152 Cal. Rptr. 732, 590 P.2d 859, 2 A.L.R.4th 1].) A claim of ineffective assistance in such a case is *267 more appropriately decided in a habeas corpus proceeding. (People v. Wilson, supra, at p. 936; People v. Pope, supra, at p. 426.) "We recommended in Pope that, `[t]o promote judicial economy in direct appeals where the record contains no explanation, appellate counsel who wish to raise the issue of inadequate trial representation should join a verified petition for writ of habeas corpus.'" (People v. Wilson, supra, at p. 936, quoting People v. Pope, supra, at pp. 426-427, fn. 17.) Because claims of ineffective assistance are often more appropriately litigated in a habeas corpus proceeding, the rules generally prohibiting raising an issue on habeas corpus that was, or could have been, raised on appeal (see In re Harris (1993) 5 Cal.4th 813, 824-841 [21 Cal. Rptr.2d 373, 855 P.2d 391]; In re Waltreus (1965) 62 Cal.2d 218, 225 [42 Cal. Rptr. 9, 397 P.2d 1001]; In re Dixon (1953) 41 Cal.2d 756, 759 [264 P.2d 513]) would not bar an ineffective assistance claim on habeas corpus.
(1b) Here, we do not know why counsel failed to move to suppress evidence. As Justice Rylaarsdam noted in dissent below, "Additional facts, irrelevant to the issues at the trial and possibly prejudicial to appellant, may very well have justified the officer's conduct and counsel's decision not to attack the validity of the search." The majority below found that defendant's "claim is cognizable on appeal because there is a detailed factual record upon which to review his claim." It also stated, however, that Deputy "Gomez simply assumed Tello might be armed without pointing to any specific and articulable facts justifying his belief." This statement was itself merely an assumption. No one asked the question  irrelevant at a trial of guilt  why Deputy Gomez wanted to conduct a patdown search. No one gave him the opportunity to point to any specific and articulable facts justifying his actions. Nor did the prosecution have the opportunity to offer some other possible reason not to suppress the evidence. (See, e.g., Maryland v. Wilson (1997) ___ U.S. ___ [117 S.Ct. 882, 137 L.Ed.2d 41].)
Penal Code section 1538.5 provides an orderly procedure to move to suppress evidence at trial, which motion is a prerequisite to appellate review. (Pen. Code, § 1538.5, subd. (m).) On this record, we do not know what Deputy Gomez would have said had he been asked at a suppression hearing why he did what he did. Perhaps, as the majority below assumed, he would have had no good reason. But perhaps he did have a reason, of which defense counsel was aware, and which justified counsel's actions. Perhaps there was some other reason not to suppress the evidence. An appellate court should not declare that a police officer acted unlawfully, suppress relevant evidence, set aside a jury verdict, and brand a defense attorney incompetent unless it can be truly confident all the relevant facts have been developed and the police and prosecution had a full opportunity to defend the admissibility of the evidence. An example of when such a determination can be *268 made on appeal is found in People v. Camilleri (1990) 220 Cal. App.3d 1199 [269 Cal. Rptr. 862]. In that case, a full hearing on a Penal Code section 1538.5 suppression motion was held at trial. The Court of Appeal found that, under the precise circumstances, the superior court lacked jurisdiction to hold the hearing. It also found, however, that the record, including the hearing on the motion, was adequate to conclude that defense counsel ineffectively failed to make a proper suppression motion. (People v. Camilleri, supra, at p. 1203.)
The parties here discuss at length whether the evidence should have been suppressed. Rather than attempt to glean inferences from a record where the critical questions were irrelevant and unasked, we do not reach the merits of that issue.
The judgment of the Court of Appeal is reversed and the matter remanded to the Court of Appeal with directions to vacate its judgment and to consider any remaining issues on appeal.
George, C.J., Mosk, J., Kennard, J., Baxter, J., Werdegar, J., and Brown, J., concurred.
A petition for a rehearing was denied June 11, 1997, and the opinion was modified to read as printed above.
