
153 Cal.App.3d 353 (1984)
200 Cal. Rptr. 310
THE PEOPLE, Plaintiff and Respondent,
v.
LUIS URENA ROSALES, Defendant and Appellant.
Docket No. 6479.
Court of Appeals of California, Fifth District.
February 22, 1984.
*357 COUNSEL
Kent A. Davidson, under appointment by the Court of Appeal, for Defendant and Appellant.
John K. Van de Kamp, Attorney General, Daniel J. Kremer, Chief Assistant Attorney General, Arnold O. Overoye, Assistant Attorney General, Paul V. Bishop and Thomas R. Yanger, Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
ZENOVICH, J.
Luis Urena Rosales appeals the judgment entered after the trial court, sitting without a jury, convicted him of burglary in the first degree. (Pen. Code, § 459.)

SUMMARY OF THE EVIDENCE AND PROCEEDINGS[1]
On March 23, 1982, at sometime between 3 p.m. and 4 p.m., Doris Dayton left her residence at 418 West Harding Road in Turlock and did not return until approximately 2:30 p.m. the next day. Upon her return on the afternoon of March 24, 1982, Dayton found her hoses out in the road, her back door, as well as her freezer door, open, screens off the doors and a broken window. Dayton also discovered that a number of items of personal property were missing from her house.
*358 At approximately 3:30 p.m. that same afternoon (Mar. 24) Lieutenant Herb Wilkerson, a specialist in fingerprint dusting, and Deputy Hans Bosma, both of the Stanislaus County Sheriff's Department, responded to a call from Dayton reporting a burglary at her house. An investigation of the scene was made and Lieutenant Wilkerson dusted and obtained latent fingerprints from a rear window near a rear door of the house. Deputy Bosma took notes of the items missing from Dayton.
Alice Johnson, Dayton's next door neighbor, testified that sometime between 4 and 5 p.m. in the afternoon of March 23 she noticed a 1960's model blue Ford, with painted figures on the side and occupied by at least four people of Hispanic descent, turn around in her driveway and then drive into the Dayton yard and stop. Ms. Johnson testified that one of the occupants went to the door of the Dayton house, appeared to knock and then got back in the car. Ms. Johnson next observed the same car through binoculars at approximately 11 or 11:30 p.m. on the evening of March 23 parked for about 45 minutes in an alfalfa field situated between her house and the Dayton house. No one was seen getting out of the vehicle.
Apparently, sometime after Dayton's return on the afternoon of the 24th, she was visited by her neighbor, Ms. Johnson's husband, Steven D. Johnson. Mr. Johnson told Dayton of the car he had seen the evening before and gave her a description of the car as a light blue 1960's Ford.
Later, on the evening of the 24th at approximately 9:30 p.m., Mr. Johnson observed the same 1960's blue Ford he had seen on the evening of March 23 parked in some bamboo up the road from the Dayton residence at 418 West Harding Road. Dayton arrived at the Johnson house and Mr. Johnson informed her that he had telephoned the sheriff. Mr. Johnson verified to Dayton that the car parked there was the same car he had described earlier in the afternoon.
When the blue Ford began to leave the area, Dayton and a friend followed it until it parked in a driveway on Soderquist Street and her friend wrote down the car's license number, NHN 467. Dayton observed three or four occupants in the vehicle. Dayton reported the incident and license number to Deputy Bosma.
Deputy Bosma took the license number NHN 467 and ran a check with Sacramento to ascertain ownership. The check showed that the license number was registered to appellant at a Century Boulevard address in Turlock. Deputies Bosma and Louis Saldivar went to 4713 South Soderquist and spoke with Zeferino Zapata at his residence. Deputy Saldivar was informed by Zapata that the Ford vehicle might be found at the rear of an apartment at 953 Ninth Street in Turlock. Saldivar then proceeded to the above address where he observed a 1960's blue Ford parked and then left.
*359 Approximately 35 minutes later, Saldivar returned with several other officers, one of whom was Corporal Bob Holloway, to 953 Ninth Street. One of the officers knocked at the door of the apartment and it was answered by an elderly Mexican male who told them that no one by the name of Luis Rosales (appellant) lived there. The man offered to let them in and Saldivar and Holloway entered, not finding anyone for whom they were looking.
Saldivar then questioned a younger white male inside the apartment. This man told Saldivar that appellant could be found in an upstairs apartment to which he pointed from below. Saldivar and Holloway climbed the stairs to the apartment, noticing that the front door was wide open and, in making their approach, viewed some property inside the apartment. Specifically, a woman's purse and a brown square electrical heater which had been verbally described to Saldivar earlier by Deputy Bosma were observed. The officers also observed two people lying on a bed from the open door. They entered the apartment without a search warrant for the purpose of confiscating the property. Saldivar further testified that Zapata had told him a man named Luis, described as a thin, dark-complected man about six feet tall and nicknamed Cholo, who was driving the blue Ford, had offered to sell him guns. Thus, Deputy Saldivar personally believed that he might incur physical injury if his presence were to become known. Saldivar did not recognize either of the men on the bed as fitting the description given to him nor from any prior contact. After entry into the apartment, the two men, appellant and Fernando Garcia, were checked for weapons, handcuffed, arrested and placed in the back seat of the patrol car. Appellant was taken to the Stanislaus County jail, where he was booked and given a palm print test.
Saldivar returned to the downstairs apartment and questioned Francisco Tonari regarding a small brown jewelry box which Saldivar believed to be stolen property. Tonari indicated that he had gotten the box from Rigo Tovar (defendant Estrada) who was also standing in the room. Defendant Tovar/Estrada was arrested and placed in the patrol car.
Holloway and Saldivar then went to two bars on First Street and located no other suspects. The officers returned to the Ninth Street apartment and noticed a vehicle with four occupants slow down as they passed by. The officers then followed the vehicle and detained it. Following questioning without being read their Miranda rights, codefendants Hernandez and Sanches were arrested. The stop was found to be without probable cause and, thus, the magistrate found it to be illegal.
The prosecution submitted the case to the magistrate on the evidence as to defendants Estrada, Hernandez, Sanches and Garcia. The motion to suppress the evidence as to the above named codefendants was granted and they were discharged.
*360 The magistrate ruled that the entry into the apartment at Ninth Street was unlawful. The search and seizure of evidence was illegal. It further ruled that the arrest of appellant was illegal. With respect to the motion to suppress evidence as to appellant, the motion was granted and included suppression of all evidence inside the Ninth Street apartment as well as the observations. The preliminary hearing then continued.
Steven Smith, a Stanislaus County deputy sheriff with expertise in fingerprint comparison, testified that the palm print taken from the rear window of the Dayton house and the imprint taken of appellant in the county jail were the same.
The magistrate, finding probable cause, held appellant to answer to the burglary charge alleged and ordered him to appear for arraignment in superior court. The court based its decision on the fact that there was sufficient evidence to indicate (1) a crime had been committed and (2) the palm print of appellant showed he was probably guilty.
At trial, appellant's counsel moved under Penal Code section 1538.5, subdivision (h),[2] to suppress appellant's palm print taken after his arrest. The court denied the motion without a hearing because it believed that even if it were to grant the motion, it could then order appellant to submit to a new palm print test. Defense counsel then made a motion to be relieved as appellant's counsel on the basis that he had been ineffective counsel to appellant at the preliminary hearing. Defense counsel stated he did not make the motion at the preliminary hearing because he did not then realize it was the fruit of appellant's illegal arrest. The court also denied this motion, finding that counsel's failure to make a timely motion as to the palm print in municipal court was harmless error since it believed that the municipal court has jurisdiction to make appropriate orders such as requiring a defendant to give an exemplar of his fingerprints.

