
    [No. S219236.
    Mar. 10, 2016.]
    MAUREEN DeSAULLES, Plaintiff and Appellant, v. COMMUNITY HOSPITAL OF THE MONTEREY PENINSULA, Defendant and Respondent.
    
      Counsel
    Henry Joachim Josefsberg for Plaintiff and Appellant.
    The David Firm, Henry S. David, Dana Joy Emmer; Greines, Martin, Stein & Richland, Robert A. Olson and Edward L. Xanders for David S. Karton, as Amicus Curiae on behalf of Plaintiff and Appellant.
    
      Fenton & Keller and Christopher Edward Panetta for Defendant and Respondent.
   Opinion

LIU, J.

Code of Civil Procedure section 1032, subdivision (a)(4) defines the “prevailing party” in litigation to include “the party with a net monetary recovery” and “a defendant in whose favor a dismissal is entered.” (All undesignated statutory references are to this code.) A “prevailing party,” so defined, “is entitled as a matter of right to recover costs in any action or proceeding.” (§ 1032, subd. (b).) The question in this case is whether a plaintiff who voluntarily dismisses an action after entering into a monetary settlement is a prevailing party under section 1032, subdivision (a)(4) (hereafter section 1032(a)(4)).

The Court of Appeal below answered in the affirmative, reasoning that the statutory definition of “prevailing party” includes a party that obtains a “net monetary recovery” and that a settlement in which a defendant pays a plaintiff some amount of money is a net monetary recovery, at least under the circumstances of this case. In reaching this conclusion, the Court of Appeal disagreed with Chinn v. KMR Property Management (2008) 166 Cal.App.4th 175 [82 Cal.Rptr.3d 586] {Chinn), which held that the defendant is the prevailing party where a settlement results in a dismissal. Chinn reasoned that the statutory definition of “prevailing party” includes “ ‘a defendant in whose favor a dismissal is entered’ ” and that a settlement is not a “ ‘net monetary recovery.’ ” (Id. at pp. 187-188.)

We conclude that the Court of Appeal below was correct: When a defendant pays money to a plaintiff in order to settle a case, the plaintiff obtains a “net monetary recovery,” and a dismissal pursuant to such a settlement is not a dismissal “in [the defendant’s] favor.” (§ 1032(a)(4).) As emphasized below, this holding sets forth a default rule; settling parties are free to make their own arrangements regarding costs.

I.

Community Hospital of the Monterey Peninsula (the Hospital) hired Maureen deSaulles in February 2005 as a part-time patient business services registrar. In June 2005, she began complaining about her work shift assignments to the emergency room. The Hospital placed deSaulles on a leave of absence in January 2006 and terminated her employment in July 2006.

In July 2007, deSaulles filed a complaint alleging that the Hospital had (1) failed to accommodate her physical disability or medical condition (susceptibility to infection as a result of cancer); (2) retaliated against her for exercising her rights under the California Fair Employment and Housing Act (Gov. Code, § 12900, et seq.); (3) breached implicit condihons of an employment contract; (4) breached an implied covenant of good faith and fair dealing; (5) negligently and (6) intentionally inflicted emotional distress; and (7) wrongfully terminated her in violation of public policy.

After the Hospital’s motion for summary judgment adjudication and subsequent motions in limine, the court ruled that deSaulles would be precluded from introducing evidence and argument regarding any cause of action except the third and fourth causes of action, breach of contract and breach of the implied covenant of good faith and fair dealing.

At the conclusion of those rulings and before a jury was empaneled, the parties placed the following settlement on the record to permit the court to retain jurisdiction under section 664.6: ‘“[I]n consideration for dismissal with prejudice of the two claims of breach of contract and breach of covenant, Defendant will pay Plaintiff within 10 days $23,500.” Defense counsel ‘“will prepare a judgment on the remaining claims which references the dismissal with prejudice and which preserves the right of appeal of the rulings of this court on the remaining causes of action.” “[T]he parties will not file any motions or memoranda for costs or attorney fees[,] holding off until the completion of the appeal

On October 6, 2008, pursuant to the settlement, deSaulles filed a request for dismissal with prejudice of the breach of contract and breach of covenant claims. On January 6, 2009, the trial court entered an amended judgment that said: ‘“Having considered the arguments, oral and written, of all the parties, the records and file herein, and the pretrial motions and oppositions thereto filed herein, and having granted defendant’s Motion in Limine No. 1 to Preclude Any Argument That Defendant Failed to Accommodate Plaintiff’s Disability or to Engage in the Interachve Process, or That Plaintiff Was Harassed, Discriminated or Retaliated Against in Connechon Therewith, the Court finds that plaintiff will be unable to introduce any evidence that would establish plaintiff’s second cause of action for retaliahon, her fifth and sixth causes of action for intenhonal and negligent infliction of emotional distress, or her seventh cause of achon for wrongful termination in violation of public policy; and, [¶] The Court having previously granted summary adjudication of Plaintiff’s first cause of action for failure to accommodate; and, [¶] The parties having settled plaintiff’s third cause of achon for breach of implied in fact contract and Fourth cause [] of action for breach of the covenant of good faith and fair dealing, IT IS HEREBY ADJUDGED that, [¶] 1. Plaintiff recover nothing from defendant; and [¶] 2. The Parties shall defer seeking any recovery of costs and fees on this Judgment coming final after the time for all appeals.”

DeSaulles filed an appeal from the amended judgment, and the Court of Appeal affirmed the judgment in an unpublished opinion. After the Court of Appeal issued a remittitur, the parties returned to the trial court, and each claimed to be the prevailing party entitled to recovery of costs. After a hearing, the trial court said: ‘“The Court believes it can exercise its discretion in determining which party did prevail, and because [the Hospital] prevailed on significant causes of action and thereafter entered into a settlement on the remaining costs, the Court finds that [the Hospital] is the prevailing party.” The trial court awarded the Hospital costs of $12,731.92 and denied deSaulles’s request for costs.

The Court of Appeal reversed, concluding that deSaulles had obtained a net monetary recovery and was therefore the prevailing party. As to the Hospital’s argument that it was entitled to costs because it had obtained a dismissal, the Court of Appeal observed that a final dismissal had not disposed of this case: ‘“The summary adjudication did not end the action in Employer’s favor. The sustaining of in limine motions did not end the action in Employer’s favor, as two causes of action remained for trial. The case ended without a trial on the merits because Employee agreed to dismiss her remaining two causes of action, but the judgment entered did not purport to dismiss the entire action. The judgment was intended by its terms to preserve Employee’s right to appeal the court’s rulings on her other claims. Employee did indeed appeal in an ultimately unsuccessful attempt to resurrect those causes of action. [¶] Employee voluntarily dismissed two causes of action and a judgment was entered on the remaining causes. Employer obtained at most a partial voluntary dismissal, which we conclude did not, without more, trigger a mandatory costs award to Employer.”

