
43 Cal.App.3d 809 (1974)
118 Cal. Rptr. 120
TAMMIE YVONNE AIKEN CHAMBERS, Petitioner,
v.
THE MUNICIPAL COURT FOR THE SAN DIEGO JUDICIAL DISTRICT OF SAN DIEGO COUNTY et al., Respondents; THE PEOPLE, Real Party in Interest.
Docket No. 14304.
Court of Appeals of California, Fourth District, Division One.
December 10, 1974.
*810 COUNSEL
E. Hodge Crabtree, under appointment by the Court of Appeal, for Petitioner.
No appearance for Respondents.
Edwin L. Miller, Jr., District Attorney, and Terry J. Knoepp, Deputy District Attorney, for Real Party in Interest.
*811 OPINION
AULT, J.
Tammie Yvonne Aiken Chambers seeks a writ of prohibition restraining the Municipal and Superior Courts of San Diego from going forward with a preliminary hearing and possible superior court arraignment on a felony complaint charging her with battery on a peace officer (Pen. Code, § 243) and resisting arrest (Pen. Code, § 148).
She challenges the constitutionality of Penal Code section 1368.1 (Stats. 1974, ch. 1511, enacted as an urgency statute, filed Sept. 27, 1974),[1] arguing she will be denied effective representation and due process if the preliminary hearing is held, for she cannot cooperate with her counsel in the preparation of her defense. She is being held at Community Mental Health with a diagnosis of schizophrenia. Her counsel has made this challenge.
Chambers' attorney informed the municipal court on November 6, 1974, she was not mentally competent and asked for a suspension of proceedings under Penal Code section 1368, subdivision (b). Although both the court and the prosecution agreed with counsel's assessment of his client's mental condition, the motion was denied and a preliminary hearing date was set under the mandate of Penal Code section 1368.1.
Where a doubt arises as to defendant's sanity in a felony case, the new law (Pen. Code, § 1368.1) delays the time for suspension of criminal proceedings and the initiation of proceedings to determine mental competence until "after the information or indictment has been filed." The previous law permitted that action "at any time during the pendency of an action and prior to judgment." Thus, where the People elect to proceed by complaint rather than by indictment, a defendant may be required to go *812 through the procedures provided for in Penal Code section 858 (appearance before a magistrate to be informed of the charges against him and his right to counsel) and a preliminary examination (Pen. Code, § 859a et seq.), even where a doubt has arisen as to his sanity at the time.
Undoubtedly the change in procedure reflects the Legislature's concern with the provision in the old law which permitted commitment simply because a defendant was incompetent to proceed to trial without a determination of probable cause to believe he had committed a crime.
Revision of California present sanity procedures resulted from recent decisions by the United States and California Supreme Courts.[2] In Jackson v. Indiana, 406 U.S. 715 [32 L.Ed.2d 435, 92 S.Ct. 1845], the Supreme Court of the United States held the State of Indiana could not "constitutionally commit the petitioner for an indefinite period simply on account of his incompetency to stand trial on the charges filed against him." In In re Davis, 8 Cal.3d 798 [106 Cal. Rptr. 178, 505 P.2d 1018], the California Supreme Court adopted the Jackson rule. The California court also pointed out the Jackson court had "... noted the possibility that [the defendant] might, under appropriate [state] procedure, be permitted to raise certain defenses such as insufficiency of the indictment, or make certain pretrial motions, through counsel even though [the defendant] himself remains incompetent." (In re Davis, 8 Cal.3d 798, 804-805 [106 Cal. Rptr. 178, 505 P.2d 1018].)
In Davis the court touched upon the issue raised here. Noting the law required suspension of "all proceedings" when a doubt arose as to the defendant's sanity, it pointed out Davis had sought to require the People to make a "prima facie" showing that they would be able to proceed on the underlying charge if he were returned to stand trial, but had not properly raised the issue (In re Davis, supra, 8 Cal.3d 798, 809, fn. 9).
(1a) The issue here, one of first impression, is whether the new statute, which requires Chambers to go through a preliminary hearing when a doubt has arisen as to her present sanity, can withstand constitutional scrutiny. A preliminary hearing serves many functions,[3] and it is a significant stage in the criminal process (Jennings v. Superior Court, 66 Cal.2d 867 [59 Cal. Rptr. 440, 428 P.2d 304]). However, its chief purpose is a determination by a magistrate of the question of whether probable cause exists to hold a defendant to answer the charges which have been *813 filed against him (Pen. Code, § 872). The Legislature, by passing this urgency measure, has indicated its determination that persons should not be committed for mental incompetence through the criminal process without any independent assessment by a magistrate of the sufficiency of the criminal charges.[4]
The power of the court to commit Chambers comes because she is accused of crimes. The new procedure permits Chambers to challenge the criminal charges before she is committed, at least to the extent that counsel can act on her behalf. Since counsel may be able to show at the preliminary hearing that the evidence is insufficient to hold her to answer, or that she has a controlling affirmative defense, it is to her interest that the matter go forward.
Although not specifically provided in the statute, we think suitable safeguards exist to protect Chambers' rights. The preliminary hearing is a critical stage in the criminal process, and one held when the defendant is not mentally competent does not comply with due process of law. A defendant is entitled to effective assistance of counsel at a preliminary hearing, and counsel cannot effectively represent a client who does not understand the nature of the charges against her or who is unable to cooperate in her defense. If Chambers is held to answer, and if she is found mentally incompetent at her superior court hearing, she will not have been lawfully committed to stand trial by a magistrate, and the information may be set aside on that ground under the provisions of Penal Code section 995 if criminal proceedings are reinstituted.[5]
(2) "`[W]here it appears that, during the course of the preliminary examination, the defendant has been denied a substantial right, the commitment is unlawful within the meaning of section 995, and it must be set aside upon timely motion. [Citations.]' (Italics added.)" (Jennings v. Superior Court, supra, 66 Cal.2d 867, 874.)
*814 (1b) On balance we believe the new statute implements rather than detracts from a defendant's constitutional rights. Should the contingencies we have alluded to above occur, existing law provides adequate safeguards.
The petition for writ of prohibition is denied; the stay order, previously issued, is vacated.
Brown (Gerald), P.J., and Cologne, J., concurred.
NOTES
[1]  ".... .... .... .... .... ..

