
93 Cal.Rptr.2d 509 (2000)
22 Cal.4th 512
994 P.2d 354
The PEOPLE, Plaintiff and Respondent,
v.
Aldo HERNANDEZ, Defendant and Appellant.
No. S074951.
Supreme Court of California.
March 16, 2000.
*511 Corinne S. Shulman, under appointment by the Supreme Court, Hydesville, for Defendant and Appellant.
Daniel E. Lungren and Bill Lockyer, Attorneys General, George Williamson and David P. Druliner, Chief Assistant Attorneys General, Carol Wendelin Pollack, Assistant Attorney General, Steven D. Matthews, Ruth Wei, Marc E. Turchin and Chung L. Mar, Deputy Attorneys General, for Plaintiff and Respondent.
*510 MOSK, J.
In this matter, defendant pleaded not guilty and not guilty by reason of insanity to murder and other offenses committed over a seven-hour period. The jury found him guilty of murder and all but one of the offenses but failed to reach a unanimous verdict on insanity and the superior court declared a mistrial. A second jury reached a unanimous verdict of insanity with regard to some, but not all, of the offenses. As to those remaining offenses, the superior court dismissed the sanity proceedings under Penal Code section 1385, subdivision (a), on the basis of its determination that further retrial would "unduly burden judicial resources," and found defendant sane. The Court of Appeal affirmed, concluding that the superior court properly dismissed the sanity proceedings and entered a directed verdict.
We granted review to address the question whether the superior court was authorized to dismiss the sanity proceedings pursuant to Penal Code section 1385, subdivision (a), or to direct a verdict on the issue. As will appear, we conclude that the superior court's ruling was unauthorized under either procedure. Accordingly, we reverse the judgment of the Court of Appeal.