The Court of Appeal further explained: ‘“The judgment in this case provided that Employee shall recover nothing and also recited that the parties had settled two of the seven causes of action. But the judgment failed to mention that Employee was paid $23,500 in exchange for dismissing those causes of action.” The court cited Friends of the Trails v. Blasius (2000) 78 Cal.App.4th 810 [93 Cal.Rptr.2d 193], which awarded costs to a plaintiff who had obtained a declaration that a public easement had been created in an irrigation ditch, despite the fact that the judgment stated that “ ‘[n]o relief is granted in favor of plaintiffs against defendant.’ ” (Id. at p. 839.) “Blasius illustrates that a costs award should be based on all aspects of a lawsuit’s final disposition rather than on an isolated phrase in the judgment.” In so holding, the court expressly disagreed with Chinn, supra, 166 Cal.App.4th 175.

We granted review.

II.

In contrast to the American rule that parties to a lawsuit ordinarily pay their own attorney fees, litigation costs have been traditionally awarded to the prevailing party. “Costs are allowances which are authorized to reimburse the successful party to an action or proceeding and are in the nature of incidental damages to indemnify a party against the expense of successfully asserting his rights.” (Purdy v. Johnson (1929) 100 Cal.App. 416, 418 [280 P. 181]; see § 1033.5 [costs include filing fees, ordinary witness fees, costs related to recording and transcribing depositions, and certain costs of preparing exhibits].) “ ‘The theory upon which [costs] are allowed to a plaintiff is that the default of the defendant made it necessary to sue him; and to a defendant, that the plaintiff sued him without cause. Thus the party to blame pays costs to the party without fault.’ ” (Purdy v. Johnson, at p. 418.)

