
11 Cal.App.4th 899 (1992)
14 Cal. Rptr.2d 579
M & R PROPERTIES et al., Plaintiffs and Appellants,
v.
EDWARD N. THOMSON, as Co-executor, etc., et al., Defendants and Respondents.
Docket No. A056593.
Court of Appeals of California, First District, Division One.
December 11, 1992.
*900 COUNSEL
Michael James Moriatry and John Daniel for Plaintiffs and Appellants.
William E. Gwatkin III for Defendants and Respondents.
OPINION
STEIN, J.
This case presents an issue of first impression: whether a plaintiff can obtain a voluntary dismissal of an action after the defendant has *901 obtained a ruling dismissing the same action involuntarily, but before the order for involuntary dismissal has been filed. The trial court found that in such circumstances the plaintiff had no right to a voluntary dismissal. We agree.
On July 11, 1986, plaintiffs M & R Properties, Rex Nordson and Maria Nordson filed a complaint against defendants estate of Dr. William Dubilier, Edward N. Thomson and Joseph Bachert. The complaint was brought, in part, on the grounds of breach of contract. The contract contained a clause entitling the prevailing party to its attorney fees. When plaintiffs did not bring the matter to trial within five years, defendants moved for mandatory dismissal of the action, a procedure which would be a determination on the merits entitling defendants to their attorney fees. (Code Civ. Proc., §§ 583.310, 583.360; Civ. Code, § 1717; Elms v. Builders Disbursements, Inc. (1991) 232 Cal. App.3d 671, 675 [283 Cal. Rptr. 515].) The motion was noticed for September 12, 1991, at 10:30 a.m. The court issued a tentative ruling on September 11 granting the motion. The ruling further provided that any oral argument would be heard on September 12 at 9 a.m. The local rules of court provide that a party desiring a hearing on the motion must contact the court and opposing counsel "by 4:30 p.m. of the court day preceding the scheduled hearing." (Marin County Super. Ct. Rules, rule 2.9(b).) Plaintiffs did not request oral argument. Instead, on September 12, at 10:39 a.m., they filed a request for dismissal of the action without prejudice. The clerk entered the voluntary dismissal on the same day. Defendants discovered that plaintiffs had obtained the voluntary dismissal when they sent plaintiffs a proposed order granting the motion for mandatory dismissal. Upon defendants' motion, and over plaintiffs' request for relief on the grounds of surprise, inadvertence or excusable neglect (Code Civ. Proc., § 473), the court vacated the voluntary dismissal and entered an order of mandatory dismissal. Plaintiffs appeal from these orders.