I
Over a seven-hour period, between 5:00 and 6:00 p.m. on July 14, 1995, and shortly after 12:30 a.m. on the following morning, defendant Aldo Hernandez shot and killed an acquaintance, Jose Quiroga, and assaulted two others at Quiroga's home with a firearm; shot at and injured several strangers in separate incidents at different locations; and shot at a police officer before fleeing in a high-speed chase. He was charged with murder (Pen.Code, § 187) and other offenses, including attempted murder (id., §§ 664 & 187), assault with a firearm (id., § 245, subd. (a)(2)), shooting from a motor vehicle (id., § 12034, subd. (c)), and evading a police officer (Veh. Code, § 2800.2). He pleaded not guilty and not guilty by reason of insanity.
At the first trial, which began on June 3, 1996, the following evidence relevant to guilt or innocence and insanity was presented. Defendant lived with his parents, worked at the family business, and operated his own separate tow truck business. About three months before the shootings, his parents began noticing changes in defendant's personality. He told them that one of their employees was possessed by the devil; soon after, he began saying that helicopters were following him. He believed he was being watched, became afraid of towing cars, and feared that his *512 father's business would be robbed. He told his parents that they were "with the devil" and that he was a messenger from God who had come to carry out justice. On one occasion, he saw a fire on the side of road and became very nervous and agitated.
On his return from a trip to Arizona in early July, defendant spoke about the world coming to an end and said the world was "messed up" and he was coming back to pass judgment on other people. On July 11, he moved out of his parents' home into a hotel room, explaining that he believed that they lived with the devil and he was "with God."
A few days before the shootings, he drove up to Idilio Sanchez's shop in a white car; he was wearing a police belt with handcuffs, mace, a gun, and a billy club, and called himself "Officer Hernandez." He pulled a gun on Sanchez's employees, saying "Don't mess with me." He revisited the shop repeatedly, at one time introducing himself to a customer as "Officer Hernandez." On another occasion shortly before the shootings, he arrived at the shop looking unusually dirty and said he was the "white horseman" "sent from God" to pass judgment on all people before the week was over. At 5:00 a.m. on the morning of the shootings, he pounded on Sanchez's door and announced that the "tribulation" had begun, that everyone was dead, and it was up to him to save the world. He returned several times during the day, armed with a gun, and said that Sanchez's parents were "with the devil" and that he was a "white horseman" who would pass judgment on everyone.
Several experts testified about defendant's mental condition, diagnosing him as being delusional and suffering, inter alia, from bipolar disorder and schizophrenia. Dr. Marvin Eisenberg, a court-appointed psychiatrist, testified that defendant believed that he was a messenger of God, that everybody was out to kill him, and that people were using witchcraft against him. It was Dr. Eisenberg's opinion that, at the time of the offenses, defendant's conduct was consistent with mental derangement that can lead to false conclusions and aberrant behavior; at that time, he was motivated by hallucinations and delusions.
On June 24, 1996, the jury found defendant guilty of all but one offense. Trial resumed on July 9, 1996, as to sanity. The jury was unable to reach a unanimous verdict on the issue of sanity as to any of the counts. As to most, the jury deadlocked by votes of seven to five in favor of insanity; with regard to the attempted murder of a police officer, it voted seven to five in favor of sanity and with regard to the charge of evading police, it voted nine to three in favor of sanity. Accordingly, on July 12, 1996, the superior court declared a mistrial and discharged the jury. The matter was reset for trial of the sanity issue.
The second proceedings as to sanity began on October 30, 1996. Among other witnesses, defendant's parents and Idilio Sanchez, his cousin, repeated their testimony concerning his bizarre behavior before the shootings. Dr. Marshall Cherkas testified to his opinion that defendant was predominantly insane at the time of each of the shootings. For most if not all of that time, he was "intellectually unable to understand that this is a gun and I am shooting somebody." He believed he was the Lord's representative with infinite powers and made judgments about whether individuals should live or die because they were sinners. He had a delusional system regarding what he described as the "rapture," his feeling that the Lord had come to earth and taken away all the good people, and it was his responsibility to deplete the world of the sinners who were still around. Dr. Eisenberg testified that in his opinion, when defendant committed the shootings, he did not have the mental capacity to know and understand that what he was doing was criminal or wrongful. He was psychotic and delusional. He believed that he was a messenger from God and lacked the capacity to control his conduct *513 to conform with the law because he believed he was doing God's will and other people were planning to kill him.
Defendant testified that he believed he had a mission from God and that he was the person on the white horse in the Book of Revelations who had been given authority to conquer the earth. He went to Quiroga's house with the purpose of carrying out God's will by shooting him. He also shot two others because God commanded him to do so. After the shooting he saw his father and cousin and expected them to feel what had happened. He returned to his hotel room, ate, showered, read the Bible, and tried to sleep; a thought from God came to his mind telling him to shoot some sinners and, armed, he drove around looking for sinners to shoot. He felt a burning sensation when he saw various other people and shot at them, believing he was doing the right thing because God put the idea in his mind, or they were about to do something sinful. He believed that the police officers he saw were gang members who had taken over the police department. He shot at a police officer after feeling a burning sensation.
On November 27, 1996, the second jury found defendant insane as to the murder of Quiroga and the assaults on two others at Quiroga's home but failed to reach a unanimous verdict on the remaining counts. It was deadlocked on most of the remaining counts by a vote of 10 to two in favor of insanity; with regard to the attempted murder of a police officer, it voted seven to five in favor of sanity, and with regard to the charge of evading police, it voted eight to four in favor of sanity. Finding the jury "hopelessly deadlocked," the superior court declared a mistrial as to the remaining counts. It discharged the jury and reset the matter for trial.
On February 7, 1997, the superior court made a finding that the jurors were unable to reach a verdict regarding sanity on the remaining counts and ruled that "pursuant to [Penal Code section] 1385[, subdivision (a], the case [would] not be retried as to the sanity issue" with regard to those offenses. On February 16, 1997, at the sentencing hearing, the superior court found defendant sane as to the remaining counts.
The superior court explained its ruling as follows. "[T]he court is reflecting that this is a potential third trial in the sanity issue, [¶] ... [¶] The court is finding that an insanity trial is an action within the meaning of Penal Code section 1385, subdivision (a)." It concluded, based on an interview with the jury forepersons after each of the sanity trials, that a further trial was unlikely to yield a unanimous verdict. It explained: "[T]o retry the insanity issue as to those counts will unduly burden judicial resources. [¶] The Court therefore finds that the defendant is not able to meet his burden of proof to establish his insanity as to [the remaining counts]. And, therefore, under Penal Code section 1385, subdivision (a), the Court is dismissing the insanity proceedings as to [the remaining counts]. [¶] And the court further finds that due to the presumption of the defendant's sanity to those counts [t]hat the defendant was sane at the time he committed the acts constituting [the remaining counts]."
Defendant was sentenced to state prison for 23 years, four months and to two consecutive terms of life with possibility of parole, to be stayed until his sanity was restored.
The Court of Appeal affirmed the judgment. It determined that the superior court properly dismissed the sanity proceedings pursuant to Penal Code section 1385, subdivision (a). Noting that the discretion to dismiss "in furtherance of justice" under the statute is broad (ibid.), it concluded that the superior court correctly acted to alleviate the burden on the criminal justice system of a third retrial after two juries failed to reach a unanimous verdict on the issue of insanity. It stated: "The trial court concluded that a retrial would be doomed to the same fate, and so *514 on, ad infinitum and took the only logical action."[1]
The Court of Appeal also concluded that the superior court "essentially issued a directed verdict finding defendant sane as to [the remaining counts]." It explained: "The trial judge gave full and adequate consideration of all the evidence presented to the two juries to determine whether the issue of insanity should be retried before a third jury. Thus it cannot be said that the trial court abused its discretion in directing a verdict of sanity and dismissing the sanity phase `in furtherance of justice' where [defendant] was unable to overcome the presumption of sanity before two separate juries by failing to establish by a preponderance of the evidence of [sic ] his insanity by an unanimous verdict."
We granted review; we now reverse.

