Opinion
Following reversal of a judgment for plaintiff in an unlawful detainer action, plaintiff caused the action to be dismissed. Defendant thereafter filed a motion for the award of attorney’s fees and the trial court made an order allowing such fees, but in a lesser amount than prayed. Both parties have appealed this order.
The rental agreement between the parties provided that in the event of default the tenant shall “pay to Landlord all sums to which he may be entitled, including damages, reasonable attorney’s fees, and any other expenses caused by such default or in regaining possession of the premises.” Civil Code section 1717 provides that “[i]n any action on a contract . . .” where the contract allows attorney’s fees incurred in enforcing the contract to one party, the prevailing party may recover attorney’s fees, whether he is the party specified in the contract or not. It further defines “prevailing party” as “. . . the party in whose favor final judgment is rendered. ” (Italics added.)
At least two appellate opinions hold that a defendant is not entitled to recover attorney’s fees under Civil Code section 1717 in an action after the plaintiff voluntarily dismisses it prior to trial (International Industries, Inc. v. Olen (1978) 21 Cal.3d 218 [145 Cal.Rptr. 691, 577 P.2d 1031]; Associated Convalescent Enterprises v. Carl Marks & Co., Inc. *Supp. 28(1973) 33 Cal.App.3d 116 [108 Cal.Rptr. 782]). In the instant case a trial had been held prior to dismissal of the action by plaintiff, but the judgment resulting from that trial had been reversed on appeal and, prior to retrial, plaintiff caused the action to be dismissed. We proceed to consider whether this factual difference should dictate a different result from the International Industries and Associated Convalescent cases. The opinion in the latter case includes discussion of the Court of Appeal’s reasoning which is helpful to our determination of the instant case, as follows:
“A dismissal of an action by a plaintiff under section 581, subdivision 1, when a defendant has not sought affirmative relief, must be distinguished from dismissals entered by order of court pursuant to other provisions of the code. It is available to plaintiff as a matter of right and is accomplished by filing with the clerk a written request therefor. If in proper form, the dismissal is effective immediately. (Egly v. Superior Court, 6 Cal.App.3d 476, 479-480 [86 Cal.Rptr. 18].) The entry is a ministerial, not a judicial, act, and no appeal lies therefrom (Cook v. Stewart McKee & Co., 68 Cal.App.2d 758, 760-762 [157 P.2d 868]; see generally, 6 Witkin, Cal. Procedure (2d ed. 1971) Appeal, § 58, subd. (d), p. 4074). Following entity of such dismissal, the trial court is without jurisdiction to act further in the action (Gherman v. Colburn, 18 Cal.App.3d 1046, 1050 [96 Cal.Rptr. 424]; Cook v. Stewart McKee & Co., supra, 68 Cal.App.2d 758, 760-762) except for the limited purpose of awarding costs and statutory attorney’s fees. (See Hopkins v. Superior Court, 136 Cal. 552, 553-554 [69 P. 299]; MacLeod v. Tribune Publishing Co., 157 Cal.App.2d 665, 668 [321 P.2d 881]; Spinks v. Superior Court, 26 Cal.App. 793, 795-796 [148 P. 798].)” (Associated Convalescent Enterprises v. Carl Marks & Co., Inc., supra, at p. 120.)
“Although we recognize that a voluntary dismissal may have some of the attributes of a final judgment, we doubt that the Legislature ever intended that a ministerial, nonjudicial act by a clerk, which ‘leaves the defendant as though he had never been a.party’ (Cook v. Stewart McKee & Co., supra, 68 Cal.App.2d 758, 761), would result in the defendant becoming the ‘prevailing party’ under section 1717, i.e., ‘the party in whose favor final judgment is rendered.’ We must assume that the Legislature considered these words carefully and used them in their commonly accepted meaning. Thus, ‘[a] judgment is final only when it determines all of the rights of the parties and requires no further judicial action to give effect to its provisions. [Citations.]’ (Gollard v. Bayless, 174 Cal.App.2d 827, 829 [345 P.2d 299]; see also Meehan v. Hopps, 45 Cal.2d *Supp. 29213, 217 [288 P.2d 267].) We have no ‘final judgment’ in this case. The word ‘rendered’ also has significance; it ‘is appropriately used in reference to a judgment or decree, but not to a proceeding or order.’ (Brownell v. Superior Court, 157 Cal. 703, 707 [109 P. 91].) The rendition of a judgment is a judicial, not a ministerial, act. (Gossman v. Gossman, 52 Cal.App.2d 184, 197 [126 P.2d 178]; Azadian v. Superior Court, 88 Cal.App. 296, 298 [263 P. 298].) No final judgment was ‘rendered’ or could have been rendered under the circumstances of this case. The trial court properly denied defendants’ motion for attorney’s fees.” (Id., at p. 121.)
From the trial court’s order in the instant case it is apparent it thought the holding of International Industries was not controlling and that attorney’s fees could be allowed as costs on appeal. It cited Wilson v. Wilson (1960) 54 Cal.2d 264, 272 [5 Cal.Rptr. 317, 352 P.2d 725] and Western Camps, Inc. v. Riverway Ranch Enterprises (1977) 70 Cal.App.3d 714, 730 [138 Cal.Rptr. 918]. In each of those cases, however, a judgment for plaintiff was affirmed and thus a final judgment in which the plaintiff was the prevailing party remained in effect. In the instant case, on the contrary, where a judgment for plaintiff was reversed on appeal, there never has been a final judgment in the action on the contract in which defendant was the prevailing party since no judgment has determined “all of the rights of the parties.” Accordingly the trial court erred in awarding defendant attorney’s fees in this action.
In the light of this conclusion, it is not necessary to determine whether the trial court properly granted defendant the right to file a late cost bill under Code of Civil Procedure section 473.
The order, dated October 10, 1979, is reversed with direction to deny defendant’s motion for attorney’s fees. Each party shall bear his or its own costs and attorney’s fees on this appeal.
Cole, P. J., concurred.