DISCUSSION
Appellant contends that he was (1) denied effective assistance of counsel because his trial counsel failed to move to suppress his palm print at the preliminary hearing and (2) that the trial court erred in denying counsel's claim that he had been ineffective counsel to appellant.
(1) The standard of review of ineffective assistance claims was set forth in People v. Pope (1979) 23 Cal.3d 412, 425-426 [152 Cal. Rptr. 732, 590 *361 P.2d 859, 2 A.L.R.4th 1] as follows: "Of course, the burden of proving a claim of inadequate trial assistance is on the appellant. [Citation.] Thus, appellant must show that trial counsel failed to act in a manner to be expected of reasonably competent attorneys acting as diligent advocates. In addition, appellant must establish that counsel's acts or omissions resulted in the withdrawal of a potentially meritorious defense.
"Once an appellant has met these burdens, the appellate court must look to see if the record contains any explanation for the challenged aspect of representation. If it does, the court must inquire whether the explanation demonstrates that counsel was reasonably competent and acting as a conscientious, diligent advocate. (2) For example, where the record shows that counsel's omissions resulted from an informed tactical choice within the range of reasonable competence, the conviction must be affirmed. [Citation.] In contrast, where the record shows that counsel has failed to research the law or investigate the facts in the manner of a diligent and conscientious advocate, the conviction should be reversed since the defendant has been deprived of adequate assistance of counsel. [Citation.]"
(3) Respondent concedes that trial counsel failed to act as a reasonably competent attorney; however, respondent contends that this failure did not result in a withdrawal of a potentially meritorious defense. On this point, respondent merely echoes the trial court's statement that had the court suppressed the tainted palm print it could have ordered appellant to provide a new sample in the same breath.
Under Pope, supra, we must examine the record to see if it contains an explanation for the challenged aspect of the representation. Here, the record indicates that the reason trial counsel failed to include the palm print in his motion to suppress at the preliminary hearing was that he was unaware of the case law which would have supported suppression of the print. Had defense counsel been aware of the case law, he would have found that fingerprint exemplars obtained during custody attributable to an illegal arrest are considered "tainted" by the illegal arrest and are properly excludable on Fourth Amendment grounds. (Davis v. Mississippi (1969) 394 U.S. 721, 724 [22 L.Ed.2d 676, 679, 89 S.Ct. 1394]; see People v. Sesslin (1968) 68 Cal.2d 418, 427 [67 Cal. Rptr. 409, 439 P.2d 321].) Pope, supra, specifically states that failure to research the law satisfies the first prong of the incompetence test, i.e., whether "trial counsel failed to act in a manner to be expected of reasonably competent attorneys acting as diligent advocates." (People v. Pope, supra, 23 Cal.3d 412, 425.) Thus, reviewing the record before us, we conclude that trial counsel was ineffective in failing to move to suppress the palm print at the preliminary hearing.
*362 (4a) We next examine whether appellant was deprived of a potentially meritorious defense by counsel's inadequate representation. To determine this, we must first examine what would have happened if defense counsel had included the palm print in his motion to suppress at the preliminary hearing. As noted in our summary of the evidence and proceedings, the magistrate found appellant's arrest illegal and suppressed a number of items which were "tainted" by the illegal arrest. The palm print exemplar was made after the arrest and, so far as can be discerned from the record, was a direct result of the arrest. There is no evidence on the record before us that the palm print was in any way given freely and voluntarily so as to dissipate the taint which flowed from the illegal arrest. (Wong Sun v. United States (1963) 371 U.S. 471, 488 [9 L.Ed.2d 441, 455, 83 S.Ct. 407].)
In Davis v. Mississippi, supra, 394 U.S. 721, where fingerprints were taken after an unlawful arrest, and where no claim was made that the defendant voluntarily and willingly submitted to the fingerprinting, the court reversed, holding the prints should have been suppressed. (Id., at pp. 726-728 [22 L.Ed.2d at pp. 680-681].) On the record before us we conclude that, had the motion been made and had the magistrate been apprised of the Davis case, the palm print would have been suppressed along with the other evidence.
(5) In explaining the potentially meritorious-defense standard, the Pope court stated, "[a] crucial defense is not necessarily one which, if presented, `would result inexorably in a defendant's acquittal.' [Citations.]" (People v. Pope, supra, 23 Cal.3d 412, 425, fn. 15.) Later, in In re Hall (1981) 30 Cal.3d 408, 434 [179 Cal. Rptr. 223, 637 P.2d 690], the court stated, "We need not decide, of course, whether the allegations of suggestiveness are true or whether, if true, they constitute a denial of due process. It is sufficient for the present purpose to observe that the defense was potentially meritorious, and that petitioner was denied an adjudication on the matter because of his counsel's inadequate factual and legal preparation." (Italics in original.) (4b) Thus, under Pope and Hall, supra, we conclude appellant was deprived of a potentially meritorious defense. (6) However, this does not end the inquiry of whether appellant is entitled to reversal of the judgment since the alleged incompetence occurred at the preliminary hearing compelling application of People v. Pompa-Ortiz (1980) 27 Cal.3d 519 [165 Cal. Rptr. 851, 612 P.2d 941] which requires the application of the "prejudicial error" standard instead of the "potentially meritorious defense" standard of Pope.
In Pompa-Ortiz, the Supreme Court held that "[h]enceforth irregularities in the preliminary examination procedures which are not jurisdictional in the fundamental sense shall be reviewed under the appropriate standard of *363 prejudicial error and shall require reversal only if defendant can show that he was deprived of a fair trial or otherwise suffered prejudice as a result of the error at the preliminary examination." (Id., at p. 529.) Thus, unlike the Pope standard, Pompa-Ortiz requires a showing of actual prejudice to the defendant.
Pompa-Ortiz further stated: "... even in a situation as extreme as the denial of counsel, the U.S. Supreme Court has held that the harmless error rule is applicable. (See Coleman v. Alabama (1970) 399 U.S. 1, 11 [26 L.Ed.2d 387, 90 S.Ct. 1999].) In Coleman, the court first held that the preliminary examination was a critical stage in the proceedings [sic] requiring the appointment of counsel. The court then remanded to the state courts to determine whether defendant was prejudiced at trial by denial of counsel at the preliminary examination." (Id., at p. 530.)
(7a) The significant issue in this case is whether the magistrate could have ordered appellant to submit to a new palm print test at the preliminary hearing. This is so because, but for counsel's incompetence, appellant would not have been held to answer in the superior court.
In People v. Solomon (1969) 1 Cal. App.3d 907 [82 Cal. Rptr. 215], the defendant's arrest was ruled illegal and evidence obtained as a direct result was suppressed in the course of pretrial hearings. On appeal, the defendant contended that fingerprint evidence should not have been allowed at trial since his prints were taken following an arrest judicially declared to be illegal and, therefore, in violation of his Fourth Amendment rights. However, the prints were taken from the defendant at the jail after he had been bound over for trial at a preliminary hearing and arraigned. The Court of Appeal held that defendant's "Fourth Amendment rights were not violated when the police took samples of his fingerprints during a judicially authorized detention." (Id., at p. 910, italics added.)
Similarly, in Fogg v. Superior Court (1971) 21 Cal. App.3d 1 [98 Cal. Rptr. 273], the defendant contended the fingerprints obtained from him at the preliminary hearing were obtained during an illegal detention. Although the Court of Appeal held that the arrest warrant was defective and therefore the arrest was illegal, the court also held that the prints were not obtained during an illegal detention because defendant was serving a prison sentence on another case at the time of the preliminary hearing. As such, the prints were legally obtained and could be used against the defendant at trial, even assuming that an illegally obtained set first revealed the defendant as a suspect. (Id., at p. 7.)
In Davis v. Mississippi, supra, 394 U.S. 721, 727 [22 L.Ed.2d 676, 681], the Supreme Court held that "[d]etentions for the sole purpose of obtaining *364 fingerprints are ... subject to the constraints of the Fourth Amendment." In dictum, the court stated that because fingerprinting may be scheduled for a time convenient to the citizen, "the general requirement that the authorization of a judicial officer be obtained in advance of detention would seem not to admit of any exception in the fingerprinting context." (Id., at pp. 727-728 [22 L.Ed.2d at p. 681].) Justice Stewart dissented to the reversal of judgment in Davis on the basis that it would be a useless gesture since the victim had already positively identified the defendant at trial and, therefore, there existed ample probable cause to detain him and take his fingerprints again. (Id., at p. 730 [22 L.Ed.2d at p. 683].) Reversal of the judgment in this case would not be a useless gesture.
(8), (9) Under Davis, Solomon and Fogg, two rules emerge: (1) to be admissible, fingerprints must be obtained voluntarily or pursuant to a lawful detention based on probable cause; (2) suppression of an unlawfully obtained fingerprint exemplar is not a bar to use of a fingerprint exemplar which has been previously or subsequently obtained lawfully. (7b) Here, had the palm print been included in the suppression motion, the magistrate's only choice would have been to discharge appellant. To continue his detention after suppression of his palm print would have been a detention without probable cause  an unlawful detention. Thus, under Davis, supra, an order by the magistrate that appellant submit to another palm print test under these circumstances would not have met the required constitutional standard. We thus conclude that the trial court was incorrect when it concluded that the magistrate could have ordered appellant to submit to a palm print test even if it had suppressed the print taken after the illegal arrest since such an order would have been made without probable cause.
(10) Penal Code section 995 provides in pertinent part: "[T]he ... information shall be set aside by the court in which the defendant is arraigned, upon his or her motion, in ... the following cases: ... (2) [¶] ... (B) That the defendant had been committed without reasonable or probable cause." Although we have determined that, but for appellant's counsel's incompetence, appellant would not have been committed to the superior court based on the evidence taken at the preliminary hearing, this does not mean that the information may be set aside pursuant to a Penal Code section 995 motion. As the trial court correctly noted, absent appellant's objection, the magistrate properly considered the palm print in evidence and, therefore, lawfully committed appellant based on probable cause. Absent error by the magistrate, a Penal Code section 995 motion should be denied. (See Robison v. Superior Court (1957) 49 Cal.2d 186, 187-188 [316 P.2d 1].)
Appellant, however, was not without a remedy for his counsel's inadequateness at the preliminary hearing. Appellant could have made a suppression *365 motion in superior court pursuant to Penal Code section 1538.5, subdivision (f),[3] and, as noted earlier (fn. 2, supra), appellant could also, under appropriate circumstances, make a suppression motion at trial (as he did do) pursuant to subdivision (h) of Penal Code section 1538.5.
(7c) We conclude the trial court erroneously failed to grant appellant's request for a suppression hearing on the admissibility of his palm print. The judgment must be reversed under Davis v. Mississippi, supra, 394 U.S. 721, 727 [22 L.Ed.2d 676 at p. 681] because, so far as we can tell from the record, the palm print used to convict appellant was tainted by his unlawful arrest. (11) Although we have reviewed the evidence taken at the preliminary hearing on the issue of whether the palm print was tainted for the purpose of determining if appellant was prejudiced by his counsel's ineffectiveness, since the issue was never tendered, the prosecution is not precluded from presenting evidence at a new suppression hearing that the "taint" which flowed from the illegal arrest had dissipated. (Wong Sun v. United States, supra, 371 U.S. 471, 488 [9 L.Ed.2d 441, 455-456].)
(12) Because it is likely to arise again after the suppression hearing, we address the question of whether the trial court may order appellant to submit to a new palm print test if it decides to suppress the original palm print taken after appellant's illegal arrest. To dispose of this issue, it is necessary to examine the decision in People v. Solomon, supra, 1 Cal. App.3d 907.
Preliminarily, we note that this case is distinguishable from Solomon in that the print was taken after an unlawful arrest and not after "a judicially authorized detention." (Id., at p. 910.) However, since we have concluded that appellant was lawfully committed to the superior court, it appears that, under Solomon, a reversal would be a useless gesture if the trial court may order appellant to submit to a new print test.
The Solomon case does not indicate whether the defendant even made a suppression motion at his preliminary hearing. Thus, the appellate court was not faced with the question of what remedy a defendant whose counsel was ineffective at the preliminary hearing is entitled to where the denial of a substantial right has directly led to his lawful commitment to the superior court. Thus, to the extent Solomon is authority for the proposition that, under any circumstances, a superior court may order a defendant to submit to fingerprinting, we do not follow it.
*366 Instead, we believe that, in a rare situation such as this, the trial court must independently determine whether there is probable cause to believe the defendant committed the charged offense before it may order him to submit to fingerprinting. (Davis v. Mississippi, supra, 394 U.S. 721, 727 [22 L.Ed.2d 676, 681].) To hold otherwise would render appellant's right to the effective assistance of counsel at all critical stages of the proceedings meaningless and would impose an onerous result on appellant who, through no fault of his own, was convicted on evidence which should never have been admitted.
The judgment is reversed.
Franson, Acting P.J., and Gallagher, J.,[*] concurred.
NOTES
[1]  Taken from the preliminary hearing and supplemented by evidence presented at the trial.
[2]  Penal Code section 1538.5, subdivision (h), provides: "If, prior to the trial of a felony or misdemeanor, opportunity for this motion did not exist or the defendant was not aware of the grounds for the motion, the defendant shall have the right to make this motion during the course of trial in the municipal, justice or superior court."
[3]  Penal Code section 1538.5, subdivision (f), provides: "If the property or evidence relates to a felony offense initiated by a complaint, the motion shall be made in the superior court only upon filing of an information, except that the defendant may make the motion at the preliminary hearing in the municipal or justice court but the motion in the municipal or justice court shall be restricted to evidence sought to be introduced by the people at the preliminary hearing."
[*]   Assigned by the Chairperson of the Judicial Council.
