Appellant Barbara Elliot was convicted on two counts of violating section 288a of the Penal Code (sex perversion). She was sentenced to serve one year in the county jail on each count, the sentences to run concurrently. Both sentences were suspended, and she was granted probation on the condition that she pay a $300 fine.
This appeal is based solely on the ground that the committing magistrate, over appellant’s repeated objections, allowed an unauthorized person to remain in the courtroom during the preliminary examination after appellant had moved to exclude all such persons under the provisions of section 868 of the Penal Code.
Section 868 provides: “The magistrate must also, upon the request of the defendant, exclude from the examination every person except his clerk, court reporter and bailiff, the prosecutor and his counsel, the Attorney General, the district attorney of the county, the defendant and his counsel, and the officer having the defendant in custody; ...”
*502 At the commencement of the preliminary examination, on December 3, 1957, appellant duly requested that the magistrate exclude all persons not excepted by section 868 from the courtroom. The magistrate granted the motion, and cleared the court of all such unauthorized persons. A short time later, however, a newspaper reporter was permitted to return, and, in spite of appellant’s repeated objections, was permitted to remain in the courtroom during the remainder of the preliminary examination. At the close of the preliminary examination appellant was ordered held for trial, and, on December 18, 1957, an information was filed charging her with the violations of which she was subsequently convicted.
On January 27, 1958, pursuant to section 995 of the Penal Code, 1 appellant filed a motion in the superior court to set aside the information on the ground that she had not been “legally committed.” This motion was denied. Appellant then sought a writ of prohibition from the District Court of Appeal. The application was denied without opinion. Then, at the commencement of her trial in the superior court, appellant, after waiving a jury trial, moved to dismiss the information, and, in the alternative, to exclude all evidence on the ground that her rights had been violated by the committing magistrate. These motions were overruled. She was then tried, found guilty, and sentenced.
There is no doubt that the trial court committed error in denying appellant’s motion to set aside the information. The question is as to the effect of that error.
In the first place, as a result of that error, appellant was not “legally” committed within the meaning of section 995 of the Penal Code. That section expressly provides that the court
“must”
set aside an information if the defendant has not been “legally committed.” “The phrase ‘legally committed,’ . . . refers to the examination of the ease and the holding of the defendant to answer, as prescribed by title 3, chapter 7, of the Penal Code.”
(Ex parte Baker,
It is also settled that, if the defendant has not been legally committed and if the trial court erroneously denies the motion to set the commitment aside and permits the action to proceed to judgment, the resulting conviction must be reversed.
(Whitney
v.
Superior Court,
The commitment procedure is set forth in title 3, chapter 7, of the Penal Code. In that portion of the Penal Code, the Legislature has provided numerous basic safeguards which are aimed at assuring the defendant a “fair trial” during the process of commitment as well as at his actual trial. “ The forms of procedure required by law in preliminary examinations establish a substantial right vested in every person charged with crime and should not be lightly waved aside.”
(.People
v.
Brooks,
The right afforded to a defendant by section 868 of the Penal Code, to require that all unauthorized persons be excluded from the courtroom during the preliminary examination, is a substantial safeguard which cannot be disregarded by the magistrate. The section is mandatory. It contrasts sharply with section 867, which gives the magistrate discretion to exclude and/or separate witnesses. Section 868 gives the defendant an absolute right to protect himself against the presence of unauthorized persons at his preliminary examination.
This is not a mere insubstantial right. It is, rather, a fundamental safeguard. The testimony heard at the preliminary examination is often that of the prosecution only. The defense may remain silent if it appears that reasonable or probable cause to commit has been established. One of the main purposes of section 868 is to give the defendant the opportunity of protecting his right to an impartial and unbiased jury by preventing dissemination of this testimony, either by newspaper or other media prior to trial. (See
Kirstowsky
v.
Superior Court,
Appellant's waiver of a jury trial in the present case did not cure the magistrate's error. She should not have been placed in a position where she had to choose to either waive her right to a jury trial, or risk being tried by jurors who may have read or heard testimony prior to trial. The right to be tried by an impartial jury, if one so chooses, is absolute.
The preliminary examination is not merely a pretrial hearing. “The purpose of the preliminary hearing is to weed out groundless or unsupported charges of grave offenses, and to relieve the accused of the degradation and the expense of a criminal trial. Many an unjustifiable prosecution is stopped at that point, where the lack of probable cause is clearly disclosed.”
(Jaffe
v.
Stone,
Nor was it necessary for the accused to show actual prejudice caused by the denial of her rights. One of the basic purposes of section 868 of the Penal Code is to preserve the defendant’s right to a trial by an unbiased jury. It is a fair trial statute implementing the constitutional guarantees. Of such a statute the United States Supreme Court in
Hayes
v.
Missouri,
When the statute is violated no showing of actual prejudice is required. Prejudice must be presumed. Obviously, if actual prejudice must be shown, the guarantee would become meaningless.
(People
v.
Byrnes,
It is well established that an accused cannot ignore errors in the commitment procedure until after conviction and then attempt to raise such errors for the first time on appeal. But appellant does not fall within this rule. She raised her objection to the magistrate’s erroneous conduct at every stage in the proceedings and by every means available to her. She first attempted to invoke the protection of section 868 at the commencement of the preliminary examination. She repeatedly objected when the magistrate erroneously permitted the newspaper reporter to return to the courtroom. She moved in a timely manner to set aside the information in conformity with section 995 of the Penal Code. Then she sought a writ of prohibition, and, when this was denied, she further objected at the commencement of her trial. Under these circumstances, appellant is entitled to urge the illegality of her commitment as a ground for reversal on appeal.
(Whitney
v.
Buperior Court, supra,
Article VI, section 4%, of the Constitution, cannot operate so as to save this conviction. When a defendant has been denied a fair trial prejudice must be presumed. Nor can a fair trial in the superior court cure the errors of the committing magistrate and of the superior court judge in permitting the trial to take place. Before an accused can be required to defend himself he must be committed in accordance with law.
(People
v.
Bomar,
In
People
v.
Sarazzawski,
It must be remembered that here we have a mandatory statute that admittedly has been violated. Unless the error can be reached on appeal from the judgment it cannot be reached at all even though the superior court erroneously denied a motion under section 995 of the Penal Code and the appellate court erroneously denied the application for a writ. To agree with respondent would, in effect, be to write the statute off the books.
The judgment is reversed, and the trial court is directed to set the information aside.
Gibson, C. J., Traynor, J., Schauer, J., McComb, J., White, J., and Dooling, J., concurred.
Respondent’s petition for a rehearing was denied August 17,1960.
Notes
Seetion 995 reads, in part: “The indictment or information must be set aside by the court in which the defendant is arraigned, upon his motion, in either of the following cases: . ..
“ If it be an information:
“1. That before the filing thereof the defendant had not been legally committed by a magistrate.
“2. That the defendant had been committed without reasonable or probable cause."