DISCUSSION
(1a) We first consider the effect of the tentative ruling. The ruling stated the court's intention to grant the defendants' motion to dismiss. It provided that the ruling would determine the parties' rights unless plaintiffs took affirmative steps to obtain a hearing on the matter. Plaintiffs were given until 4:30 p.m., September 11, to take those steps. When plaintiffs failed to act, the tentative ruling became the ruling of the court. It follows that as of 4:30 p.m., September 11, there was a ruling determining the rights of the parties.
There is no question but that plaintiffs' September 12 voluntary dismissal would have been too late had the September 11 ruling resulted in actual *902 dismissal of the action. The September 11 ruling, however, was not an order of dismissal but only an order granting the motion to dismiss. Code of Civil Procedure section 581d provides that a dismissal ordered by the court does not become effective until a signed, written order of dismissal has been filed. The matter was still pending, therefore, on September 12, when plaintiffs filed their request for voluntary dismissal. (2) A voluntary dismissal, unlike a dismissal ordered by the court, requires no formal, signed order. Rather, a voluntary dismissal "shall be entered in the clerk's register and is effective for all purposes when so entered" (Code Civ. Proc., § 581d). The voluntary dismissal at issue was filed on September 12. Plaintiffs, therefore, obtained a voluntary dismissal after defendants obtained a ruling of mandatory dismissal but before the action was in fact dismissed pursuant to that ruling.
(1b) This case, therefore, involves the conflicting rights of a defendant to a mandatory dismissal  which is intertwined with the duty of the trial court to dismiss an action for lack of prosecution  and of a plaintiff to a voluntary dismissal. We determine that the defendant's right to a mandatory dismissal is the stronger, and conclude that plaintiff's right to seek a voluntary dismissal is cut off by a ruling granting a defendant's motion to dismiss the action for lack of prosecution.
Code of Civil Procedure section 581, subdivision (b)(1),[1] sets forth the right of the plaintiff: "An action may be dismissed in any of the following instances: ... With or without prejudice, upon written request of the plaintiff to the clerk, filed with papers in the case, or by oral or written request to the court at any time before the actual commencement of trial, upon payment of the costs, if any."[2]
The trial court's duty to enter a mandatory dismissal, and the defendant's right to obtain one for lack of prosecution, is set forth in section 581, subdivision (b)(4), and section 583.110 et seq. As relevant here, section 583.310 provides: "An action shall be brought to trial within five years after the action is commenced against the defendant." Section 583.360 provides: *903 "(a) An action shall be dismissed by the court on its own motion or on motion of the defendant, after notice to the parties, if the action is not brought to trial within the time prescribed by this article. [¶] (b) The requirements of this article are mandatory and are not subject to extension, excuse, or exception except as expressly provided by statute." (Italics ours.) (3) Thus, unless some specified exception applies, a trial court has a mandatory duty to dismiss an action and a defendant has an absolute right to obtain an order of dismissal, once five years has elapsed from the date the action was commenced.
(1c) Plaintiffs, however, argue that their right to obtain a voluntary dismissal prior to commencement of trial is "absolute," implying that it is therefore superior to defendants' right to mandatory dismissal. A defendant's right to a mandatory dismissal for failure to prosecute, and the defendant's attendant right to a "determination on the merits" is no less absolute. In plaintiffs' view, a plaintiff will always be able to defeat a defendant's right to obtain a determination on the merits  no matter how meritless the action  by simply requesting a voluntary dismissal after failing to commence trial within the statutory period. In this view, the plaintiff's interest prevails even though the plaintiff has done nothing until after the defendant has moved for a mandatory dismissal, and until after a court has ruled on the defendant's motion. We decline to balance the competing rights in such a fashion as to render a defendant's motion for mandatory dismissal pointless, and the ruling of the court on that motion a nullity.
We have found no case specifically considering the effect of a ruling on a motion to dismiss on a plaintiff's right to a voluntary dismissal. There is, however, abundant authority for the general proposition that a plaintiff's right to a voluntary dismissal is cut off as of the moment there is a ruling which effectively disposes of the case. Chief among the relevant cases is Wells v. Marina City Properties (1981) 29 Cal.3d 781 [176 Cal. Rptr. 104, 632 P.2d 217]. The court there determined that the specific cutoff points enumerated in section 581 are not exclusive; rather the statutory language simply creates limits to the right to voluntary dismissal additional to those established by the case law. (29 Cal.3d at pp. 787-789.) The court cited established law that the plaintiff's right to a voluntary dismissal is cut off upon a ruling which "`will effectively dispose of the case,'" such as when a demurrer to the complaint is sustained without leave to amend. (Id. at p. 785, and see also discussion at pp. 786-787.) The court found that the same principles apply to cut off the right of the plaintiff to seek voluntary dismissal upon the expiration of the time to amend following the granting of a demurrer with leave to amend. As relevant here, the Wells court made it clear that the plaintiff's right is cut off once it is established that there will be *904 no trial; it is not necessary that a formal judgment or order to that effect have been filed. "We conclude, therefore, that once a general demurrer is sustained with leave to amend and plaintiff does not so amend within the time authorized by the court or otherwise extended by stipulation or appropriate order, he can no longer voluntarily dismiss his action pursuant to section 581, subdivision 1, even if the trial court has yet to enter a judgment of dismissal on the sustained demurrer." (Id. at p. 789.) In so holding, the court noted the statutory conflict between the plaintiff's right to voluntary dismissal (§ 581, subd. (1)(b)), and the defendant's right to a dismissal upon a plaintiff's failure to amend following the sustaining of a demurrer (now § 581, subd. (f)(2)). It held that in such a conflict, a defendant's right to a dismissal with prejudice prevails. (29 Cal.3d at p. 783.)
It is not true, as plaintiffs claim, that the only decisions which cut off the right to a voluntary dismissal are those which in some way adjudicate the merits of an action. Section 581, in focusing on "commencement of trial," certainly requires no adjudication of the merits. Indeed, that section was amended to include language of "commencement" in response to concerns that a plaintiff might be able to obtain a voluntary dismissal after the parties had engaged in litigation but before the merits had been fully adjudicated. (Wells v. Marina City Properties, Inc., supra, 29 Cal.3d at p. 788.) In any event, the merits of plaintiffs' instant argument are laid to rest by the Wells court's express citation to London v. Morrison (1950) 99 Cal. App.2d 876 [222 P.2d 941] for the proposition that something other than commencement of trial can act as the cutoff date for voluntary dismissal. The situation in London perhaps most closely parallels our own. In that case, the complaint had been filed in Los Angeles, but the action had been ordered transferred to San Diego. At that time section 581b provided that such an action "must be dismissed by the court in which the action ... was originally commenced ... where the costs and fees [of transfer] have not been so paid for one year after the entry of the order for transfer." The plaintiffs failed to file the requisite transfer fees within the specified time period. The defendants, accordingly, filed a motion to dismiss the action. The plaintiffs filed a request for voluntary dismissal after the defendants' motion was filed, but before it was heard. The court found that the plaintiffs had no right to a voluntary dismissal. "By filing the voluntary dismissal, they undertook to defeat respondents of such rights as might attach to a judgment of dismissal. They knew that a year had elapsed after entry of the order of transfer and that respondents have already filed their motion for a dismissal of the action under the provisions of section 581b. In filing the voluntary dismissal they were in no better position than is the plaintiff who files a dismissal after a cause has been fully tried or a demurrer sustained without leave to amend. Whenever such action has been attempted it ended disastrously for the *905 moving party." (99 Cal. App.2d at p. 879.) As here, the plaintiffs in London contended that they had statutory authority to dismiss their case up until a later date. The court, in rejecting that argument, held: "By such contention they disregard the doctrine that when a statutory exception exists with reference to an asserted right a litigant must bring himself within the exception. Section 581b is a separate statute of equal authority with that of 581. Also, since respondents obtained the order for transfer and a year having expired, they gained a definite substantial right under 581b for a mandatory order of dismissal. No reasonable construction of 581 can override 581b." (Id. at pp. 879-880.)
The court in London, therefore, held that the plaintiffs' right to a voluntary dismissal was cut off once the defendants' right to a mandatory dismissal had become fixed, whether or not by an actual ruling of the court, and irrespective of whether that ruling in any way adjudicated the merits of the case. The Supreme Court in Wells did not fully adopt the holding indicating, rather, that the cutoff date should run from some sort of ruling, at least when the motion to dismiss might be denied. (Wells v. Marina City Properties, Inc., supra, 29 Cal.3d at pp. 789-790, and see Christensen v. Dewor Developments (1983) 33 Cal.3d 778, 785 [191 Cal. Rptr. 8, 661 P.2d 1088], and Cal-Vada Aircraft, Inc. v. Superior Court (1986) 179 Cal. App.3d 435, 442-443 [224 Cal. Rptr. 809].) The Wells court did, however, approve by implication that no adjudication of the merits was necessary to cut off the plaintiffs' right to a voluntary dismissal. Thus, the opinion in Wells supports the conclusion that a plaintiff's right to a voluntary dismissal is cut off no later than the time of a ruling effectively disposing of the case (or at the end of a time period specified in that ruling), whether or not that disposition involves an adjudication of the actual merits of the action. We adopt that conclusion. In addition, we conclude, as have all other courts which considered the matter, that when there is a conflict between a plaintiff's right to voluntary dismissal and a defendant's right to a mandatory dismissal, the defendant's right prevails.
The order vacating plaintiffs' voluntary dismissal and the order dismissing the case for failure to bring to trial within five years are affirmed.
Newsom, Acting P.J., and Dossee, J., concurred.
Appellants' petition for review by the Supreme Court was denied February 18, 1993.
NOTES
[1]  Unless otherwise indicated, all statutory references are to the Code of Civil Procedure.
[2]  "The commencement of trial" is defined in section 581, subdivision (a)(6): "A trial shall be deemed to actually commence at the beginning of the opening statement or argument of any party or his or her counsel, or if there is no opening statement, then at the time of the administering of the oath or affirmation to the first witness, or the introduction of any evidence."

Defendants urge that the "beginning of ... argument" should be construed to include the time that any argumentative papers are filed supporting a motion which will dispose of the case. The statute also may be read as referring to opening argument at trial. As we will resolve this case on other grounds, we need not and do not determine the proper construction of this phrase.
