This proceeding involves the construction and interpretation of section 583 of the Code of Civil Procedure, which requires the dismissal of an action on motion of the defendant, or on the court’s own motion, if not brought to trial within five years after answer is filed.
*407 The matter is before this court on petition for a writ of mandate to require the superior court of Tuolumne County and the judge thereof to enter an order of dismissal in the case of Inyo Development Company v. The City of Los Angeles, pending in that court. The action was begun July 19, 1913, and was brought to enjoin the city of Los Angeles from diverting the waters of the Owens River from their natural channel, to the alleged detriment of plaintiff’s prior rights.
■Although there is some controversy as to the date of the filing of the answer of defendant, it satisfactorily appears that such answer was filed on or about the 17th of November, 1913. The action was never brought to trial, and on or about the twenty-first day of November, 1919, over six years after answer was filed, the defendant served its notice of motion for a dismissal. On the hearing of the motion the court made its order denying the application, and thereafter defendant filed its petition in this court for the issuance of the writ which is the subject of this hearing.
Section 583 of the Code of Civil Procedure reads as follows: “The court may in its discretion dismiss any action for want of prosecution on motion of the defendant and after due notice to the plaintiff, whenever plaintiff has failed for two years after answer filed to bring such action to trial. Any action heretofore or hereafter commenced shall be dismissed by the court in which the same shall have been commenced or to which it may be transferred on motion of the defendant, after due notice to plaintiff or by the court on its own motion, unless such action is brought to trial within five years after the defendant has filed his answer, except where the parties have stipulated in writing that the time may be extended.”
The principal contention arises upon the interpretation of the last clause of the section, wherein the requirement for a dismissal after five years is qualified by the words, “except where the parties have stipulated in writing that the time may be extended.”
Respondents insist upon a literal and restricted interpretation of the clause quoted, as meaning that if there has been an extension of time by written stipulation, whether for a day or a year, whether expressly limited or general in its *408 terms, that the mandatory force of the provision is forever waived and nullified.
In this case there was a stipulation which resulted in an extension of the five-year limitation.
The case had been set for trial on the application of the defendant for the fourth day of October, 1915, nearly two years after the filing of the answer. A continuance was demanded by the plaintiff, which was opposed by the defendant on the ground, among others, that there were important witnesses who could not be obtained again for many months if the trial was postponed. A continuance for one year was finally agreed to, however, under the following stipulation, signed by both parties:
“It is hereby stipulated by and between the plaintiff and the defendant, The City of Los Angeles, that the above entitled cause shall not be tried prior to one year from the date hereof unless by the mutual consent of the parties hereto, and that at least ninety days’ notice of the time set for the trial of said cause shall be given by the party moving for the setting of said cause, to the other party hereto.
“It is further understood that the said period of one year from the date hereof, during which the said cause shall not be tried, is consented to by both parties hereto; that the said plaintiff shall not be held to have failed to prosecute said cause during the said year, and that no part of the said year shall be considered should any question arise in said cause concerning the prosecution thereof.”
This provision was not an express stipulation that the time for trial might be extended beyond the five-year period. Defendant was still at liberty, after a reasonable space of time, at least beyond the year’s continuance, to move the court for a dismissal under the discretionary power of the *409 court to dismiss after two years for want of prosecution under the first provision of section 583; but it did have the further effect of eliminating the year covered' by the stipulation from consideration if application for dismissal should be made under either clause of the code section. It might still be questioned, however, if we are to insist upon a strict and literal interpretation of the statute, if this can be construed as a stipulation or consent that the bringing of the cause to trial could be postponed beyond the five years’ limit. It merely effected an estoppel upon the defendant to count the period of this continuance as part of the time limit of the code provision.
But conceding that the stipulation is within the exception of the code section, and is an express stipulation in writing that the time in which to bring the cause to trial may be extended beyond the statutory limit, we cannot agree with respondents that the mandatory force of the statute is destroyed thereby. Its operation is merely postponed. It is clear that such was the intention of the parties. This express agreement that the year of continuance should not be counted was an implied notice that the right to rely upon the statute should not be otherwise impaired.
Respondents’ position goes to the extent of holding that an express agreement which would extend the time within which to bring a cause to trial beyond the five years for “one day and no more” would be a complete waiver of all right to a dismissal under this section for all future time. We think the requirement means that such dismissal “shall be granted unless such action is brought to trial within five years after the defendant has filed his answer,” except where, pursuant to a stipulation of the parties, a different limit has been fixed. It would be a strange situation if a defendant who had the right under this section of the code to a peremptory dismissal of the action against him could not give the plaintiff a few days of grace and at the same time reserve his right to insist upon such dismissal if the stipulated conditions were broken.
This exception was not intended to detract anything from the mandatory force of the statute. The provision was made for the benefit of both the courts and litigants. The court may exercise the power of dismissal on its oivn motion, but the right is given to the parties to extend the period, *410 providing it is done by a written stipulation. The very word “extended” negatives the idea of termination or abrogation. The statute fixes the limitation at five years, the parties, by written agreement, may extend this period for a day, a month, or a year, which is the most that can be said for the stipulation in this case.
Were it not for the, fact that this enactment to prevent unlimited postponement of trials is to an extent one of public policy as well as of private concern to the litigants, there would have been no occasion for providing permission for an extension of the time” by stipulation of the parties. Ordinarily, in matters affecting only the rights of the parties they are at liberty to enlarge or curtail the operation of the statute by stipulation at their pleasure. (Civ. Code, sec. 3513.)
Johnston
v.
Baker,
Respondents call special attention to the decision in
Nathan,
v.
Dierssen,
If it may be inferred from the record on that appeal that the court was of the opinion that mere written extensions of the time of trial during and not extending beyond the five-year period were stipulations within the meaning of section 583 of the Code of Civil Procedure, operating to prolong *412 or extinguish the time within which an order of dismissal should be made, in the absence of conditions creating an estoppel, such opinion is overruled by the decision of this court in Bank in the case of Larkin v. Superior Court, supra.
In the absence of such express stipulation or equitable estoppel the rule as laid down in Larkin v. Superior Court is that no such extension of time can be inferred from a stipulation fixing a trial date or granting continuances for periods within the five years, under circumstances which do not preclude the plaintiff from bringing the cause to trial within the prescribed time, notwithstanding such stipulated delay. As is said in that opinion: “There is nothing in this that can fairly be taken as indicating any consent on the part of the defendants that the five-year period shall be extended by so much as a single minute, or as intimating to defendant that any such extension would be permitted. It is a stipulation in writing extending the five-year period that the statute provides for, and without such stipulation, certainly in the absence of some element of estoppel, there can be no effective answer to a motion to dismiss.”
For the reasons we have stated there is no merit in any of respondents’ objections to the issuance of a peremptory writ of mandate, which are based upon the stipulation here considered.
It is true that the effect of the limitation in section 583 of the Code of Civil Procedure on the five-year period of dismissal under the exception “where the parties have stipulated in writing that the time be extended” might well have been more fully expressed in the statute, but in view of the nature and purpose of the enactment there can be no reasonable question that this exception clearly implies that the extension referred to is only such as is covered by the stipulation. Whatever is necessarily implied in a statute is as much a part of it as that which is expressed, and the statute must be construed with reference to the purpose to be served by it.
(Johnston
v.
Baker, supra; Bailey
v.
State,
There are a number of other circumstances arising out of the proceedings in this case, which respondents contend should operate to establish waiver or estoppel of the defendant in pressing this motion for dismissal, which we do not deem it necessary to discuss separately. They are all based upon the nature and importance of the" issues involved in the action, the delay in determining the court in which the action should be tried, and the judge who should preside at the trial, demands and agreements for continuances, negotiations for stipulations as to uncontested facts, correspondence and conferences with a view to reaching a settlement out of court.
Let a peremptory writ of mandate issue as prayed for.
Shaw, J., Olney, J., Lawlor, J., Wilbur, J., Lennon, J., and Angellotti, C. J., concurred.
Rehearing denied.
All the Justices concurred.