II
Under California law, if a defendant pleads not guilty and joins it with a plea of not guilty by reason of insanity, the issues of guilt and sanity are tried separately. Penal Code section 1026, subdivision (a), provides that in such circumstances, "the defendant shall first be tried as if only such other plea or pleas had been entered, and in that trial the defendant shall be conclusively presumed to have been sane at the time the offense is alleged to have been committed. If the jury shall find the defendant guilty, or if the defendant pleads only not guilty by reason of insanity, then the question whether the defendant was sane or insane at the time the offense was committed shall be promptly tried, either before the same jury or before a new jury in the discretion of the court. In that trial, the jury shall return a verdict either that the defendant was sane at the time the offense was committed or was insane at the time the offense was committed."
Although guilt and sanity are separate issues, the evidence as to each may be overlapping. Thus, at the guilt phase, a defendant may present evidence to show that he or she lacked the mental state required to commit the charged crime. (People v. Saille (1991) 54 Cal.3d 1103, 1111-1112, 2 Cal.Rptr.2d 364, 820 P.2d 588; Pen.Code, §§ 21, 28, 29.) A finding of such mental state does not foreclose a finding of insanity. Insanity, under California law, means that at the time the offense was committed, the defendant was incapable of knowing or understanding the nature of his act or of distinguishing right from wrong. (Pen.Code, § 25, subd. (b); People v. Skinner (1985) 39 Cal.3d 765, 776-777, 217 Cal.Rptr. 685, 704 P.2d 752 [construing Penal Code section 25, subdivision (a) as providing that defendant may be found insane if he did not know the nature and quality of his act or if he did not know the act to be morally wrong].)
The plea of insanity is thus necessarily one of "confession and avoidance." (People v. Troche (1928) 206 Cal. 35, 44, 273 P. 767.) "Commission of the overt act is conceded" but punishment is avoided "upon the sole ground that at the time the overt act was committed the defendant was [insane]." (People v. Wells (1949) 33 Cal.2d 330, 349-350, 202 P.2d 53, italics in original.)
The "sanity trial is but a part of the same criminal proceeding as the guilt phase" (People v. Flores (1976) 55 Cal. App.3d 118, 122, 127 Cal.Rptr. 230) but *515 differs procedurally from the guilt phase of trial "in that the issue is confined to sanity and the burden is upon the defendant to prove by a preponderance of the evidence that he was insane at the time of the offense" (id. at p. 121, 127 Cal.Rptr. 230.) As in the determination of guilt, the verdict of the jury must be unanimous. (People v. Troche, supra, 206 Cal. at p. 44, 273 P. 767.)

III
We turn to the issue at hand. The Court of Appeal determined that the superior court properly dismissed the sanity proceedings pursuant to Penal Code section 1385, subdivision (a), and that it, in effect, entered a directed verdict on the plea. We address each point in turn.

