I respectfully dissent.
The majority has rewritten Code of Civil Procedure section 391.71 to say what it believes the statute should say. But, “[i]n the construction of a statute . . ., [our role] is simply to ascertain and declare what is in terms or in substance contained therein, not to insert what has been omitted, or to omit what has been inserted . . . .” (§ 1858.) Only the Legislature can rewrite a statute. All we can do is faithfully apply the rules of statutory construction.
According to those rules, “ ‘we must ascertain the intent of the drafters so as to effectuate the purpose of the law. [Citation.] Because the statutory language is generally the most reliable indicator of legislative intent, we first examine the words themselves, giving them their usual and ordinary meaning and construing them in context.’ [Citation.]” (Mejia v. Reed (2003) 31 Cal.4th 657, 663 [3 Cal.Rptr.3d 390, 74 P.3d 166].) If the language of a statute is unambiguous, the plain meaning governs and it is unnecessary to resort to extrinsic sources to determine the legislative intent. (Kavanaugh v. West Sonoma County Union High School Dist. (2003) 29 Cal.4th 911, 919 [129 Cal.Rptr.2d 811, 62 P.3d 54].) If the statutory language does not yield a plain meaning, we may consider extrinsic evidence of intent. (Mejia v. Reed, supra, at p. 663.) In other words, when the statutory language is ambiguous and susceptible to more than one reasonable interpretation, “we look to a variety of extrinsic aids, including the ostensible objects to be achieved, the evils to be remedied, the legislative history, public policy, contemporaneous administrative constmction, and the statutory scheme of which the statute is a part.” (Nolan v. City of Anaheim (2004) 33 Cal.4th 335, 340 [14 Cal.Rptr.3d 857, 92 P.3d 350].)
Our work begins with testing the clarity of the statutory language. Section 391.7, subdivision (c), provides, in relevant part: “The clerk may not file any litigation presented by a vexatious litigant subject to a prefiling order unless the vexatious litigant first obtains an order from the presiding judge permitting the filing. If the clerk mistakenly files the litigation without the order, any party may file with the clerk and serve on the plaintiff and other parties a notice stating that the plaintiff is a vexatious litigant subject to a prefiling order as set forth in subdivision (a). The filing of the notice shall automatically stay the litigation. The litigation shall be automatically dismissed unless the plaintiff within 10 days of the filing of that notice obtains an order from *206the presiding judge permitting the filing of the litigation as set forth in subdivision (b). If the presiding judge issues an order permitting the filing, the stay of the litigation shall remain in effect, and the defendants need not plead, until 10 days after the defendants are served with a copy of the order.” (§ 391.7, subd. (c).)
The applicability of section 391.7 to this case is anything but clear. The statute refers to the “fil[ing]” of “litigation.” The term “file” is not defined in the vexatious litigant statutory scheme. “File” has been defined as “[t]o deposit in the custody or among the records of a court. To deliver an instrument or other paper to the proper officer or official for the purpose of being kept on file by him as a matter of record and reference in the proper place.” (Black’s Law Dict. (6th ed. 1990) p. 628, col. 1.) “Filing with court” is defined as “[djelivery of legal document to clerk' of court or other proper officer with intent that it be filed with court.” (Black’s Law Diet., supra, p. 628, col. 2.) “Litigation” is defined in section 391, subdivision (a), as “any civil action or proceeding, commenced, maintained or pending in any state or federal court.” Simply put, the narrow definition of filing is incongruous with the broad definition of litigation; i.e., “litigation” encompasses much more than things that are filed. But the Legislature referred to the filing of “litigation,” a word it defined, broadly in section 391. This creates an ambiguity as to whether the Legislature intended a prefiling order to curb just the filing of a new case, or also , the continuing litigation of a case.
I note that the vexatious litigant statutes do not appear to have anticipated the situation presented in the instant case, namely when a vexatious litigant subject to a prefiling order is initially represented by counsel and then loses legal representation. Nothing in the statutes indicates that the subsequent retention of counsel cures the defect of appearing in propria persona, which is what the parties, the tdál court, and the majority assume; And, nothing in section 391.7 expressly prohibits a vexatious litigant from proceeding in propria persona after his or her complaint has been filed by an attorney then representing the plaintiff.2 This silence, when considered with the uncertain *207application of the definitions of the key terms in section 391.7, bolsters my conclusion that the statute is, at best, ambiguous. This is where the courts come in. Our job is-to resolve this ambiguity in a just and wise manner.
For answers, I turn to public policy.
There are a number of policies implicated, and we must assess their interplay. First, there is the policy behind the vexatious litigant statutes. “Vexatious litigant statutes were created ‘to curb misuse of the court system by those acting in propria person[a] who repeatedly relitigate the same issues.’ [Citation.]” (Bravo v. Ismaj (2002) 99 Cal.App.4th 211, 220-221 [120 Cal.Rptr.2d 879].) “The Legislature first enacted sections 391.1 through 391.6 in 1963, as a means of moderating a vexatious litigant’s tendency to engage in meritless litigation. [Citations.] Under these sections, a defendant may stay pending litigation by moving to require a vexatious litigant to furnish security if the court determines ‘there is not a reasonable probability’ the plaintiff will prevail. Failure to produce the ordered security results in dismissal of the litigation in favor of the defendant. [Citations.]” (Bravo v. Ismaj, supra, at p. 221.)
The second public policy is a corollary to the first, and it establishes that one of the best ways to control abusive litigation is with gatekeeping. “In 1990, the Legislature enacted section 391.7 to provide the courts with an additional means to counter misuse of the system by vexatious litigants. Section 391.7 ‘operates beyond the pending case’ and, authorizes a court to enter a ‘prefiling order’ that prohibits a vexatious litigant from filing any new litigation in propria persona without first obtaining permission from the presiding judge. [Citation.] The presiding judge may also condition the filing of the litigation upon furnishing security as provided in section 391.3. [Citation.]” (Bravo v. Ismaj, supra, 99 Cal.App.4th at p. 221.)
Third, there is a well-established public policy in favor of trials on the merits. (§ 583.130.)
Taken together, these policies compel me to conclude that Forrest’s action should not have been dismissed pursuant to section 391.7.3 Forrest’s first *208amended complaint, the operative pleading, was filed by Forrest through her counsel, a “neutral assessor[]” of her claims. (In re Shieh (1993) 17 Cal.App.4th 1154, 1167 [21 Cal.Rptr.2d 886].) That pleading was proven to have merit. It largely withstood respondents’ demurrer and motion to strike. Her claims partially survived respondents’ motion for summary adjudication. A jury had even been impaneled and trial had commenced on her causes of action. Permitting this litigation to proceed would not have transgressed either the first or second policies because the litigation was not theritless, and the gatekeeping function was not implicated by the operative pleading because it was filed by a lawyer. Finally, dismissal contravenes the policy of trial on the merits. That is all the more true here. Through no fault of Forrest, a mistrial was declared.* **4 Based upon these circumstances, dismissal was unjust.5
I conclude that a prefiling order governs only the initiation of a lawsuit, not what occurs during the prosecution of the litigation. (See, e.g., Bravo v. Ismaj, supra, 99 Cal.App.4th at pp. 221-222 [§ 391.7 “operates solely to preclude the initiation of meritless lawsuits”]; Weil & Brown, Cal. Practice Guide: Civil Procedure Before Trial (The Rutter Group 2001) ][ 1:914, p. 1-192.6 (rev. #1, 2000) [“Plaintiffs who litigate in propria persona and repeatedly file frivolous pleadings or motions, or attempt to relitigate issues previously determined against them, may be barred from filing new lawsuits without prior leave of court”].) This interpretation does not leave trial courts without a tool to prevent litigation from getting out of hand. Aside from the protections of other sections contained in the Code of Civil Procedure, such as section 128.7, if a plaintiff loses her counsel midstream,' the defendants can *209move for security pursuant to sections 391.1 and 391.3.6 This remedy alleviates the majority’s concern of a vexatious litigant engaging in harassing behavior during the prosecution of an action, while also protecting a plaintiff with a valid claim.
All further statutory references are to the Code of Civil Procedure unless otherwise indicated.
The legislative history does not expressly address whether section 391.7 was intended to apply to a plaintiff who is subject to a prefiling order and loses her legal representation at some point during the litigation. However, some of the legislative history indicates that a prefiling order prohibits a vexatious litigant from filing, in propria persona, “any further suits.” (Review of Selected 1990 California Legislation (1990) 22 Pacific L.J. 323, 451.) Similarly, financial reports filed in support of the legislation suggest that prefiling orders restrict “the filing of vexatious lawsuits” (Cal. Dept. of Finance, Enrolled Bill Rep. on Sen. Bill No. 2675 (1989-1990 Reg. Sess.) Aug. 20, 1990) and “reduce the number of unnecessary, frivolous lawsuits filed against the State.” (Cal. Dept. of Finance, Enrolled Bill Rep. on Sen. Bill No. 2675 (1989-1990 Reg. Sess.) Aug. 21, 1990.) One of the specific findings set forth in the bill report was that the statute would “make it more difficult to file frivolous suits and actions.” (Cal. Dept. of Finance, Enrolled Bill Rep. on Sen. Bill No. 2675, supra, Aug. 21, 1990.)
To the extent the majority contends that pursuant to section 391.7, subdivision (c), the trial court had the discretion to dismiss Forrest’s action after granting her several continuances to obtain new counsel, this analysis is flawed. Even if section 391.7; subdivision (c), governed, which I do not believe it does, then dismissal of Forrest’s action should have been automatic. (See § 391.7, subd. (c) [“The litigation shall be automatically dismissed”].) The statute does not use the word “may” and is not permissive, .as the majority posits. (Maj. opn., ante, at p. 199, fn. 12.) Rather, it deliberately uses the words “shall” and “automatic[],” establishing the statute’s firm mandate. (See, e.g., People v. Standish (2006) 38 Cal.4th 858, 869 [43 Cal.Rptr.3d 785, 135 P.3d 32].) It follows that, if section 391.7, subdivision (c), applies beyond *208the initial filing of a lawsuit, the trial court would have had no discretion to grant Forrest a continuance. She would have had 10 days to obtain the presiding judge’s permission to proceed with her litigation once the respondents gave her notice that she was subject to a prefiling order. In the absence of permission, her action would have been automatically dismissed.
The majority asserts that the trial judge “became unavailable to complete the case.” (Maj. opn., ante, at p. 190.) There is no evidence that the trial judge could not have completed the trial prior to his transition to the Court of Appeal or otherwise have obtained permission to finish a trial that had already commenced.
Neither did the trial court have the inherent authority to dismiss Forrest’s first amended complaint, as suggested by the majority. Aside from the fact that this issue , was not briefed by the parties, because litigants may ■ represent themselves, the trial court lacked the inherent authority to order Forrest to retain counsel and then, on its own motion, dismiss Forrest’s action for failure to retain counsel if she was not required to be represented by counsel after her attorney withdrew.
In fact, Forrest did offer to post security.