Section 1032 codifies this approach to allocating costs: “Except as otherwise expressly provided by statute, a prevailing party is entitled as a matter of right to recover costs in any action or proceeding.” (§ 1032, subd. (b).) The statute provides that “unless the context clearly requires otherwise,” the term “ ‘ [prevailing party’ includes the party with a net monetary recovery, a defendant in whose favor a dismissal is entered, a defendant where neither plaintiff nor defendant obtains any relief, and a defendant as against those plaintiffs who do not recover any relief against that defendant. When any party recovers other than monetary relief and in situations other than as specified, the ‘prevailing party’ shall be as determined by the court, and under those circumstances, the court, in its discretion, may allow costs or not and, if allowed may apportion costs between the parties on the same or adverse sides pursuant to rules adopted under Section 1034.” (§ 1032(a)(4).)

Section 1032’s definition of “prevailing party” does not control, however, when another statute provides for different means of allocating costs. (Williams v. Chino Valley Independent Fire Dist. (2015) 61 Cal.4th 97, 114 [186 Cal.Rptr.3d 826, 347 P.3d 976].) The definition of “prevailing party” in section 1032 is particular to that statute and does not necessarily apply to attorney fee statutes or other statutes that use the prevailing party concept. (Heather Farms Homeowners Assn. v. Robinson (1994) 21 Cal.App.4th 1568, 1572 [26 Cal.Rptr.2d 758].) Moreover, section 1032 establishes only a default rule. (§ 1032, subd. (c) [§ 1032 does not “prohibit parties from stipulating to alternative procedures for awarding costs”].) When parties settle a case, they are free to allocate costs in any manner they see fit, although they must do so in language specifically addressing such allocation. (Cf. Chinn, supra, 166 Cal.App.4th at pp. 184-185 [compromise offer was silent on costs and therefore did not preclude the plaintiff from seeking costs].)

A.

In claiming to be the prevailing party in this case, the Hospital principally relies on Chinn. There, a tenant and her boyfriend (collectively, Chinn) sued a property management company and the property owner (collectively, KMR), alleging breach of a duty of care to provide for the safety of their tenants. After KMR declined to accept Chinn’s offer made pursuant to section 998, KMR made its own section 998 offer to settle the case for $23,500 (coincidentally the same amount as the settlement in the present case) and to waive all costs in exchange for dismissal of the action. Chinn accepted this offer and filed a notice of settlement pursuant to section 998, and the trial court dismissed the action. Chinn then sought an award of costs, which KMR opposed on the ground that Chinn was not the prevailing party. The trial court disagreed with KMR and awarded Chinn $4,036.58 in costs.

The Court of Appeal reversed, concluding that Chinn was not the prevailing party and therefore could not recover costs. The court did not discuss in any detail the language of section 1032(a)(4), nor did it find ambiguity in the term “net monetary recovery.” Instead, the court construed this term in the context of section 1032’s legislative history. That history provides useful background for understanding this case.

“In 1933, the Legislature enacted sections 1031 and 1032 to consolidate several cost statutes. As enacted, section 1031 provided in municipal and justice courts, ‘the prevailing party, including a defendant as to whom the action is dismissed, is entitled to his costs . . . .’ (Stats. 1933, ch. 744, § 190, p. 1901 [consolidating matter contained in former §§ 831d & 924].) Section 1032 provided for an award of costs as a matter of right in superior court to (1) a party who had a judgment in his favor in specified actions, including ‘an action for the recovery of money or damages,’ as long as the judgment met the trial court’s jurisdictional limit; or (2) a defendant as to whom the action was dismissed. (Stats. 1933, ch. 744, § 191, p. 1901 [consolidating former §§ 1022, 1024-1026].) In all other actions, the court had discretion under section 1032 to award and allocate costs. (Stats. 1933, ch. 744, § 191, p. 1901.) The cost statutes apparently codified case law interpreting a voluntary dismissal as a judgment in the defendant’s favor (Spinks v. Superior Court (1915) 26 Cal.App. 793, 795 [148 P. 798] [a voluntary dismissal determines the action in favor of the defendant and ends the suit, noting dicta in Hopkins v. Superior Court (1902) 136 Cal. 552, 554 [69 P. 299]]).

“Under former section 1032, ‘If the parties had competing claims for damages, then the party with a net judgment in his favor was the sole party entitled to costs. [Citations.] But even without competing monetary claims, a plaintiff who received only partial recovery was still found to be the sole successful party entitled to costs. The defendant was not entitled to any setoff for his partial victory. [Citations.]’ (Michell v. Olick (1996) 49 Cal.App.4th 1194, 1198-1199 [57 Cal.Rptr.2d 227].)” (Chinn, supra, 166 Cal.App.4th at pp. 186-187, fns. omitted.)

In 1986, section 1032 was repealed and reenacted in its present form by Senate Bill No. 654 (1985-1986 Reg. Sess.). As Chinn recounted: ‘“The legislative history of Senate Bill No. 654 (1985-1986 Reg. Sess.) does not indicate any change in the law to consider settlement proceeds or provide costs to a plaintiff after a dismissal. The Legislative Council’s Digest printed on the bill simply states in pertinent part: ‘Existing law contains numerous provisions for the prevailing party in superior, municipal, and justice court actions to receive costs . . . . [¶] This bill would repeal those provisions and instead provide that except as otherwise provided by law, a prevailing party, as defined, is entitled as a matter of right to recover costs in any action or proceeding. This bill would provide for the determination of fees and costs by the court in specified instances[.]’ (Assem. Amend, to Sen. Bill No. 654 (1985-1986 Reg. Sess.) Apr. 17, 1986.)

‘“The Senate Committee on Judiciary, Analysis of Senate Bill No. 654 (1985-1986 Reg. Sess.) as amended April 15, 1986, noted that the purpose of the bill was ‘to consolidate the relevant law governing recovery of costs and to simplify the present procedure for determining these costs, thereby relieving court congestion and easing judicial workload.’ The bill required the Judicial Council to promulgate a uniform set of guidelines governing the award of costs in all courts, and ‘it is assumed that the rules would reflect existing statutory and case law.’ Three minor changes to existing law were noted: the prevailing party would be entitled to recover court reporter expenses, a $5 bonus to the prevailing party would be eliminated, and a $100 cost item in libel and slander cases would be eliminated.

‘“Senate Bill No. 654 (1985-1986 Reg. Sess.) was introduced on behalf of the California Judges Association Civil Law and Procedure Committee. On January 20, 1984, Judge Richard H. Breiner, who was the chairman of the civil law and procedure committee, responded in writing to a telephone call from Assembly Republican consultant Earl Cantos. Judge Breiner stated in pertinent part, ‘The proposed bill merely synthesizes and simplifies the myriad of existing statutes into language which is clear, simple, and located in one place. You expressed concern that the proposal might allow an award of costs against a plaintiff not presently permitted under current law, when an action is dismissed. Under present[] law, costs are allowed to a defendant when plaintiff’s action is dismissed (City of Industry v. Gordon (1972) 29 Cal.App.3d 90 [105 Cal.Rptr. 206]), whether it is a voluntary dismissal with prejudice (Fisher v. Eckert (1950) 94 Cal.App.2d 890 [212 P.2d 64]) or without prejudice (International Industries, Inc. v. Olen (1978) 21 Cal.3d 218 [145 Cal.Rptr. 691, 577 P.2d 1031]). The proposed bill provides for no different result, but rather simply provides in cases of dismissal, for costs to a “defendant on dismissal.” ’

“Nothing in the background materials accompanying the proposed amendment mentioned settlement proceeds or suggested the definition of ‘prevailing party’ in section 1032 would change existing law to permit an award of costs to a plaintiff following a dismissal. (See Sen. Com. on Judiciary, Analysis of Sen. Bill No. 654 (1985-1986 Reg. Sess.) as amended Apr. 15, 1986; Sen. Com. on Judiciary, legis. bill file on Sen. Bill No. 654 (1985-1986 Reg. Sess.); Assem. Com. on Judiciary, Analyses of Sen. Bill No. 654 (1985-1986 Reg. Sess.) as amended Mar. 31 and Apr. 17, 1986; Office of Assem. Floor Analyses, 3d reading analyses of Sen. Bill No. 654 (1985-1986 Reg. Sess.) as amended Apr. 17, June 5, and July 8, 1986.)” (Chinn, supra, 166 Cal.App.4th at pp. 189-190.)

In light of the language and legislative history of section 1032, Chinn concluded that the dismissal of an action makes the defendant the prevailing party and that settlement proceeds do not qualify as a “net monetary recovery” that would make the settling plaintiff the prevailing party: “Construing the term ‘net monetary recovery’ in context, we conclude that the Legislature did not intend to include settlement proceeds received by the plaintiff in exchange for a dismissal in favor of the defendant. The definition of ‘prevailing party’ provided in section 1032 requires the court to award costs as a matter of right in specified situations. By precluding consideration of settlement proceeds as a ‘net monetary recovery’ when a dismissal is entered in favor of the defendant, only one party qualifies for a mandatory award of costs, consistent with the prior law.

“Chinn contends that the commonsense meaning of the isolated term ‘net monetary recovery’ includes settlement proceeds. However, Chinn’s interpretation would lead to an absurd result, as both plaintiff and defendants would be entitled to an award of costs as a matter of right.” (Chinn, supra, 166 Cal.App.4th at p. 188.) Chinn reasoned that because the Legislature intended only one party to be the prevailing party, that party must be the defendant in whose favor the dismissal was entered.

B.

We first address whether a dismissal obtained in exchange for a monetary settlement may be considered a dismissal in a defendant’s favor within the meaning of section 1032(a)(4).

In addressing this question, we begin by agreeing with Chinn that absent indications to the contrary, the Legislature intended the 1986 reenacted version of section 1032 to incorporate existing law regarding defendants as prevailing parties after a dismissal. (Chinn, supra, 166 Cal.App.4th at p. 190.) In Goodman v. Lozano (2010) 47 Cal.4th 1327, 1336-1337 [104 Cal.Rptr.3d 219, 223 P.3d 77] {Goodman), we recognized such a contrary indication when we held that the definition of “prevailing party” as the party receiving a “net monetary recovery” in the 1986 version of the statute effectively repudiated case law that had deemed a party to be a prevailing party if it had obtained a monetary recovery regardless of any offsets from settling defendants. Here, by contrast, there is no indication that under the law that existed prior to 1986, a defendant who obtained a dismissal in exchange for a monetary payment to the plaintiff was considered a prevailing party for purposes of the costs statute.

Relying on Spinks v. Superior Court, supra, 26 Cal.App. 793, the court in Chinn observed that “[t]he cost statutes apparently codified case law interpreting a voluntary dismissal as a judgment in the defendant’s favor.” (Chinn, supra, 166 Cal.App.4th at p. 187.) But Spinks illustrates the limited scope of this rule. In that case, a plaintiff voluntarily dismissed a lawsuit without a settlement on the eve of trial. The defendant argued that “a dismissal so made does not interfere at all with his right to have a judgment following it entered, as he did, which would secure to him the expenses incurred in the action and which were in their nature proper costs.” (Spinks, at p. 795.) The court said: “We are in complete accord with this contention and think that it proposes but a fair and reasonable construction for the statute. . . . While the matter of the recovery of costs is one which rests wholly upon the authority of the statutes, it cannot be contemplated that the legislature, having provided authority and means for the securing of costs to litigants, intended to leave a defendant remediless against a plaintiff who chose to bring an action and put a defendant to great costs in preparing to meet the same and then dismiss the suit. This case is a typical illustration of the hardship which might result. Here the plaintiff filed several complaints, defendant made his verified answer, and proceedings were had to set the case for trial. Then, on the day before the trial was to take place, plaintiff appeared at the clerk’s office and dismissed its action. The defendant presumably prepared himself for the trial and subpoenaed his witnesses on the assumption that the plaintiff would proceed at the time regularly set. A construction of the statute which will allow the recovery of costs in such cases is one that will appeal to the sense of fairness and justice of everyone and is the one which we will assume the legislature intended should be given to its declarations upon that subject.” (Id. at pp. 795-796.)

This equitable rationale for awarding costs to a defendant after a dismissal in its favor also appears in a case decided shortly before the 1986 repeal and reenactment of section 1032. In Catello v. I.T.T. General Controls (1984) 152 Cal.App.3d 1009, 1013 [200 Cal.Rptr. 4], the court said: “[A] defendant is entitled to its costs if the complaint is unfounded, just as much as a successful plaintiff is entitled to its costs. It is not enough, however, that costs should be awarded solely on the final judgment in the action. To so limit recovery would permit an unscrupulous plaintiff with only a marginal chance at recovery and investing only the filing fee to commence an action, forcing the opposing party to engage in expensive discovery, only to dismiss the action prior to final judgment when it appeared the case was sinking, Titanic dike, beneath the waves of overwhelming adverse evidence. Undoubtedly, it was with this evil in mind that the Legislature included an award of costs to the defendant when the plaintiff voluntarily dismissed its action.”

Thus, the rationale for awarding costs to a defendant on dismissal was rooted in the injustice that would result if a plaintiff who dismissed an unmeritorious action before judgment could evade an award of costs to compensate the defendant for the costs of preparing for trial. Such an award is an application of the basic rationale for awarding costs, that “ ‘the party to blame pays costs to the party without fault.’ ” (Purdy v. Johnson, supra, 100 Cal.App. at p. 418.) That rationale does not extend to dismissals pursuant to settlements in which a plaintiff obtains monetary relief.

The statement by Judge Breiner quoted in the legislative history above— that “ ‘[ujnder present[] law, costs are allowed to a defendant when plaintiffs action is dismissed (City of Industry v. Gordon[, supra,] 29 Cal.App.3d 90 [105 Cal.Rptr. 206]), whether it is a voluntary dismissal with prejudice (Fisher v. Eckert[, supra,] 94 Cal.App.2d 890 [212 P.2d 64]) or without prejudice (International Industries, Inc. v. Olen[, supra,] 21 Cal.3d 218 [145 Cal.Rptr. 691, 577 P.2d 1031])’ ”—is not to the contrary. (Chinn, supra, 166 Cal.App.4th at p. 190.) None of those cases involved a dismissal pursuant to a settlement. (See City of Industry, at p. 92 [case dismissed after failing to bring the action to trial in five years]; Fisher, supra, at p. 891 [plaintiff files dismissal without defendant’s consent]; Olen, at p. 221 [same].) The same is true of other pre-1986 cases. (See, e.g., McMahan’s of Long Beach v. McMahan Service Corp. (1956) 145 Cal.App.2d 607, 608-609 [302 P.2d 847] [dismissal for lack of prosecution]; Hauptman v. Heebner (1939) 34 Cal.App.2d 600, 601 [94 P.2d 48] [voluntary dismissal without settlement].) The Hospital cites no contrary example.

In light of section 1032’s basic purpose of imposing costs on the losing party, and in light of the case law that the statute was intended to incorporate, we conclude that the definition of ‘“prevailing party” as ‘“a defendant in whose favor a dismissal is entered” was not intended to encompass defendants that entered into a monetary settlement in exchange for dismissal. The definition was intended to promote the equitable rule that unsuccessful plaintiffs could not evade the costs statute by dismissing their suit. That rule does not apply to plaintiffs that have achieved some litigation success through settlement of the case.

Having concluded that a defendant is not a prevailing party as a matter of right in these situations, we must next determine whether a plaintiff who obtains a monetary settlement is a prevailing party.

C.

As noted, section 1032(a)(4) defines the party with a “net monetary recovery” as the “ ‘[prevailing party.’ ” “ ‘The word “recover” means “to gain by legal process” or “to obtain a final legal judgment in one’s favor.” ’ ” (Goodman, supra, 47 Cal.4th at p. 1334.) The Hospital cites some cases that would define “recovery” in a way that precludes settlement proceeds. (See, e.g., Gebelein v. Blumfield (1992) 231 Ill.App.3d 1011, 1014 [173 Ill.Dec. 557, 597 N.E.2d 265].)

We see no reason why a monetary settlement cannot fit within the definition of “monetary recovery.” Although a monetary settlement is in some ways like a private contract, a settlement is obtained as a means of resolving and terminating a lawsuit. Moreover, settlement agreements pursuant to section 664.6 or section 998 result not only in contractual agreements but also in judgments that conclusively resolve the issues between the parties. (See California State Auto. Assn. Inter-Ins. Bureau v. Superior Court (1990) 50 Cal.3d 658, 664 [268 Cal.Rptr. 284, 788 P.2d 1156] (California State Auto. Assn.); Milicevich v. Sacramento Municipal Center (1984) 155 Cal.App.3d 997, 1004 [202 Cal.Rptr. 484].) In this sense, a monetary settlement is “ ‘ “gain[ed] by legal process.” ’ ” (Goodman, supra, 47 Cal.4th at p. 1334.)

Other language in section 1032 suggests a broad understanding of the word “recovery.” Again, “prevailing party” is defined to include “the party with a net monetary recovery, a defendant in whose favor a dismissal is entered, a defendant where neither plaintiff nor defendant obtains any relief, and a defendant as against those plaintiffs who do not recover any relief against that defendant. When any party recovers other than monetary relief and in situations other than as specified, the ‘prevailing party’ shall be as determined by the court . . . .” (§ 1032(a)(4), italics added.) In the statute, “monetary relief’ is synonymous with “net monetary recovery” since a plaintiff is a prevailing party as a matter of right if he or she obtains “monetary relief’ but will be considered a prevailing party at the court’s discretion if she “recovers other than monetary relief.” “Relief,” like “recovery,” is a broad term that can include money obtained through a settlement. This court used the term in that way in Olen, a case predating the 1986 revision of section 1032, where we said: “Although a plaintiff may voluntarily dismiss before trial because he learns that his action is without merit, obviously other reasons may exist causing him to terminate the action. For example, the defendant may grant plaintiff—short of trial—all or substantially all relief sought . . . .” (International Industries, Inc. v. Olen, supra, 21 Cal.3d at p. 224, italics added (Olen).)

We conclude that the term “recovery” in section 1032(a)(4) encompasses situations in which a defendant settles with a plaintiff for some or all of the money that the plaintiff sought through litigation. This understanding of “recovery” is in keeping with the purpose of section 1032 discussed above. Just as a plaintiff cannot avoid a cost award by dismissing an action on the eve of trial, so a defendant cannot avoid a cost award merely by settling on the eve of trial. In Reveles v. Toyota by the Bay (1997) 57 Cal.App.4th 1139 [67 Cal.Rptr.2d 543], disapproved on other grounds in Gavaldon v. DaimlerChrysler Corp. (2004) 32 Cal.4th 1246, 1261 [13 Cal.Rptr.3d 793, 90 P.3d 752], the defendant agreed on the morning of trial to pay the plaintiff the entire $9,300 that the plaintiff had previously offered to accept to settle the case. The court upheld a cost award for the plaintiff, saying “it cannot be seriously argued that [the plaintiff] ... did not obtain a ‘net monetary recovery.’ ” (Reveles, at p. 1151.) Other courts have similarly concluded that plaintiffs may obtain a net monetary recovery by settling a lawsuit. (See Wohlgemuth v. Caterpillar Inc. (2012) 207 Cal.App.4th 1252, 1257, 1264 [144 Cal.Rptr.3d 545]; On-Line Power, Inc. v. Mazur (2007) 149 Cal.App.4th 1079, 1087 [57 Cal.Rptr.3d 698].)

This understanding of “net monetary recovery” is further reinforced by case law predating the 1986 repeal and reenactment of section 1032. The cases make clear that if a settlement agreement, compromise offer pursuant to section 998, or stipulated judgment is silent on the matter of costs, the plaintiff is not barred from seeking costs. (See Folsom v. Butte County Assn. of Governments (1982) 32 Cal.3d 668, 679 [186 Cal.Rptr. 589, 652 P.2d 437] (Folsom); Rappenecker v. Sea-Land Service, Inc. (1979) 93 Cal.App.3d 256, 263-264 [155 Cal.Rptr. 516] (Rappenecker); Slater v. Superior Court (1941) 45 Cal.App.2d 757, 761 [115 P.2d 32] (Slater); Rapp v. Spring Valley Gold Co. (1888) 74 Cal. 532, 533 [16 P. 325] (Rapp)) The reason for this rule is that compromise agreements “ ‘regulate and settle only such matters and differences as appear clearly to be comprehended in them by the intention of the parties and the necessary consequences thereof, and do not extend to matters which the parties never intended to include therein, although existing at the time.’ [Citations.] Thus they ordinarily conclude all matters put in issue by the pleadings—that is, questions that otherwise would have been resolved at trial. [Citation.] They do not, however (absent affirmative agreement of the parties), conclude matters incident to the judgment that were no part of the cause of the action.” (Folsom, at p. 677.)

Implicit in this line of cases is the principle, well established before the 1986 repeal and reenactment of the costs statute, that a plaintiff who settles a lawsuit for payment of money or other tangible benefits may be considered a prevailing party. Nothing in the language or legislative history of the statute indicates an intention to change that principle. The Hospital objects that the cases above, with the exception of Folsom, involved judgments entered in the plaintiffs favor rather than dismissals. Rappenecker, for example, involved a compromise offer pursuant to section 998. (Rappenecker, supra, 93 Cal.App.3d at pp. 262-263.) Although the acceptance of a section 998 offer leads to the entry of a judgment (§ 998, subd. (b)(1)), a section 998 offer may also require the plaintiff to dismiss the action as a condition of settlement. (See Chinn, supra, at 166 Cal.App.4th at p. 184; Goodstein v. Bank of San Pedro (1994) 27 Cal.App.4th 899, 906-907 [32 Cal.Rptr.2d 740].) In rejecting the argument that a compromise offer was not valid under section 998 because it called for payment of money to the plaintiff and dismissal of the action rather than a judgment in the plaintiffs favor, Goodstein said: ”[A]s between the parties thereto and for purposes of enforcement of settlement agreements, a compromise agreement contemplating payment by defendant and dismissal of the action by plaintiff is the legal equivalent of a judgment in plaintiff’s favor.” (27 Cal.App.4th at p. 907.) The Hospital cites no authority, other than Chinn, suggesting that the determination of whether a plaintiff was or could be a prevailing party would turn on the technicality of whether a section 998 settlement or a stipulated judgment, in addition to resulting in a monetary settlement in the plaintiffs favor, also required dismissal of the action.

The other cases cited above awarded costs after a stipulated judgment in the plaintiffs favor. (Rapp, supra, 74 Cal. at p. 533; Slater, supra, 45 Cal.App.2d at p. 761.) It is true, as the Hospital suggests, that stipulated judgments may be entered like regular judgments and that the plaintiffs in the cited cases obtained a judgment while the defendants did not obtain a dismissal. (See § 664.6 [upon a motion, the court may enter judgment pursuant to the terms of a settlement].) But when a settlement pursuant to a stipulated judgment disposes of the entire case, a dismissal of the action generally follows as a matter of law. (Cal. Rules of Court, rule 3.1385(b).) Whether or not a stipulated judgment encompassing a monetary settlement calls for a dismissal, the effect is the same: a payment of money to the plaintiff, followed by a termination of the action. The entry of a judgment pursuant to section 664.6 enables parties to enforce a settlement agreement without having to file a separate lawsuit. (Viejo Bancorp, Inc. v. Wood (1989) 217 Cal.App.3d 200, 208 [265 Cal.Rptr. 620].) This is true whether the judgment calls for a dismissal or not; the only difference is that where a stipulated judgment includes a dismissal, the parties must ask the trial court to retain jurisdiction before the dismissal deprives the court of that jurisdiction. (Wackeen v. Malis (2002) 97 Cal.App.4th 429, 439-440 [118 Cal.Rptr.2d 502].)

Where, as here, the parties stipulate before the court that the plaintiff has been paid a sum of money in exchange for the dismissal of an action, the plaintiff is as legally entitled to receive money from the defendant as a plaintiff who obtains a stipulated judgment without a dismissal. The former plaintiff is every bit as much a prevailing party as the latter. Chinn’s rule that a defendant is the prevailing party if a section 998 offer includes an agreement to dismiss the action, no matter how favorable the offer is to plaintiff, is inequitable and inconsistent with the purpose of section 1032.

Folsom provides additional support for this conclusion. There, the plaintiffs entered into a settlement agreement with government defendants promising to dismiss the case when the defendants established four new transit systems. (Folsom, supra, 32 Cal.3d at p. 675.) The agreement was silent as to costs as well as attorney fees, and the trial court awarded the plaintiffs costs, concluding that “ ‘this action has resulted in the enforcement of an important right affecting the public interest.’ ” (Id. at p. 676.) This court affirmed, concluding that the plaintiff had the right to costs where the settlement agreement was silent as to costs. (Id. at pp. 677-678.)

The Hospital notes two differences between Folsom and the present case: first, that the dismissal was conditional and delayed, and second, that the relief granted was nonmonetary. But neither of those differences matters here. In light of the equitable purpose of section 1032, there is no reason why a plaintiff that conditions dismissal of the case on the future fulfillment of some of its litigation objectives should be considered the prevailing party, but not a plaintiff that dismisses the action in exchange for the present payment of money.

The Hospital contends that Goodman supports its position. In that case, homeowners sued a home builder and various other defendants for construction defects. They settled with some of the defendants for $230,000 and obtained a $146,000 verdict against another defendant, Lozano. The trial court pursuant to section 877, subdivision (a), which provides that a good faith settlement with some tortfeasors will serve to reduce the claims against the remaining tortfeasors, reduced the award against Lozano to zero. The question was whether Goodman had obtained a net monetary recovery against Lozano for purposes of awarding costs. The court concluded that Goodman had not and affirmed an award of costs to Lozano: “ ‘[T]he common meaning of the phrase “the party with a net monetary recovery” is the party who gains money that is “free from . . . all deductions.” . . . [¶] A plaintiff who obtains a verdict against a defendant that is offset to zero by settlements with other defendants does not gain any money free from deductions. Such a plaintiff gains nothing because the deductions reduce the verdict to zero.’ ” (Goodman, supra, 47 Cal.4th at p. 1334.)

The Hospital contends that “[i]f settlement funds were included in the term ‘net monetary recovery,’ the Goodman plaintiffs would necessarily have been the prevailing parties because they obtained] settlement funds in an amount of $230,000. Instead, the court looked to the final judgment alone to determine whether the plaintiff obtained a net monetary recovery.” But the question in Goodman was not whether the plaintiffs obtained a net monetary recovery from the settling defendants, but rather whether the plaintiffs obtained such a recovery from Lozano. It is clear they did not. Here, deSaulles obtained a $23,500 settlement from the Hospital. Although Goodman does not dispose of the question before us, its holding is not inconsistent with the conclusion that deSaulles obtained a net monetary recovery from the Hospital.

Of course, a monetary settlement in favor of a plaintiff does not necessarily suggest a meritorious lawsuit; defendants may settle cases with little merit in order to be spared the expense of trial. However, the rule is that a partial recovery, as long as it is a net monetary recovery, entitles a plaintiff to costs. (See Michell v. Olick, supra, 49 Cal.App.4th at pp. 1196, 1198-1199 [although 11 of the plaintiff’s causes of action were not successful, plaintiff’s success on the 12th cause of action for a jury award of $63,000 entitled a plaintiff to costs].) A determination of whether a complaint was truly meritorious “would require the court to try the entire case.” (Olen, supra, 21 Cal.3d at p. 224.) We need not place this burden on courts. Section 1032 merely establishes a default rule, and a settling defendant is in a far better position to calibrate the terms of a settlement, including allocation of costs, with appropriate provisions in the settlement agreement.

Our dissenting colleagues contend that a settling plaintiff and defendant should both be considered prevailing parties if the settlement calls for a dismissal, and that an award of costs should be left to the court’s discretion. But a corollary of this position is that if the monetary settlement does not call for a dismissal, which is sometimes the case (ante, at pp. 1155-1156), then only the plaintiffs should be considered the prevailing party, even though the latter settlement, like the former, results in the payment of money to the plaintiff and the termination of the action. We decline to treat the two situations differently when the difference is a matter of form and not substance. Such an approach, moreover, would not serve the statute’s goal of simplifying procedures for determining costs and easing judicial workload. (Ante, at pp. 1148-1149.)

We recognize that sometimes parties may overlook the issue of costs in their settlement agreements. Through inadvertence, defendants may find themselves with a bill for costs that substantially increases the amount owed to the plaintiff. Trial courts should take these realities into account when performing their gatekeeping function pursuant to section 664.6. (See California State Auto. Assn., supra, 50 Cal.3d at p. 664). Although not required by law, it is advisable that trial courts inquire into whether the parties in a given case have resolved the allocation of costs in their settlement agreement, or whether they wish to have the court resolve the issue, before placing a judicial imprimatur on the agreement.

In sum, we hold that a dismissal pursuant to a monetary settlement is not a dismissal in the defendant’s “favor” as that term is used in section 1032(a)(4). We further hold that a plaintiff that enters into a stipulated judgment to be paid money in exchange for a dismissal has obtained a “net monetary recovery” within the meaning of section 1032(a)(4), whether or not the judgment mentions the settlement. Our holdings establish a default rule that applies only when the parties have not resolved the matter of costs in their settlement agreement or have not stipulated “to alternative procedures for awarding costs.” (§ 1032, subd. (c).) We disapprove the contrary holding of Chinn v. KMR Property Management, supra, 166 Cal.App.4th 175, 185-190.

Conclusion

The judgment of the Court of Appeal is affirmed.

Cantil-Sakauye, C. J., Chin, J., Corrigan, J., and Cuéllar, J., concurred.

KRUGER, J.,

Dissenting.—I agree with the majority that a plaintiff who receives a monetary settlement in exchange for the dismissal of her claims has received a “net monetary recovery,” and is therefore a “prevailing party” presumptively entitled to costs under Code of Civil Procedure section 1032, subdivision (a)(4). But by the terms of the statute, so, too, is the “defendant in whose favor . . . dismissal is entered.” (Code Civ. Proc., § 1032, subd. (a)(4) (section 1032(a)(4)).) Because both parties cannot be entitled to costs as of right, such cases are covered by the next sentence of the provision, which permits the trial court, “in situations other than as specified,” to determine which party has in fact prevailed and to allocate costs accordingly. (Ibid.) Thus the statute, as I read it, does not treat settling plaintiffs as automatically entitled to costs—no matter how minimal their recovery or how unmeritorious their claims—but permits courts to take into account special circumstances that may render a costs award inequitable or unjust. Because neither the trial court nor the Court of Appeal considered whether such circumstances are present here, I would reverse and remand for further consideration.

Section 1032(a)(4) defines the term “ ‘[prevailing party’ ” to include, as relevant here, “a defendant in whose favor a dismissal is entered.” {Ibid.) In ordinary usage, we say that a dismissal is entered in a defendant’s favor when entry of the dismissal is ‘“to the special advantage or benefit of’ that defendant. (Webster’s 3d New Internat. Dict. (2002) p. 830 [defining “in favor of’].) We thus generally refer to an order dismissing a plaintiff’s claims against a defendant as an order entered in that defendant’s favor. (See, e.g., Desai v. Farmers Ins. Exchange (1996) 47 Cal.App.4th 1110 [55 Cal.Rptr.2d 276]; Dominguez v. City of Alhambra (1981) 118 Cal.App.3d 237, 242 [173 Cal.Rptr. 345].) This is true regardless of the reason for the dismissal— whether pursuant to demurrer; the plaintiff’s voluntary abandonment of her claims; or, as in this case, a negotiated settlement. Indeed, it is difficult to know how else one would describe the dismissal at issue in this case. Surely we would not describe the dismissal of a plaintiff’s own claims as a dismissal entered in the plaintiff’s favor.

In reaching its contrary conclusion, the majority asserts, without further elaboration, that “[w]hen a defendant pays money to a plaintiff in order to settle a case, ... a dismissal pursuant to such a settlement is not a dismissal ‘in [the defendant’s favor].’ ” (Maj. opn., ante, at p. 1144; accord, id. at p. 1158.) Perhaps by this the majority means to suggest that a dismissal entered pursuant to a monetary settlement is not a dismissal that “favors” the defendant, because, as the majority elsewhere puts it, the plaintiff has also “achieved some litigation success through settlement of the case.” (Id. at p. 1153.) But section 1032(a)(4) does not speak of a dismissal “favoring” a defendant, it speaks of a dismissal “entered” in favor of a defendant. Even if a settlement calling for dismissal might not be wholly favorable to the defendant—e.g., because it also calls for the defendant to pay some amount of money—we would have to acknowledge that the resulting dismissal has nevertheless been entered in the defendant’s favor.

In any event, when parties agree to settle a dispute, it is generally because both sides believe that settlement is to their advantage. (Cf. Hazard, The Settlement Black Box (1995) 75 B.U. L.Rev. 1257, 1267 [“[T]he settlement area consists of a wide band of different prices at which it will benefit both parties to settle.”].) And as a practical matter, it is certainly not uncommon for the terms of a settlement to advantage the defendant far more than the plaintiff. If, for example, a plaintiff agrees to dismiss a million-dollar damages claim in exchange for a nuisance payment of $10, with no admission of liability, it would be difficult to dispute that the resulting dismissal was not only entered in the defendant’s favor, but was entered pursuant to a settlement “favorable” to the defendant as well.

In the end, the majority’s reading of section 1032(a)(4)’s dismissal clause rests not on the text of the provision, but on inferences about legislative intent based on the provision’s history. The majority reasons that section 1032, both as originally enacted in 1933 and as reenacted in 1986, was designed to codify existing case law concerning the status of defendants as prevailing parties, and “there is no indication that under the law that existed prior to 1986, a defendant who obtained a dismissal in exchange for a monetary payment to the plaintiff was considered a prevailing party for purposes of the costs statute.” (Maj. opn., ante, at p. 1151.)

Of course, as we have repeatedly made clear, the interpretation of a statute necessarily “begin[s] with its text, as statutory language typically is the best and most reliable indicator of the Legislature’s intended purpose.” (Larkin v. Workers’ Comp. Appeals Bd. (2015) 62 Cal.4th 152, 157 [194 Cal.Rptr.3d 80, 358 P.3d 552].) If the statutory text answers the question before us—as I believe it does here—dial is generally the end of the matter; if there is no ambiguity or uncertainty in the language, we need “not resort to legislative history to cloud a statutory text that is clear.” (Ratzlaf v. United States (1994) 510 U.S. 135, 147-148 [126 L.Ed.2d 615, 114 S.Ct. 655], fn. omitted; accord, People v. Cornett (2012) 53 Cal.4th 1261, 1265 [139 Cal.Rptr.3d 837, 274 P.3d 456] [“The plain meaning controls if there is no ambiguity in the statutory language.”].)

The legislative history on which the majority relies is not especially revealing in any event. The majority relies principally on the Court of Appeal’s observation in Chinn v. KMR Property Management (2008) 166 Cal.App.4th 175 [82 Cal.Rptr.3d 586] that Code of Civil Procedure section 1032, as originally enacted, “ ‘apparently codified case law interpreting a voluntary dismissal as a judgment in the defendant’s favor.’ ” (Maj. opn., ante, at p. 1151, quoting Chinn, supra, 166 Cal.App.4th at p. 187, and citing Spinks v. Superior Court (1915) 26 Cal.App. 793 [148 P. 798]; see also Catello v. I.T.T. General Controls (1984) 152 Cal.App.3d 1009, 1013 [200 Cal.Rptr. 4] [observing that the Legislature “ [undoubtedly” intended to thwart the danger of “unscrupulous plaintiff[s] with only a marginal chance at recovery . . . forcing the opposing party to engage in expensive discovery, only to dismiss the action prior to final judgment” when it became clear the case would yield an adverse judgment at trial].) From this the majority concludes that the Legislature must have intended to limit the reach of section 1032(a)(4)’s dismissal clause to circumstances comparable to those in Spinks, in order to address “the injustice that would result if a plaintiff who dismissed an unmeritorious action before judgment could evade an award of costs to compensate the defendant for the costs of preparing for trial.” (Maj. opn., ante, at p. 1152.)

But even if the Spinks scenario was the Legislature’s primary concern, that does not mean it was the Legislature’s only concern. Although legislators frequently draft legislation with a particular problem in mind, the statutes they enact “often go beyond the principal evil to cover reasonably comparable evils, and it is ultimately the provisions of our laws rather than the principal concerns of our legislators by which we are governed.” (Oncale v. Sundowner Offshore Servs. (1998) 523 U.S. 75, 79 [140 L.Ed.2d 201, 118 S.Ct. 998].) It may well be that the Legislature that enacted Code of Civil Procedure section 1032 was particularly concerned with the unfairness that would result from depriving defendants of a costs award when a plaintiff dismisses her unmeritorious claim at the 11th hour. But I see no clear basis for concluding that the Legislature did not also address the unfairness that would result from an inflexible rule requiring a settling defendant to pay the plaintiffs costs, no matter the circumstances of the case. Certainly to the extent there is any doubt on the subject, the text of the statute ought to control.

In short, I would conclude that the Legislature meant what it said: A defendant in whose favor a dismissal is entered—whether as a result of a monetary settlement or otherwise—is a “prevailing party” within the meaning of section 1032(a)(4). But to be clear, to say that a settling defendant is a “prevailing party” does not mean that it is the “prevailing party,” thereby entitled to payment of costs as of right. As the majority explains, the plaintiff is also a “prevailing party” within the meaning of section 1032(a)(4) because he or she has received a “net monetary recovery” in the form of settlement proceeds. (§ 1032(a)(4); see maj. opn., ante, at pp. 1153-1157.) Because both parties cannot be entitled to costs as of right, we must proceed to the next sentence of section 1032(a)(4), which provides: “When any party recovers other than monetary relief and in situations other than as specified, the ‘prevailing party’ shall be as determined by the court, and under those circumstances, the court, in its discretion, may allow costs or not and, if allowed may apportion costs between the parties on the same or adverse sides . . . .” “In cases where both parties achieved a status that Code of Civil Procedure section 1032 defines as a prevailing party, the action ‘falls into the “situation other than as specified” category, calling for an exercise of the trial court’s discretion’ ” to determine which party, if any, should receive costs. (Wohlgemuth v. Caterpillar Inc. (2012) 207 Cal.App.4th 1252, 1264 [144 Cal.Rptr.3d 545], quoting On-Line Power, Inc. v. Mazur (2007) 149 Cal.App.4th 1079, 1087 [57 Cal.Rptr.3d 698]; see § 1032(a)(4).)

The majority suggests that this conclusion elevates form over substance insofar as it turns on whether the settlement agreement calls for a dismissal. The majority reasons that some settlement agreements will call for entry of judgment against a defendant and not dismissal of the action, yet both forms of agreement will result in the payment of money to the plaintiff and termination of the action. (Maj. opn., ante, at p. 1157.) But the difference between an agreement calling for a dismissal and one calling for the entry of judgment against the defendant is not a mere formality. Whether the settlement of the claim will result in a judgment against the defendant could have practical consequences for the parties and for that reason may frequently serve as an important point of negotiations. In any event, however we might judge the practical differences between agreements calling for dismissal and those calling for entry of judgment against a defendant, we are not entitled to overlook the plain language of the statute, which treats a defendant in whose favor a dismissal is entered as a “prevailing party.”

Recognizing a trial court’s discretion when cases are dismissed pursuant to a monetary settlement also serves the equitable objectives underlying Code of Civil Procedure section 1032. In the typical case, the majority is correct that the equities will favor the plaintiff who has achieved some measure of success through the settlement, and thus can reasonably expect to be compensated for her litigation costs. (Maj. opn., ante, at pp. 1152-1153.) But this will not invariably be so. It is, for example, a simple truth that defendants sometimes settle even frivolous lawsuits simply “because the cost of litigation—either financial or in terms of public relations—would be too great.” (Buckhannon Board & Care Home, Inc. v. West Virginia Dept. of Health and Human Resources (2001) 532 U.S. 598, 617 [149 L.Ed.2d 855, 121 S.Ct. 1835] (cone. opn. of Scalia, J.); cf. Fisher v. Kelly (7th Cir. 1997) 105 F.3d 350, 352 [“[T]he mere fact that plaintiff obtained some recovery does not automatically make her a prevailing party because defendants often settle even meritless lawsuits.”].) If a plaintiff manages to extract a monetary recovery in settlement of a meritless lawsuit, hers is a brand of success we might hesitate to recognize as legitimate—and conduct we might hesitate to reward by entitling her to payment of costs.

As I read it, section 1032(a)(4) imposes no rigid requirement to award costs to a settling plaintiff in such circumstances. The statute instead permits trial courts to determine whether the equities of the case warrant deviation from the usual rule entitling a settling plaintiff to costs. It allows trial courts to allocate costs in a manner that takes into account whether, for example, the plaintiffs underlying claim is plainly frivolous, the plaintiffs recovery is de minimis, or the plaintiff’s success is otherwise clearly insubstantial relative to the nature and scope of the claims brought (and the costs incurred in prosecuting them). The inquiry would not require the trial court to “ ‘try the entire case.’ ” (Maj. opn., ante, at p. 1157.) Nor would it prevent parties from making their own arrangements with respect to the allocation of costs. (See ibid.; Code Civ. Proc., § 1032, subd. (c).) But in the absence of an express agreement, it would permit trial courts to refrain from awarding costs to settling plaintiffs in circumstances in which a costs award would be inequitable or unjust. Granted, this approach may not simplify procedures to the same extent as the majority’s rule. (Maj. opn., ante, at p. 1157.) But it is the approach that is most consistent with both the text of the statute and its underlying equitable purposes. To the extent the majority concludes otherwise, I respectfully dissent.

Werdegar, J., concurred. 
      
       The Court of Appeal in this case did not disagree with this conclusion. The court explained that if defendant hospital “had qualified as a ‘prevailing party,’ this case could be among the ‘situations other than as specified’ for purposes of awarding mandatory costs,” and the court could “exercise discretion to determine which party prevailed based on the merits of the case.” The court ultimately concluded that the hospital did not qualify as a “prevailing party” within the meaning of section 1032(a)(4) because the settlement dismissed only some of plaintiff’s claims; the remainder of the claims were resolved through entry of judgment in defendant’s favor. But if a defendant would have been entitled to prevailing party status if it had negotiated dismissal of the entire action, it is not clear why, under the statute, the defendant should cease to be a prevailing party where, as here, it has negotiated dismissal of some claims and actually prevailed on the merits with respect to the remainder. (See § 1032(a)(4) [defining “ ‘[prevailing party’ ” to include both “a defendant in whose favor a dismissal is entered” and “a defendant as against those plaintiffs who do not recover any relief against that defendant”].)
     