A
The Court of Appeal affirmed the superior court's dismissal of the sanity proceedings as a proper exercise of its authority to dismiss an action "in furtherance of justice" pursuant to Penal Code section 1385, subdivision (a). It erred thereby.
Penal Code section 1385, subdivision (a), in relevant part provides: "The judge or magistrate may, either of his or her own motion or upon the application of the prosecuting attorney, and in furtherance of justice, order an action to be dismissed." It thus authorizes the trial court to order the dismissal of a criminal action. A criminal action is a "proceeding by which a party charged with a public offense is accused and brought to trial and punishment." (Pen.Code, § 683.) It consists of all charges and allegations "prosecuted in the name of the people of the State of California, as a party, against the person charged with the offense." (Id., § 684.)
Penal Code section 1385, subdivision (a), has also been construed to reach parts of an action, i.e., individual charges and allegations in a criminal action. (People v. Superior Court (Romero) (1996) 13 Cal.4th 497, 508, 53 Cal.Rptr.2d 789, 917 P.2d 628; People v. Burke (1956) 47 Cal.2d 45, 47, 301 P.2d 241.) In Burke, we explained: "The authority to dismiss the whole includes, of course, the power to dismiss or `strike out' a part." (47 Cal.2d at p. 51, 301 P.2d 241.) In so holding, we referred to the dismissal of some or all of the criminal charges or allegations against the defendant in the indictment or information. (Id. at p. 50, 301 P.2d 241.)
Penal Code section 1385, subdivision (a), provides that dismissal of an action, or part of an action, may be only on the judge's own motion or "upon the application of the prosecuting attorney"; a defendant does not have the statutory privilege of moving to dismiss an action, or part of an action, under Penal Code section 1385, subdivision (a). (People v. Superior Court (Flores) (1989) 214 Cal.App.3d 127, 136-137, 262 Cal.Rptr. 576; People v. Andrade (1978) 86 Cal.App.3d 963, 973-974, 150 Cal.Rptr. 662.)
Sanity proceedings do not constitute an action. Insanity is a plea raising an affirmative defense to a criminal charge, although one that does not negative an element of the offense. The plea of not guilty by reason of insanity is one of the six kinds of pleas to an indictment or information. (Pen.Code, § 1016.) The statutes consistently refer to the plea as a "defense." Thus, Penal Code section 25, subdivision (b), refers to the "defense" of insanity. (See id., § 1020 [referring to "defense[s]" under § 1016]; id., § 25.5 [referring to insanity plea as a "defense"]; 1 Witkin & Epstein, Cal.Criminal Law (2d ed. 1988) Defenses, § 192, p. 219 [explaining that "provisions of the Penal Code make clear that insanity is a defense to a criminal charge"].) Unlike an action, or part of an action, which can be dismissed only on the court's own motion or on application of the prosecution, a plea of insanity may be withdrawn by the defendant and the defendant alone. (People v. Redmond (1971) 16 Cal.App.3d 931, 938, 94 Cal.Rptr. 543.)
*516 "[T]he issue at the insanity trial is not whether in fact the defendant has committed the act but whether or not he should be punished." (People v. Flores, supra, 55 Cal.App.3d at p. 121, 127 Cal.Rptr. 230.) For this reason, we stated in an early case that it is not "strictly accurate" to denominate an insanity plea a "defense"; "[m]ore correctly it is a special plea to the effect that, assuming the [offense] to have resulted from the act of the defendant, he is not amenable to punishment under the law." (People v. Ellis (1929) 206 Cal. 353, 357-358, 274 P. 353.) In making this point, however, we did not purport to suggest that it is an action within the meaning of Penal Code section 1385, subdivision (a).
The People urge that because the trial court can dismiss a part of an action under Penal Code section 1385, subdivision (a), and "a sanity phase is undoubtedly a `part' of the criminal action against a defendant," it follows that sanity proceedings can be dismissed "without affecting the viability of the other parts of the overall criminal action." The argument does not withstand scrutiny.
It is true, as discussed, that we have affirmed a trial court's authority to dismiss a part of an action. (People v. Superior Court (Romero), supra, 13 Cal.4th 497, 508, 53 Cal.Rptr.2d 789, 917 P.2d 628.) Contrary to the People's suggestion, however, we have neither held nor implied that Penal Code section 1385, subdivision (a), authorizes the dismissal of a plea against a criminal charge or allegation. The cases cited by the People in support of their point are unavailing; they consistently refer to dismissal of charges or allegations in an indictment or information. Thus, in Romero, we held that the trial court has the power to strike factual allegations relevant to sentencing, such as the allegation that a defendant has prior felony convictions, notwithstanding passage of the so-called "Three Strikes" law (Pen.Code, §§ 667, subds.(b)-(i), 1170.12). (People v. Superior Court (Romero), supra 13 Cal.4th at p. 530, 53 Cal.Rptr.2d 789, 917 P.2d 628.) People v. Superior Court (1968) 69 Cal.2d 491, 505, 72 Cal.Rptr. 330, 446 P.2d 138, approved the dismissal, in the interest of justice, of an indictment, i.e., all criminal charges and allegations against the defendant. People v. Flores (1971) 6 Cal.3d 305, 308-309, 98 Cal.Rptr. 822, 491 P.2d 406, held that the trial court, pursuant to a plea bargain, was authorized to dismiss allegations in the indictment that defendant was armed with a deadly weapon when he committed the offense of robbery. (See also, e.g., People v. Tanner (1979) 24 Cal.3d 514, 518, 156 Cal.Rptr. 450, 596 P.2d 328 ["Section 1385 has been construed to provide judicial power to dismiss or strike  within the court's discretion  allegations which, if proven, would enhance punishment for alleged criminal conduct."]; People v. Dorsey (1972) 28 Cal. App.3d 15, 18, 104 Cal.Rptr. 326 [trial court has authority to dismiss findings by the jury that allegations of firearm use in the commission of the charted offenses were true].)
Alternatively, the People assert that an insanity plea can be considered an action in and of itself within the meaning of Penal Code section 1385, subdivision (a), because it is an attempt to enforce a right not to be punished and it is tried as a separate action.
Again, they are unpersuasive. An insanity plea is not the assertion of a "right"; as discussed, it is a plea to the effect that the defendant, even if guilty, should not be punished for an offense because he was incapable of knowing or understanding the nature and quality of his or her act or of distinguishing right from wrong at the time of the offense.
Nor is trial of the insanity plea a separate action; the sanity proceedings are "but a part of the same criminal proceeding" as the guilt trial. (People v. Flores, supra, 55 Cal.App.3d 118, 122, 127 Cal.Rptr. 230; accord, People v. Troche, supra, 206 Cal. at p. 48, 273 P. 767 [trial of guilt and sanity issues "amounted *517 to one trial, and no more"]; People v. Leong Fook (1928) 206 Cal. 64, 75, 273 P. 779 [Pen. Code § 1026 provides for "separate hearings in the course of the single trial of a single cause"].) The fact that it is conducted in a separate proceeding and that the defendant bears the burden of proof does not convert it into a separate criminal or civil action. "Trying the issue of alleged insanity of a person who is charged with a crime is not a separate trial.... In the eyes of the law there is only one trial even though it is divided into two sections or stages if insanity is pleaded as a defense." (People v. Villarreal (1985) 167 Cal.App.3d 450, 458; 213 Cal.Rptr. 179, 5 Witkin & Epstein, Cal.Criminal Law, supra, Trial, § 2967, pp. 3645-3646 ["The separation of the two stages of the `bifurcated trial' is solely for the purpose of keeping issues of guilt and sanity distinct.... For other purposes the trial is regarded as single and continuing...."].)
The People also refer to the policies we have previously described as underlying Penal Code section 1385, subdivision (a), arguing that they support a power to dismiss an insanity plea. Thus, quoting our decision in People v. Williams (1981) 30 Cal.3d 470, 482, 179 Cal.Rptr. 443, 637 P.2d 1029, they urge that the authority to dismiss sanity proceedings  even when there was conflicting evidence on the issue of sanity  would afford trial courts "`maximum leeway in fitting the punishment to the offender.'" The language from Williams is taken out of context. We held in Williams that a trial court may dismiss a special circumstance allegation; we did not state or imply that the trial court had authority under Penal Code section 1385, subdivision (a), to dismiss a plea raising an affirmative defense.
The only action that may be dismissed under Penal Code section 1385, subdivision (a), is a criminal action or a part thereof. Such dismissal, by definition, runs only in the immediate favor of a defendant, i.e., by cutting off an action or a part of an action against the defendant. To be sure, as the People point out, dismissal under Penal Code section 1385, subdivision (a), need not always be ordered for the benefit of a defendant rather than the prosecution. Thus, a dismissal of criminal charges before trial may be "designed to enable the prosecution `to obtain further witnesses, to add additional defendants, to plead new facts, or to plead new offenses....'" (People v. Orin (1975) 13 Cal.3d 937, 946, 120 Cal.Rptr. 65, 533 P.2d 193.) It does not follow, however, as the People incorrectly assert, that a trial court is authorized to dismiss an insanity plea simply because it would benefit the prosecution to do so. Indeed, we have never allowed proceedings in an action to be dismissed on that basis.
Finally, as we have emphasized, Penal Code section 1385, subdivision (a), may not be used solely to accommodate judicial convenience or for other reasons external to the case. So we have held in People v. Superior Court (Romero), supra, 13 Cal.4th at page 531, 53 Cal.Rptr.2d 789, 917 P.2d 628 and People v. Orin, supra, 13 Cal.3d at page 949, 120 Cal.Rptr. 65, 533 P.2d 193. Here, the superior court purported to dismiss the remaining insanity proceedings after the second jury deadlocked in order to avoid a proceeding that would be too time-consuming and thus unduly burden judicial resources. This it could not do.

