This is an appeal from a judgment on the merits in favor of the proponents of a will and against the contestant. Before the trial of the contest was ended, the contestant moved the court to dismiss without prejudice and he also announced in open court that he had dismissed the contest and had abandoned it. His contention on appeal is that the trial court should have treated the contest as dismissed and therefore the judgment on the merits was erroneous.
A petition was filed in the superior court to probate the will of the deceased, and proper notice of the hearing of said petition and the time and place thereof was given as required by law. Prior to the hearing of said petition the contestant herein filed his written contest objecting to the probate of the will upon several grounds. The answer of the surviving husband, Frank Matthiessen, in addition to denying the allegations of the contest, set forth an additional ground for the admission of the will to probate to the effect that the decedent had entered into a written contract with him to make the will, and asked as affirmative relief that the will be admitted to probate as the last will and testament of deceased, and for costs.
The trial of the contest came on for hearing. The contestant proceeded to introduce evidence in support of the con*325test. Two days and a portion of the third day were consumed by the cross-examination of the surviving husband. Another witness called by the contestant was an attorney for the proponents of the will. There is considerable dispute between the parties as to the legal effect of what took place in open court while this witness was still on the stand and before the case was submitted for decision, and for that reason we deem it necessary to set it out as briefly as we may. “Mr. Bowring: If the court please, at this time, ... the contestant is dismissing this contest without prejudice. . . . Although I regret consuming the time of the court and the time of counsel and witnesses, these are the instructions that I have received; so I make that motion at this time, that the contest be dismissed without prejudice. . . . The Court: ... I feel that, inasmuch as the motion is made to the court, and because the court is firmly of the opinion that the contest is being dismissed because the contestant feels that his case thus far has shown no bottom in law or in fact, that the motion made is an imposition on the court. I am going to deny it. . . . Mr. Bowring: I might state to the, court that the principal reason, of course; that my client has come to the conclusion that he has, is that he feels that his case has been prejudged and that before he has had an opportunity to present his case this court has taken the position that amounts to a determination more or less in advance that upon his theory of the case that he cannot prevail. Now, under these circumstances I think that the actor in any case has a right to abandon the case, either permanently or to abandon it with the idea that if upon further investigation and further preparation, he feels and is advised, that he can present a stronger ease, that he may wish to resubmit it to the court. . . . The Court: . . . I hold the statements are unwarranted, and are a slander on the court. The only possible basis in fact for such statements would be the remarks which the court made to both counsel, when both counsel were called to the bench yesterday, and the reporter was asked to step up to the bench. At that time the court informed you, Mr. Bowring, if I recollect correctly, that we were getting no place fast. . . . Now, you have wasted, if this motion were granted, two days of this court’s time, and the court is not going to allow it. You may proceed with the case.”
*326The court proceeded with the trial and entered judgment on the merits as heretofore set forth.
The contention of the contestant is that a will contest is, in effect, a civil action wherein the contestant is plaintiff; that a plaintiff has an absolute right to dismiss without prejudice at any stage of the proceedings prior to submission and the word “may” in the first sentence of section 581 of the Code of Civil Procedure is mandatory and does not make the right to dismiss discretionary with the court; that the action taken by contestant’s counsel at the trial amounted to an actual dismissal, not merely a motion to dismiss; that even granting there was no actual dismissal, but merely a motion to dismiss, it was not a matter of discretion and the dismissal should have been entered as a matter of course; and that even conceding that the matter was one for the exercise of legal discretion, such discretion was grossly abused under the circumstances shown by the record.
Section 581 of the Code of Civil Procedure in so far as it is germane to the questions here presented provides as follows: An action may be dismissed, or a judgment of nonsuit entered, in the following cases: 1. By the plaintiff, by written request to the clerk, filed with the papers in the case, at any time before the trial, upon payment of the costs, provided that affirmative relief has not been sought by the cross-complaint or answer of the defendant. Such dismissal must be made by entry in the clerk’s register and is effective for all purposes when so entered. No such dismissal shall be granted unless upon the written consent of the attorney of record of the plaintiff. 4. By the court, when upon the trial and before the final submission of the case, the plaintiff abandons it. Such dismissal must be made by order of the court entered upon the minutes thereof.
It has been said that the word “may” as used in the section must be construed as “must”, leaving no discretion with the court, but this statement was made with reference to subdivision one of the section, which provides that the party may dismiss by written request to the clerk filed with the papers in the case and that when this request is entered by the clerk it is effective for all purposes. Obviously such a dismissal does not require an order of the court. The filing of the written request with the clerk and the entry thereof by him ipso facto constitutes a dismissal, and naturally there is no
*327discretion left in the trial court. However, the subsection does require a written request to the clerk and an entry by the clerk, and the benefits of the section may not be invoked if affirmative relief is sought in the answer of the defendant. Contestant insists that the proponent of the will had no legitimate right to seek affirmative relief in his answer, and yet the fact remains that by the very terms of the statute in such a contest “the court must render judgment, either admitting the will to probate or rejecting it” (Probate Code, sec. 373), and that a prayer that the will be admitted to probate is ordinary routine in the answer to a will contest, and that contestant himself saw no objection to it, made no objection to it, in the trial court. It is obvious, therefore, that the contestant may not claim relief under subdivision one of said section 581. In so far as subdivision four of the section is concerned, the dismissal contemplated therein must be by the court, and the word “may” as to said subdivision four does not mean “must”, the court having inherent power to exercise a legal discretion in the matter. (Chapman v. Superior Court, 1 Cal. App. (2d) 512 [36 Pac. (2d) 1093].)
With regard to contestant’s claim that the court grossly abused its discretion under the circumstances shown by the record, we make the following observations: The whole policy of the law in California favors speedy administration and settlement of estates and demands that administration shall be accompanied with reasonable dispatch and as soon as may be, and for this reason representatives should not be exposed to unnecessary litigation nor should dilatory procedure be permitted or encouraged. (11A Cal. Jur. 139, sec. 77, and cases cited.) While it has been said that each step in a probate proceeding is separate, largely the import of what is meant is that the proper jurisdictional steps must be taken • as to each and the orders entered in the separate steps of the administration may not be attacked collaterally but only directly. “ ... as to various proceedings it has been said that they are but steps in the administration of the estate. . . . Thus the contest of a will is not a new action or proceeding, but receives all its vitality from and has its origin in the original petition to probate the will and the statutory provisions governing the proceedings.” (11A Cal. Jur. 134, and eases cited.) Certainly a petition to probate a will and a contest thereof before probate are not separate in many *328respects. Upon the filing of the written grounds of opposition to probate, action in respect of the admission of the instrument is suspended, nor may probate be decreed until the contest is determined. (26 Cal. Jur. 1078.) By statute also, where a will is contested the subscribing witnesses must be produced and examined or their absence must be accounted for. (Probate Code, sec. 372.) And, as already stated, upon the trial of the contest the court must render judgment either admitting the will to probate or rejecting it. Regardless of what has been heretofore loosely said in the cases with regard to each step in a probate proceeding being separate, it is patent that the petition to probate the will and the contest thereof before probate are inextricably bound together.
We hold that the trial court was entitled to exercise a legal discretion in the matter of dismissing the contest, and we hold also that under the circumstances set forth in this case the court did not abuse its discretion in denying the motion to dismiss.
After consuming three days of the court’s time in the trial, the contestant was attempting to dismiss because he felt that under his theory of the case he could not prevail. If the motion to dismiss had been granted he might have succeeded in starting a new contest before the will was admitted to probate. Even if the will had been admitted to probate he might have waited until near the end of six months before starting a new contest and the contest might have taken a considerable time thereafter. The trial- court apparently thought that under the circumstances the nuisance value of the contest was too great to grant the motion.
Judgment affirmed.
Wood, J., and McComb, J., pro tom., concurred.
A petition by appellant to have the cause heard in the Supreme Court, after judgment in the District Court of Appeal, was denied by the Supreme Court on January 20, 1936.