
52 Cal.2d 666 (1959)
J. C. PENNEY COMPANY (a Corporation), Petitioner,
v.
SUPERIOR COURT OF FRESNO COUNTY, Respondent; IRENE JOHNSON et al., Real Parties in Interest.
S. F. No. 20182. 
Supreme Court of California. In Bank.  
Sept. 15, 1959.
 Stammer, McKnight & Barnum and Dean A. Bailey for Petitioner.
 Robert M. Wash, County Counsel, and Floyd R. Viau, Deputy County Counsel, for Respondent.
 James K. Kubota and Mikio Uchiyama for Real Parties in Interest.
 TRAYNOR, J.
 Petitioner seeks a writ of prohibition to prevent respondent superior court from proceeding in an action on the ground that it must be dismissed under section 583 of the Code of Civil Procedure for plaintiffs' failure to bring it to trial within five years.
 Plaintiffs filed the action on December 31, 1953, but did not serve the first amended complaint and summons on petitioner until December 31, 1956. Petitioner filed its answer on January 21, 1957. On December 5, 1957, nearly four years after the action was begun, plaintiffs filed a memorandum to set the case for trial. Respondent court set the pretrial conference for March 21, 1958, and the trial for May 15, 1958. Before the time set for the pretrial conference had arrived, petitioner and plaintiffs agreed to the following stipulation:
 "Stipulation and Order Continuing Pre-Trial Conference."
 "It is hereby stipulated, by and between the parties hereto, that the pre- trial conference in the above entitled action, heretofore set for March 21, 1958, may be continued to be re-set upon motion of either party in order to permit the parties to complete the taking of depositions and discovery procedures."
 "Dated: March 12, 1958."
 Counsel for both parties signed the stipulation and filed it on March 12, 1958. Both parties continued to take depositions and avail themselves of other discovery procedures until October 1958. Plaintiffs made no attempt to set the case for pretrial conference or for trial between October 1958, the end of the period contemplated by the stipulation, and December 31, 1958, the end of the five-year period allowed by section 583. Plaintiffs spent this time attempting to join *669 another defendant. On January 8, 1959, petitioner moved to dismiss the action under section 583. Respondent court denied the motion and set the pretrial conference for February 10, 1959, and the trial for March 2-4, 1959. The parties had submitted a joint pretrial statement and the court had filed a pretrial conference order when petitioner filed its petition for a writ of prohibition on February 24, 1959.
 [1] Either a writ of mandate to compel dismissal or a writ of prohibition to prevent the trial of the action is an appropriate remedy after the time prescribed by section 583 has expired. (Andersen v. Superior Court, 187 Cal. 95, 97-100 [200 P. 963]; Tomales Bay etc. Corp. v. Superior Court, 35 Cal.2d 389, 392 [217 P.2d 968]; 3 Witkin, California Procedure 2569.)
 The relevant part of section 583 provides:
 "Any action heretofore or hereafter commenced shall be dismissed by the court in which the same shall have been commenced ... unless such action is brought to trial within five years after the plaintiff has filed his action, except where the parties have filed a stipulation in writing that the time may be extended. ..."
 [2] Plaintiffs contend that the stipulation signed by both parties on March 12, 1958, extended the five-year period prescribed by this section. To serve as such an extension the stipulation must be written and extend in express terms the time of trial to a date beyond the five-year period or expressly waive the right to a dismissal. (Miller & Lux, Inc. v. Superior Court, 192 Cal. 333, 338 [219 P. 1006].) Stipulations that merely extend the time for trial within the five-year period, absent a showing that the parties intended otherwise, will not extend the five-year period. (Larkin v. Superior Court, 171 Cal. 719, 723 [154 P. 841, Ann.Cas. 1917D 670]; City of Los Angeles v. Superior Court, 185 Cal. 405, 412 [197 P. 79]; Rio Vista Min. Co. v. Superior Court, 187 Cal. 1, 3 [200 P. 616].) [3] Stipulations under section 583, however, are no different from other contracts (Smith v. Bear Valley etc. Co., 26 Cal.2d 590, 601 [160 P.2d 1]), and are subject to the same rules of construction (Woley v. Turkus, 51 Cal.2d 402, 407 [334 P.2d 12]).
 Plaintiffs do not dispute the foregoing rules. Instead, they contend that the cases cited must be reappraised in the light of the pretrial rules adopted by the Judicial Council for the Superior Courts (see 47 Cal.2d 3-9, as amended, 50 Cal.2d 71-73), and that the stipulation entered into for the express *670 purpose of extending the pretrial conference necessarily extended the time for trial beyond the five-year period. [4] It is true that, with certain minor exceptions (rules 9 and 9.5), the pretrial conference is now an essential part of the trial procedure in "every civil case in which a memorandum to set is filed" (rule 8). It is also true that the rules require counsel to complete their depositions and other discovery proceedings before the pretrial conference (rule 8.2, as amended, 50 Cal.2d 71). Indeed, the efficient functioning of the pretrial procedure depends upon such preparation by counsel. (See Cantillon v. Superior Court, 150 Cal.App.2d 184, 187 [309 P.2d 890]; Kincaid, Pre-Trial Comes to California, 30 State Bar J. 414, 417; Kincaid, Pre-Trial Conference Procedure in California, 4 U.C.L.A. L. Rev. 377, 379.) [5] Even though the pretrial conference must precede the trial, it does not follow that a valid stipulation extending the time of pretrial conference necessarily extends the time prescribed by section 583.
 [6] The filing of an amended complaint or the deciding of preliminary motions or demurrers may also be necessary prerequisites to the trial, and a stipulation postponing the time for doing either would necessarily extend the time for trial. It has never been held, however, that such a stipulation extends the time for trial beyond the five-year period, absent a showing that the parties so intended. [7] On the contrary, it has been held that "... even though a part of the five-year period must necessarily be consumed in service of process, disposition of demurrers, amendment of pleadings, if necessary, usual and reasonable time consumed in waiting for a place on the court's calendar or in securing the attendance of a jury and suchlike usual and necessary proceedings; ... the section does not contemplate that time consumed in such ordinary proceedings are to be excluded from a computation of the five-year period." (Continental Pacific Lines v. Superior Court, 142 Cal.App.2d 744, 750 [299 P.2d 417].)
 [8] Plaintiffs apparently assume that the pretrial conference marks the beginning of the trial in contending that "pre-trial procedure ... is an integral part of the trial of the case." A pretrial conference, however, is merely a step, even though a vital one, leading to the trial. [9] The pretrial rules do not affect the operation of section 583. They repeatedly distinguish pretrial conference and the trial and thus make clear that in adopting the pretrial procedure the Judicial Council did not regard an action as brought to trial *671 by the holding of a pretrial conference.  [fn. 1] Despite the addition of another step in the necessary proceedings leading to the trial, the case must still be "brought to trial within five years after the plaintiff has filed his action. ..." Moreover, the stipulation herein did not extend the pretrial conference beyond the five-year period. It was filed on March 12, 1958--more than nine months before the expiration of that period. A case more appropriate for plaintiffs' argument would be presented had the stipulation expressly set the date of the pretrial conference after the five-year period. Even if such a stipulation automatically extended the five-year period (cf. Fisher v. Superior Court, 157 Cal.App.2d 126, 131 [320 P.2d 894], expressly leaving the question open), we have no such stipulation here.
 [10] Despite its "apparently mandatory language" (Wyoming Pacific Oil Co. v. Preston, 50 Cal.2d 736, 740 [329 P.2d 489]) section 583 is subject to certain implied exceptions (Rose v. Knapp, 38 Cal.2d 114, 117 [237 P.2d 981] and cases cited). Thus, the time during which "for all practical purposes, going to trial would be impossible, whether this was because of total lack of jurisdiction in the strict sense, or because proceeding to trial would be both impracticable and futile" (Christin v. Superior Court, 9 Cal.2d 526, 533 [71 P.2d 205, 112 A.L.R. 1153]) must be excluded in computing the five-year period. (See Pacific Greyhound Lines v. Superior Court, 28 Cal.2d 61, 64 [168 P.2d 665]; City of Pasadena v. City of Alhambra, 33 Cal.2d 908, 916 [207 P.2d 17]; Rose v. Knapp, supra, at 117; Wyoming Pacific Oil Co. v. Preston, supra, at 740-741; Woley v. Turkus, 51 Cal.2d 402, 406-407 [334 P.2d 12]; see also Vecki v. Sorensen, 171 Cal.App.2d 390, 395 [340 P.2d 1020].) [11] Although plaintiffs do not explicitly raise the question whether their case comes within this exception, we have examined that possibility since "an insufficient stipulation may be material evidence upon the *672 issue whether it was impossible, impracticable or a futile gesture to bring the action to trial" (Woley v. Turkus, supra, at 408). Even had it been impossible for plaintiffs to go to trial during the time covered by the stipulation, since neither party was prepared for the pretrial conference (see rule 8.2, supra), that impossibility would be of no avail to plaintiffs. Nearly two months remained after the discovery proceedings were completed in which plaintiffs could have set the case for a pretrial conference and a trial within the five-year period. It is true that plaintiffs spent this time seeking to join a second defendant, but nothing prevented their proceeding to pretrial conference and trial against this petitioner while they were seeking to join another party.
 Let the peremptory writ of prohibition issue as prayed.
 Gibson, C.J., Schauer, J., Spence, J., McComb, J., Peters, J., and White, J. concurred.
NOTES
[fn. 1]  1. Thus, the rules provide that a case requiring a pretrial conference shall be assigned a time for the conference preceding the time of the trial (rule 8.1); that the parties need not disclose their witnesses at the conference (rule 8.3); and that the pretrial conference judge shall set the time and place of trial (rules 8.4 and 8.12). The rules governing the conduct of the conference (8.3), the scope of the pretrial conference order (8.6) and the effect of that order upon the subsequent course of the case (8.8) demonstrate that the conference does not mark the beginning of the trial. (See also, Miller & Lux, Inc. v. Superior Court, 192 Cal. 333, 342 [219 P. 1006]; City of Los Angeles v. Superior Court, 15 Cal.2d 16, 19-22 [98 P.2d 207]; Meier v. Superior Court, 55 Cal.App.2d 675, 676 [131 P.2d 554].)