B
The Court of Appeal concluded that the superior court properly entered what was "essentially" a directed verdict on its own motion, under the authority of Code of Civil Procedure section 630, subdivision (f), finding defendant sane as to the remaining counts after the second jury deadlocked. Again it erred.
As a general matter, it is doubtful whether Code of Civil Procedure section 630, subdivision (f), is applicable at all in true criminal proceedings; it does not expressly refer to criminal actions and no *518 provision in the Penal Code purports to allow for a directed verdict under that provision of Code of Civil Procedure section 630. Rather, it would seem that the Penal Code occupies the field. (See Gonzales v. Superior Court (1935) 3 Cal.2d 260, 263, 44 P.2d 320.)[2]
In any event, there is no reference in the record to a motion for a directed verdict. Nor did the superior court purport to order the entry of a directed verdict, as such, on the issue of insanity; it expressly ruled pursuant to Penal Code section 1385, subdivision (a), only.
Moreover, any directed verdict under Code of Civil Procedure section 630, subdivision (f), would have been untimely and hence void. The provision in relevant part provides: "When the jury for any reason has been discharged without having rendered a verdict, the court on its own motion or upon motion of a party, notice of which was given within 10 days after discharge of the jury, may order judgment to be entered in favor of a party whenever a motion for directed verdict for that party should have been granted had a previous motion been made." With exceptions not applicable here "the power of the court to act under the provisions of this section shall expire 30 days after the day upon which the jury was discharged...." (Ibid., italics added.) As indicated, the second jury was discharged on November 26, 1996. The superior court's order finding defendant sane as to the remaining counts was issued on February 16, 1997, long after its jurisdiction to rule on a motion for a directed verdict had expired. (See Siegal v. Superior Court (1968) 68 Cal.2d 97, 101, 65 Cal.Rptr. 311, 436 P.2d 311.)
The People argue that "assuming the superior court's actions constituted, in effect, a `directed verdict' of sanity," it acted properly. They draw analogies to the holdings in People v. Mapp (1983) 150 Cal.App.3d 346, 198 Cal.Rptr. 177, which involved a recovery of sanity hearing, and the federal district court decision in Leach v. Kolb (7th Cir.1990) 911 F.2d 1249, 1257.
People v. Mapp, supra, 150 Cal.App.3d at page 351, 198 Cal.Rptr. 177, which affirmed a directed verdict against the defendant in a proceeding under Penal Code section 1026.2, explained: "In considering whether there was error in granting of the directed verdict, we must view the evidence in the light most favorable to [the defendant] and indulge in every legitimate inference that may be drawn from the evidence in his favor and disregard conflicting evidence to determine whether there was evidence of sufficient substantiality to support a verdict that [he] was no longer a danger to others or himself."[3]
*519 The Seventh Circuit Court of Appeals in Leach v. Kolb affirmed a directed verdict in sanity proceedings under Wisconsin law. Observing that, under the state provision, insanity is an affirmative defense that does not negate an element of the offense, it held that there was no federal constitutional impediment to a directed verdict on an insanity plea when the defendant failed to present sufficient evidence to create a jury question on the issue. (Leach v. Kolb, supra, 911 F.2d at pp. 1255-1256.) In People v. Hill (Colo.1997) 934 P.2d 821, the Colorado Supreme Court reached a similar conclusion. Holding that a defendant was not entitled to have his sanity defense considered by a jury when he had presented no evidence whatever of insanity, it explained: "An affirmative defense does not become a matter for consideration by a jury until some quantum of evidence relevant to the affirmative defense is admitted." (Id. at p. 826.)
The People's analogy to Mapp and Kolb fails in this case. Even if the superior court had the express or inherent power to issue the equivalent of a directed verdict with regard to a plea of insanity, based on the lack of any substantial evidence, it could not do so here. For, viewing the evidence in the light most favorable to defendant, and drawing every legitimate inference in his favor, there was substantial evidence from which reasonable jurors could have concluded that he was insane at the time he committed the remaining offenses. Several witnesses testified concerning defendant's increasingly bizarre behavior at the time of the shootings; the court-appointed psychiatrists testified that in their opinion he was delusional and psychotic when he committed the offenses. Indeed, even the People concede that "there was evidence in the instant case which could support a finding of insanity."
Nor did the superior court purport to find that there was not sufficient evidence to support a jury verdict in defendant's favor. Instead, it acknowledged that defendant had presented credible evidence on the issue but nonetheless dismissed the insanity plea in order to conserve judicial resources. It did so improperly. Because we conclude that no directed verdict was, or could have been, ordered in this matter, we do not address defendant's contention that imposing a directed verdict to an insanity defense would violate the Sixth and Fourteenth Amendments of the United States Constitution and article I, section 16, of the California Constitution.