"(b) If counsel informs the court that he believes the defendant is or may be mentally incompetent, the court shall order that the question of the defendant's mental competence is to be determined in a hearing which is held pursuant to Sections 1368.1 and 1369.... Any hearing shall be held in the superior court.
"(c) Except as provided in Section 1368.1, when an order for a hearing into the present mental competence of the defendant has been issued, all proceedings in the criminal prosecution shall be suspended until the question of the present mental competence of the defendant has been determined.
".... .... .... .... .... .
"1368.1 (a) If the action is on a complaint charging a felony, the hearing to determine mental competence may not be held until after the information or indictment has been filed. A demurrer or a motion under Section 995 or 1538.5 may thereafter be made by counsel for the defendant, even though a proceeding to determine the defendant's mental competence is pending."
[2]  Reform of procedures not involved in this appeal were also included in the revision.
[3]  Sixteen functions are listed in The Preliminary Hearing in Los Angeles, 18 U.C.L.A.L. Rev. page 636.
[4]  Commentators have been aware of this problem for some time. In In re Davis, supra, 8 Cal.3d 798, the California Supreme Court cites a note in 81 Harvard Law Review, page 454, Incompetency to Stand Trial, which says at pages 468-469: Defense counsel "ought to be able to test the prosecution's case without foregoing the right to invoke the incompetency issue at a later time. It would thus seem preferable to provide that, when the issue of incompetency was raised, either by the prosecution, the court, or the defense counsel, and the defendant was found incompetent, the ruling would be deferred while defendant's counsel was given an opportunity either to challenge the validity of the indictment in a pretrial hearing or to raise any affirmative defenses sufficient to exculpate the defendant. If, as a result, the indictment was dismissed or the defendant exonerated, the proceedings would be dismissed; if not, the defendant would be committed."
[5]  In relevant part Penal Code section 995 provides an information must be set aside by the court if it appears: "[T]hat before the filing thereof the defendant had not been legally committed by a magistrate."
