Opinion
PUGLIA, P. J.—Defendant was charged with two counts of first degree burglary (Pen. Code, § 459). He moved to set aside the information (Pen. Code, § 995) on the ground that a violation of the witness exclusion order at his preliminary examination denied him a substantial right. The court granted the motion and dismissed the information, despite an express finding that defendant was not prejudiced by the violation. The People appeal. (Pen. Code, § 1238, subd. (a)(1).) (All further references to sections of an unspecified code are to the Penal Code.) We shall reverse the judgment of dismissal.
*540The felony complaint charged the identical burglaries which were later charged in the information. Before the commencement of the preliminary hearing, defendant moved “to exclude witnesses.” The magistrate ordered all witnesses other than the prosecutor’s designated “investigating officer” (§ 867) “to hold themselves available outside.”
The prosecutor called the two burglary victims in turn. The second victim, Dr. Mark Fletcher, testified that on November 30, 1983, his home was forcibly entered and property stolen from within.
At the conclusion of Fletcher’s testimony, defense counsel stated: “Your Honor, I think the record should reflect that the bailiff asked someone to leave who was in the courtroom during the testimony of Mark Fletcher. I think that person is going to turn out to be a witness. ” Counsel then advised: “Your Honor, I am not going to make an objection unless he appears as a witness.” Upon inquiry the magistrate determined that Police Officer Na-varra had been in the courtroom when the second witness, but not the first, had testified, and that the prosecutor intended to call Officer Navarra as a witness. Defense counsel then interjected: “My preference would be to wait and see what [Officer Navarra’s] testimony relates to before I make any further objection.” The magistrate concluded this was “fair” and the matter was dropped.
When Officer Navarra was called as a witness, his testimony concerned the investigation of the Fletcher burglary. The officer testified that he responded on November 30 to a report of burglary at the Fletcher residence, dusted for fingerprints, and obtained a latent impression from Fletcher’s bedroom.1 On cross-examination, defense counsel asked Navarra if he had heard Fletcher’s testimony, to which the officer replied, “I really wasn’t listening closely.”2
*541There was no farther reference at the preliminary hearing to Officer Na-varra’s brief presence in the courtroom during the testimony of the witness Fletcher, nor was there any objection to or motion to exclude or strike the officer’s testimony. We conclude that principles of waiver precluded defendant from securing a dismissal on account of the presence of Officer Navarra in the courtroom during the testimony of the witness Fletcher.
Section 867 provides that “While a witness is under examination, the magistrate shall, upon motion of either party, exclude all potential and actual witnesses who have not been examined.” (Stats. 1982, ch. 83, § 2; italics added.) The 1982 amendment to section 867 replaced the word “may (Stats. 1976, ch. 1178) with the word “shall.” Thus witness exclusion during the preliminary examination is now, on motion of either party, a matter of right.
The purpose behind section 867 “ ‘has always been to prevent the concocting of a charge against the defendant upon collusive or false testimony.’” (People v. Pompa-Ortiz (1980) 27 Cal.3d 519, 524 [165 Cal.Rptr. 851, 612 P.2d 941], quoting Code Commissioners com. appearing in Haymond & Burch Ann. Pen. Code (1872 ed.) § 868, p. 293.) The “efficacy of excluding or sequestering witnesses has long been recognized as a means of discouraging and exposing fabrication, inaccuracy, and collusion.” (Advisory Com. on Proposed Rules com. to Fed. Rules Evid., rule 615, 28 U.S.C.A., p. 833; see also Geders v. United States (1976) 425 U.S. 80, 87 [47 L.Ed.2d 592, 598, 96 S.Ct. 1330].)
Given that a primary object of preliminary examinations is to ‘“weed out groundless or unsupported charges of grave offenses, . . .’” (People v. Elliot (1980) 54 Cal.2d 498, 504 [6 Cal.Rptr. 753, 354 P.2d 225], overruled on other ground in People v. Pompa-Ortiz, supra, 27 Cal.3d at p. 529), witness separation is of more crucial importance at the preliminary examination than at trial. (Graham & Letwin, The Preliminary Hearings in Los Angeles: Some Field Findings and Legal-Policy Observations (1971) 18 UCLA L. Rev. 636, 655.) Thus at trial, the court retains discretion to decide~whether prior to his testimony a witness should be precluded from hearing the testimony of another witness. (Evid. Code, *542§ 777; see People v. Ong Git (1913) 23 Cal.App. 148, 152-153 [137 P. 283].)
Section 867 is silent on the effect of a witness’ noncompliance with an exclusion order. Here the magistrate complied with section 867 by ordering exclusion of witnesses at defendant’s request. While the magistrate had no discretion to deny the motion to exclude witnesses, fidelity to the policy underlying section 867 does not require dismissal in every case where the order of exclusion has been violated through no fault of the magistrate.3 Indeed, such a drastic remedy would turn the truth finding purpose of the witness exclusion rule on its head. The purpose of witness exclusion may be adequately served by means short of dismissal, such as by holding the offending witness in contempt or excluding or striking his testimony in whole or in part. (See Fed. Rules Evid., rule 615, 28 U.S.C.A.; Weinstein’s Evidence (1976) [¶] 615[03], p. 615-14, and cases cited therein; see also Annot., Effect of Witness’ Violation of Order of Exclusion (1967) 14 A.L.R.3d 16.)
Since no request was made to exclude or strike the testimony of Officer Navarra, we are not called upon to decide whether defendant would be entitled of right to such relief or whether the matter lies within the sound discretion of the magistrate. We do note that when witness separation was wholly discretionary in California, the courts refused to disqualify a witness from testifying merely because he violated an order excluding witnesses from the courtroom. (People v. Duckett (1962) 210 Cal.App.2d 867, 870-871 [26 Cal.Rptr. 926] (§ 867); People v. Duane (1942) 21 Cal.2d 71, 80 [130 P.2d 123] (Evid. Code, § 777); People v. Vernon (1979) 89 Cal.App.3d 853, 862 [152 Cal.Rptr. 765] (Evid. Code, § 777); People v. Ortega (1969) 2 Cal.App.3d 884, 894 [83 Cal.Rptr. 260], disapproved on other grounds in People y. Gainer (1977) 19 Cal.3d 835, 846 [139 Cal.Rptr. 861, 566 P.2d 997] (Evid. Code, § 777).) Also in cases applying analogous rule 615 of the Federal Rules of Evidence the decision whether *543to exclude such testimony generally is left to the discretion of the court.4 (United States v. Whiteside (D.Del. 1975) 404 F.Supp. 261, 266, applying rule 615, pp. 265-266, fn. 10; United States v. Monaco (11th Cir. 1983) 702 F.2d 860, 871; Government of Virgin Islands v. Edinborough (3d Cir. 1980) 625 F.2d 472, 474; United States v. Robbins (9th Cir. 1978) 579 F.2d 1151, 1154; United States v. Warren (5th Cir. 1978) 578 F.2d 1058, 1076; United States v. Johnston (10th Cir. 1978) 578 F.2d 1352, 1355, cert. den. (1978) 439 U.S. 931 [58 L.Ed.2d 325, 99 S.Ct. 321].) Other jurisdictions which have adopted the federal rule follow suit. (See Allen v. State (1982) 277 Ark. 380 [641 S.W.2d 710, 712-713]; State v. Heart (N. D. 1983) 334 N.W.2d 479, 482; State v. Ortiz (N. M. App. 1975) 88 N.M. 370 [540 P.2d 850, 857] and State ex rel. State Hy. Dept. v. 1st Nat. Bank, etc. (1978) 91 N.M.240 [572 P.2d 1248, 1250].)
A procedural irregularity or defect in the preliminary examination does not necessarily render the ensuing order of commitment illegal. (Jennings v. Superior Court (1967) 66 Cal.2d 867, 874 [59 Cal.Rptr. 440, 428 P.2d 304].) A defendant is entitled to pretrial dismissal of the information without any showing of prejudice only if he has been deprived of some substantial right. (People v. Pompa-Ortiz, supra, 27 Cal.3d at pp. 523, 529; People v. Watson (1983) 146 Cal.App.3d 12, 20 [193 Cal.Rptr. 849].)
In order to preserve a claim that violation of an exclusion order deprived him of a substantial right at preliminary hearing, a defendant who has knowledge of the violation must move the magistrate to exclude or strike the offending witness’ testimony at the hearing. Absent an appropriate and timely objection giving the magistrate opportunity to consider and cure any harm flowing from the irregularity in the preliminary examination, the objection must be deemed waived. (Evid. Code, § 353; People v. Green (1980) 27 Cal.3d 1, 27, 34-35 [164 Cal.Rptr. 1, 609 P.2d 468]; see People v. Gentemann, supra, 201 Cal.App.2d at p. 718; People v. Brown (1962) 200 Cal.App.2d 111, 115-116 [19 Cal.Rptr. 36]; People v. Griffin (1961) 195 Cal.App.2d 855, 857-858 [16 Cal.Rptr. 388]; People v. Guy (1961) 191 Cal.App.2d 714, 718 [13 Cal.Rptr. 17];.)
The defendant properly invoked section"867 and called to the magistrate’s attention the fact that a prosecution witness had been present during another witness’ testimony in violation of the exclusion order. However, defendant waived the right later to challenge the legality of his commitment by failing timely to object or move to exclude or strike the offending witness’ testimony. Defendant may not now successfully take advantage of his own ac*544quiescence in allowing the witness to testify. (See People v. Brown, supra, 200 Cal.App.2d at pp. 116-117.)
Defendant contends that the dismissal from which this appeal is taken does not “affect the substantial rights” of the People (§ 1258) since it does not preclude the filing of a second felony complaint; therefore, defendant submits the judgment of dismissal must be affirmed. (People v. Fyfe (1929) 102 Cal.App. 549, 552 [283 P. 378]). However, after two dismissals of a felony accusation, further prosecution is forever barred by section 1387. Left standing, an erroneous dismissal significantly jeopardizes the chances that persons guilty of crimes will be convicted and thus affects the substantial rights of the People.
The judgment of dismissal is reversed.
Regan, J., concurred.The latent was later identified by another witness as defendant’s,
following is Fletcher’s entire preliminary hearing testimony:
Q. Dr. Fletcher, referring to November 30th, 1983, where did you live?
A. I lived at that time and now at 715 Hawthorne Lane, Davis, California.
Q. On the date indicated did you leave your residence?
A. Yes, I did.
Q. Upon your return did you discover anything amiss at the residence?
A. Yes, I did.
Q. What?
A. I found that the property had been broken into, glass had been broken in the back part of the house, and there had been forced entry into the house.
Q. Was any property removed from the house?
A. Yes, there were.
Q. What?
A. A number of items, including a stereo, a tape deck, money, various coins, a number *541of other items. If you would like a specific list, I have the list with me. I can read them.
Q. Thank you. Do you know the defendant in this action, Jeffrey Young?
A. I do not.
Q. Have you at any time given him permission to be in your home at 715 Hawthorne?
A. I did not.
Q. Have you ever given him permission to remove property from that location?
A. I have not.
Compare section 868, which governs a defendant’s right to close his preliminary examination to the public. The basic purpose Underlying closure is to protect the defendant’s right to an impartial and unbiased jury by preventing public dissemination of the preliminary hearing testimony prior to trial. (People v. Elliott, supra, 54 Cal.2d at p. 504; San Jose Mercury-News v. Municipal Court (1982) 30 Cal.3d 498, 512 [179 Cal.Rptr. 772, 638 P.2d 655].) In the nature of the case it is difficult if not impossible to assess whether a jury may be influenced by inflammatory or adverse pretrial publicity. (San Jose Mercury-News, supra, at p. 513; Press-Enterprise Co. v. Superior Court (1984) 37 Cal.3d 772, 780-781 [209 Cal.Rptr. 360, 691 P.2d 1026].) Dismissal may be the only meaningful remedy available when the protection afforded by section 868 is denied. (See People v. Elliot, supra, 54 Cal.2d at pp. 504-505; Ortega v. Superior Court (1982) 135 Cal.App.3d 244, 251 [185 Cal.Rptr. 297]; People v. Gentemann (1962) 201 Cal.App.2d 711, 717-718 [20 Cal.Rptr. 435].)
Federal rule 615 reads: “At the request of a party the court shall order witnesses excluded so that they cannot hear the testimony of other witnesses. ...”