IV
For the foregoing reasons, we reverse the judgment of the Court of Appeal and remand the cause to that court with directions to remand the matter to the superior court for further proceedings consistent with this opinion.
GEORGE, C.J., KENNARD, J, BAXTER, J, WERDEGAR, J, and CHIN, J., concur.
Concurring Opinion by BROWN, J.
I agree with the disposition, but reach this conclusion through a somewhat different analysis. Rather than rely on hypertechnical distinctions that exalt form over substance, I would find that courts have the power to direct a verdict of sanity.
Although we have never held that section 1385 of the Penal Code[1] "authorizes the dismissal of a plea against a criminal charge or allegation" (maj. opn., ante, 93 Cal.Rptr.2d at p. 516, 994 P.2d at p. 360, *520 italics omitted), we have long held that special pleas or defenses raising issues collateral to the issue of guilt or innocence do not require a jury finding. (See People v. Newell (1923) 192 Cal. 659, 668, 221 P. 622 (Newell).) Unlike the elements of a criminal offense, a defendant may waive these pleas and has the burden of proof. Therefore, "[i]t is just as necessary to support special pleas by proof [citation] as it is to interpose the pleas, and the failure to do either is to be deemed a waiver of the defense." (Id. at p. 667, 221 P. 622.)
For over 75 years, we have applied these principles to the special pleas of once in jeopardy and former judgment of conviction or acquittal. (See People v. Greer (1947) 30 Cal.2d 589, 595-596, 184 P.2d 512 (Greer) [citing Newell for the rule that "the plea of double jeopardy does not necessarily require a finding by the jury"], overruled on other grounds by People v. Fields (1996) 13 Cal.4th 289, 308, fn. 6, 52 Cal.Rptr.2d 282, 914 P.2d 832.) Where "the evidence is uncontradicted or leads to a single conclusion a question of law is presented" (People v. Bechtel (1953) 41 Cal.2d 441, 445, 260 P.2d 31 (Bechtel)), and "the trial court is not required to submit the question to the jury for a finding upon that plea" (Greer, supra, 30 Cal.2d at p. 596, 184 P.2d 512; see also People v. Yopp (1961) 195 Cal.App.2d 726, 729, 16 Cal. Rptr. 115). Instead, the court may strike the plea (see People v. Mason (1962) 200 Cal.App.2d 282, 285, 19 Cal.Rptr. 240), or direct a verdict in favor of the prosecution or the defendant (see Bechtel, supra, 41 Cal.2d at pp. 445-446, 260 P.2d 31 [defendant]; People v. Wilson (1924) 193 Cal. 512, 515, 226 P. 5 [prosecution]).
Like the pleas of once in jeopardy and former conviction or acquittal, the plea of not guilty by reason of insanity is a statutory defense that does not implicate guilt or innocence but, instead, determines "whether the accused shall be punished for the guilt which has already been established." (People v. Bales (1974) 38 Cal. App.3d 354, 356, 113 Cal.Rptr. 141 (Bales).) The rules governing the insanity and double jeopardy pleas are virtually identical. The failure by a defendant to raise these defenses results in a waiver, and the defendant has the burden of proof when asserting them. (See Newell, supra, 192 Cal. at p. 667, 221 P. 622 [double jeopardy pleas]; Bales, supra, 38 Cal.App.3d at p. 356, 113 Cal.Rptr. 141 [insanity plea].) Indeed, we recognized the similarity of these pleas over 70 years ago: "The plea of insanity as well as the proofs which support it more nearly resembles the plea and proofs of `once in jeopardy,' or of `prior conviction or acquittal,' than they do, for instance, the plea and proofs of self-defense, in the twofold aspect that, first, the former pleas and the proof thereof do not tend in any degree to diminish the unlawfulness of the homicide, nor, second, do they relate to the facts and circumstances ... of the homicide, and, if sufficiently established, destroy utterly its unlawful attribute." (People v. Leong Fook (1928) 206 Cal. 64, 72, 273 P. 779.)
Because there is no logical basis for distinguishing between the pleas of insanity and double jeopardy, I would conclude that trial courtswhich undoubtedly have the power to direct a verdict in the double jeopardy contexthave the same power in an insanity proceeding under section 1026. If the court, upon viewing the evidence in the light most favorable to the defendant, determines there is insufficient evidence to support a finding of insanity as a matter of law, then it may remove the issue from the jury and direct a verdict of sanity. This approach is not only consistent with the case law, but also comports with logic. Given that the defendantand not the prosecutioninjects the issue of insanity into the proceeding and has the burden of proof, we may reasonably require him to introduce sufficient proof before submitting the issue to the jury.
In doing so, we do not infringe on the defendant's constitutional rights. Under the United States and California Constitutions, a criminal defendant has the right to *521 a jury determination of all elements of the charged offenses. (See Leach v. Kolb (7th Cir.1990) 911 F.2d 1249, 1255; People v. Figueroa (1986) 41 Cal.3d 714, 725-726, 224 Cal.Rptr. 719, 715 P.2d 680.) Because a finding of insanity under California law "is dispositive only on the question of whether the accused is to be held criminally responsible for committing the charged offense[,] it is not determinative of whether the elements of the offense, and thus the criminal conduct itself, have been established." (Leach v. Kolb, supra, 911 F.2d at p. 1255; see People v. Troche (1928) 206 Cal. 35, 44, 273 P. 767 ["The plea of insanity is, and of necessity must be, a plea of confession and avoidance."].) Thus, taking the issue of insanity away from the jury does not violate the United States or California Constitution. (See Leach v. Kolb, supra, 911 F.2d at p. 1256; see also People v. Ramirez (1972) 27 Cal. App.3d 660, 670, 104 Cal.Rptr. 102 [removing the issue of once in jeopardy from the jury did not violate the defendant's right to a jury trial].)
Of course, the availability of a directed verdict does not help the prosecution in this case. As the majority correctly observes, the defendant in this case presented "substantial evidence from which reasonable jurors could have concluded that he was insane at the time he committed the remaining offenses." (Maj. opn., ante, 93 Cal.Rptr.2d at p. 519, 994 P.2d at p. 363.) Accordingly, I concur.
NOTES
[1]  The People argued that defendant waived any challenge regarding dismissal pursuant to Penal Code section 1385, subdivision (a). Asked by the superior court whether he had found any authority as to whether a court could exercise discretion to dismiss the sanity proceedings, counsel for defendant responded: "[T]hat's an area I think that's a little murky, at least in my mind. But I cannot point the court at this juncture at any authority which would in essence force the court to grant us another trial other than by the court's exercise of discretion." The Court of Appeal chose to address the issue notwithstanding any waiver. (People v. Williams (1998) 17 Cal.4th 148, 161-162, fn. 6, 69 Cal.Rptr.2d 917, 948 P.2d 429.)
[2]  Thus, Gonzales determined that the "curative provisions" of Code of Civil Procedure section 473 did not apply to criminal cases, observing that "the procedure in criminal actions is provided for by part II of the Penal Code, which is entitled `Criminal Procedure.' By the express provisions of the Penal Code, certain portions of the Code of Civil Procedure are made applicable to criminal actions. [Citations.] Section 473 of the Code of Civil Procedure is not so incorporated." (Gonzales v. Superior Court, supra, 3 Cal.2d at p. 263, 44 P.2d 320.) Like Code of Civil Procedure section 473, section 630 appears to apply only to civil actions.
[3]  The Court of Appeal in Mapp referred to the "inherently civil nature of a section 1026.2 proceeding." (150 Cal.App.3d at p. 351, 198 Cal.Rptr. 177.) In the civil context, we have articulated the substantive test for a directed verdict as follows. "`A ... directed verdict may be granted "only when, disregarding conflicting evidence and giving to [the] plaintiff's evidence all the value to which it is legally entitled, herein indulging in every legitimate inference which may be drawn from that evidence, the result is a determination that there is no evidence of sufficient substantiality to support a verdict in favor of the plaintiff if such a verdict were given." [Citations.] Unless it can be said as a matter of law, that, when so considered, no other reasonable conclusion is legally deducible from the evidence, and that any other holding would be so lacking in evidentiary support that a reviewing court would be impelled to reverse it on appeal, or the trial court to set it aside as a matter of law, the trial court is not justified in taking the case from the jury. [Citation.] . . . [T]he function of the trial court on a motion for a directed verdict is analogous to ... that of a reviewing court in determining, on appeal, whether there is evidence in the record of sufficient substance to support a verdict. Although the trial court may weigh the evidence and judge of the credibility of the witnesses on a motion for a new trial, it may not do so on a motion for a directed verdict.'" (Dailey v. Los Angeles Unified Sch. Dist. (1970) 2 Cal.3d 741, 745, 87 Cal.Rptr. 376, 470 P.2d 360; Elmore v. American Motors Corporation (1969) 70 Cal.2d 578, 583, 75 Cal.Rptr. 652, 451 P.2d 84.)
[1]  All further statutory references are to the Penal Code.
