*1238 Opinion
The question presented is whether, as prevailing parties in a declaratory relief action brought against the Insurance Commissioner as conservator of an insolvent insurance company to challenge the commissioner’s designation of priority status, appellant policyholders are entitled to attorney fees and costs as provided for in their contract with the insurance company. We hold that they are and reverse the trial court’s ruling.
I
Facts and Procedural History
The judgment in favor of appellants was affirmed by Division Four of this district in
Texas Commerce Bank
v.
Garamendi
(1992)
Executive Life Insurance Co. (ELIC) sold municipal guaranteed investment contracts (Muni-GICs) to the appellant banks as the indenture trustees for municipal entities which had issued low-income housing bonds and transmitted the proceeds to the banks for purchase of Muni-GICs. The Muni-GICs were to accumulate at a guaranteed rate and to pay accumulated interest on semiannual payment dates. (Id., at p. 466.)
After it began experiencing severe financial difficulties, ELIC was placed in conservatorship. (
After the trial court entered judgment, plaintiff and appellant Texas Commerce Bank moved for an order that its attorney fees be paid as a priority one administrative expense of the estate pursuant to the terms of the Muni-GIC contract as the prevailing party in the priority litigation. The other appellants subsequently filed similar motions, and appellants were allowed to file cost bills.
The trial court ruled as follows: “From the outset, it has always appeared that the priority determination of the Muni GICs was a question of law rather *1239 than one of fact. Only counsel for the parties asserting a priority five for the Muni GICs argued vigorously that there were substantial fact determinations requiring extensive discovery with all of the attendant costs. And those discovery-related costs together with costs of experts form the bulk of the costs sought to be recovered by the various parties who asserted the priority five status. Also, the action turned out to be predominantly, if not entirely, one for declaratory relief involving a close question of law. [tJ[] Accordingly, the Court finds that the appropriate allocation of costs is that each party bear its own costs.” The court later made clear that the ruling included attorney fees. This appeal followed.
II
Contentions
Appellants essentially raise two issues: (1) attorney fees should be awarded pursuant to the Muni-GICs, Civil Code section 1717 and Code of Civil Procedure section 1021; and (2) they are entitled to recover costs under the provisions of the Muni-GICs and Code of Civil Procedure section 1032.
HI
Discussion
A. The Attorney Fees Provision Is Enforceable
The Muni-GICs included the following provision: “In the event any litigation is commenced to enforce any rights under this Agreement or the Funding Contract, the prevailing party shall be entitled to its reasonable attorneys’ fees and court costs.”
Appellants contend that, as prevailing parties in an action on a contract, they are entitled to attorney fees under Civil Code section 1717. 1 Appellants maintain that the term “on the contract” as it is used in that section has been given a broad interpretation by the courts of this state, which have held that an action seeking a declaration of rights based on an *1240 agreement is an action on the contract. They also argue that Commissioner Garamendi, as the conservator of ELIC, stands in the shoes of the insolvent insurer and is bound by the attorney fees provision in the Muni-GICs.
Commissioner Garamendi states that when setting creditor priority status, he acts not as a private party but as a public official. Thus, he maintains, in the declaratory relief action in which appellants challenged his priority-setting determination, he did not stand in the shoes of ELIC and therefore is not subject to the attorney fees provision in the contract between ELIC and appellants.
1. Earlier case law cited by Commissioner Garamendi.
Supporting Commissioner Garamendi’s argument are cases holding that the insolvency statutory scheme reflects the state’s interest in and power over insurance companies, and that when acting pursuant to those statutes, the insurance commissioner acts on behalf of the state. (See, e.g.,
Carpenter
v.
Pacific Mut. Life Ins. Co.
(1937)
The question presented in
Mitchell
was whether, under the former statute (2 Deering’s Gen. Laws 1931, Act 3739), the commissioner was obligated to pay a filing fee. The Supreme Court held that the commissioner was acting on behalf of the state in his official capacity and thus, under former Political Code section 4295, was exempt from payment.
(Mitchell
v.
Taylor, supra,
*1241
In our opinion, these cases considered issues very different from the one before us. Moreover,
Mitchell
interpreted the earlier act, and in a portion of the opinion not cited by Commissioner Garamendi,
Carpenter
acknowledged that under the present code the commissioner is not just a state officer but also a trustee of the benefit of the creditors of the insolvent company under Insurance Code section 1057.
3
(See
2. Earlier cases cited by appellants.
In the line of cases cited by appellants, courts faced with issues involving the relationship among trial courts, the commissioner as conservator, and the assets of the insolvent insurer took the view that the commissioner’s role is akin to that of a receiver. (See, e.g.,
Caminetti
v.
Pac. Mutual L. Ins. Co.
(1943) 22 Cal .2d 344, 354 [
*1242
Anderson,
like the
Mitchell
v.
Taylor
case cited by Commissioner Garamendi, construed the legislation that preceded article 14 of the Insurance Code. The earlier law was explicit: with respect to corporate assets, the Insurance Commissioner’s rights and duties were the equivalent of those imposed on receivers. (
As noted in
Maloney
v.
Rhode Island Ins. Co.
(1953)
Despite
Maloney’s
clarification of the law,
Anderson’s
statement was cited by the
McConnell
court, which held that section 1057 “indicates” that the duties of the commissioner are in the nature of those of a receiver. (
In light of the change in the law which resulted from the enactment of article 14, we decline to follow the cases cited by appellants. Nevertheless, we conclude that the policy behind the current statutory scheme, including article 14.3, the Uniform Liquidation Act, adopted by the Legislature in 1988, subjects the estate of ELIC, through Commissioner Garamendi’s actions, to the attorney fees clause of the Muni-GICs. 6
3. Current statutes.
We follow the guidelines for statutory construction set out in
Hartford Fire Ins. Co.
v.
Macri
(1992)
Under Insurance Code, division 1, part 2, chapter 1, article 14, entitled “Proceedings in Case of Insolvency and Delinquency,” the role of the commissioner appears to be twofold. Section 1059 provides: “The commissioner, in the performance of any of his duties under this article, shall be deemed to be a public officer acting in his official capacity on behalf of the State, and the provisions of Chapter 2, Division 7, Title 1 of the Government Code shall apply to him.” However, “[i]n all proceedings under this article, the commissioner shall be deemed to be a trustee for the benefit of all creditors and other persons interested in the estate of the person against whom the proceedings are pending.” (§ 1057.)
*1244 As noted earlier, section 1059 seems to have the purpose of exempting the commissioner from the payment of fees rather than defining the commissioner’s role. (See fn. 2, ante.) Moreover, even if we were to read the section as having a more expanded purpose, it would not support Commissioner Garamendi’s argument here. By its terms, section 1059 applies when the commissioner is engaged “in the performance of any of his duties” under article 14. These duties include actions that are apart from actions the commissioner engages in once he or she becomes the conservator of an insolvent insurer. For example, prior to instituting proceedings to place an insolvent company under conservatorship, the commissioner is required, under certain circumstances, to summarily seize the property of an apparently insolvent insurance company. (§§ 1013,1015.) The commissioner also has the duty under section 1060 to file an annual report to the Governor regarding insolvency proceedings in the state. When engaged in these actions, the commissioner is not acting as the conservator of any particular insolvent insured. Therefore, the commissioner would be acting solely under the duty of section 1059, that is, on behalf of the state, and the duty as trustee under section 1057 would not arise.
The language of section 1057, on the other hand, is more limited than that of section 1059. By its provisions, the commissioner is deemed to be a trustee for the creditors of the estate of the insurer against whom the proceedings are pending.
(Carpenter
v.
Pacific Mut. Life Ins. Co., supra,
Unfortunately, the Legislature did not define the term “trustee” for purposes of article 14. Probate Code section 16002, subdivision (a) imposes on a trustee a duty of loyalty which has been interpreted to mean that the trustee must administer the trust solely in the interest of the beneficiary.
(Estate of Gump
(1991)
Pursuant to section 1011, the filing of an application for conservatorship vests in the commissioner title to all the assets of the insolvent insurer. *1245 Section 1064.2, subdivision (b) goes further by vesting in the commissioner the contracts of the insurer. Under section 1037, subdivision (a), the commissioner as liquidator or conservator has the authority to conduct the business and affairs of the insolvent, and section 1064.2, subdivision (c) requires the commissioner to “immediately proceed to conduct the business of the insurer. . .
In
Prudential Reinsurance Co.
v.
Superior Court
(1992)
Based on the foregoing, we hold that under the broadest reading of the current statutory scheme the commissioner is a public official acting on behalf of the state when dealing with insolvent insurers in general, but once appointed conservator of a particular insolvent insurer, the commissioner steps into the shoes of that insurer.
In this case, Commissioner Garamendi has presented no persuasive argument that would justify elevating his duty as a state official such that he would not be held to stand in ELIC’s shoes. He has not identified the state’s interest in assigning appellants class-6 priority designation. He argues that he could not have made the priority decision as ELIC’s successor-in-interest because the ELIC estate had no interest in the priority determination, but in fact only the ELIC estate and the other creditors could have such an interest. Moreover, when Commissioner Garamendi categorized appellants as creditors other than policyholders, he did more than simply apply section 1033. He first had to interpret the Muni-GICs and his interpretation in effect denied appellants the benefit of the agreement they had with ELIC. He *1246 makes no attempt to explain how that denial furthers the interests of the state, which he claims he was representing. We hold that Commissioner Garamendi was standing in the shoes of ELIC when he determined that appellants were not policyholders and when he defended that position in the declaratory relief action.
Our conclusion is bolstered by equitable considerations in that an overview of the particular facts of this case dictates that appellants should receive attorney fees. Commissioner Garamendi’s erroneous interpretation of the Muni-GICs compelled appellants to sue to enforce their rights as policyholders. Even though he was the losing party in that litigation, Commissioner Garamendi’s attorney fees were paid out of the ELIC estate pursuant to statute. (§ 1064.2, subd. (c).) We view it as unfair to require appellants to absorb their attorney fees where the estate is obligated to pay the fees of the losing side which took an untenable position and thereby compelled these policyholders to sue to recover their rights. 7
4. The application of Civil Code section 1717.
Having concluded that Commissioner Garamendi stands in the shoes of ELIC for purposes of the priority determination and the litigation that followed therefrom, we turn to appellants’ contentions regarding attorney fees under Civil Code section 1717. We agree that they are entitled to attorney fees under that statute and the Muni-GIC attorney fees provision. Actions for a declaration of rights based upon an agreement are “on the contract” within the meaning of Civil Code section 1717.
(Las Palmas Associates
v.
Las Palmas Center Associates
(1991)
Commissioner Garamendi argues that the action was not on the contract because the Muni-GICs were merely part of the backdrop of the
*1247
case. He maintains that the action was on section 1033, the priority-setting statute. However, it is clear from the opinion of the appellate court reviewing the declaratory relief judgment that the issues in the case had nothing to do with the interpretation of section 1033 and everything to do with the interpretation of the Muni-GICs. (See
Texas Commerce Bank
v.
Garamendi, supra,
Without question, appellants were the prevailing parties in the declaratory relief action within the meaning of Civil Code section 1717. Under subdivision (b)(1) of that statute, excepting circumstances not at issue here, “the party prevailing on the contract shall be the party who recovered a greater relief in the action on the contract.” Appellants won in the trial court and on appeal, as both courts concluded that the Muni-GICs were insurance policies. (See
Texas Commerce Bank
v.
Garamendi, supra,
11 Cal.App.4th at pp. 465, 468.) We therefore hold that the trial court erred in failing to award appellants attorney fees. Although the trial court has considerable discretion in fixing the amount of attorney fees, the court may not completely deny them to the prevailing party.
(Deane Gardenhome Assn.
v.
Denktas
(1993)
*1248 In light of our holding, we need not discuss appellants’ alternative argument that they are entitled to attorney fees under Code of Civil Procedure section 1021. 9
B. Appellants Are Entitled to Costs
As to appellants’ contention that they are entitled to costs by statute, we do not agree. Code of Civil Procedure section 1032, subdivision (b) states: “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.” Subdivision (a)(4) of the statute provides, in pertinent part: “ ‘Prevailing party’ includes the party with a net monetary recovery .... 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.”
Appellants contend first that they are the prevailing parties and under subdivision (b) they are entitled to an award of costs. Appellants rely on
California Common Cause
v.
Duffy
(1987)
Appellants next argue that even under Code of Civil Procedure section 1032, subdivision (a)(4), they were the prevailing parties and the trial court abused its discretion in not awarding costs to them.
Where the prevailing party is one not specified, Code of Civil Procedure section 1032, subdivision (a)(4) permits the trial court to determine the prevailing party and then allow costs or not, or to apportion costs, in its
*1249
discretion.
10
The statute requires the trial court to determine which party is prevailing and then exercise its discretion in awarding costs. (See 7 Witkin, Cal. Procedure (3d ed. 1994 Supp.) Judgment, § 88, p. 133.) This portion of the statute does not require the trial court to award costs to the prevailing party “as a matter of right.” (Code Civ. Proc., § 1032, subd. (b).) Thus, the statute permits the ruling the trial court made in this case, ordering each side to pay its own costs, even though appellants were without question the prevailing parties.
(Perko’s Enterprises, Inc.
v.
RRNS Enterprises
(1992)
Appellants argue, in effect, that the opening phrase of Code of Civil Procedure section 1032, subdivision (a)(4), “ ‘Prevailing party’ includes the party with a net monetary recovery,” does not exclude prevailing parties, such as themselves, who did not seek monetary recovery. Appellants cite in support of that position
Pirkig
v.
Dennis
(1989)
However, we agree with appellants’ argument that they are entitled to costs under the Muni-GICs. As appellants are the prevailing parties in an action on the contract which provides for the award of “court costs,” they are entitled to reasonable costs. (Civ. Code, § 1717.) As with the attorney fees, the trial court has discretion to fix the amount of costs, but it may not completely deny them to the prevailing party.
*1250 Disposition
The trial court’s order is reversed. Appellants are awarded costs on appeal. Boren, P. J., and Fukuto, J., concurred.
Petitions for a rehearing were denied October 28, 1994, and the opinion was modified to read as printed above. The petition of defendants and respondents for review by the Supreme Court was denied January 25, 1995. Kennard, J„ was of the opinion that the petition should be granted.
Notes
Civil Code section 1717 provides in pertinent part: “In any action on a contract, where the contract specifically provides that attorney’s fees and costs, which are incurred to enforce that contract, shall be awarded either to one of the parties or to the prevailing party, then the party who is determined to be the party prevailing on the contract, whether he or she is the party specified in the contract or not, shall be entitled to reasonable attorney’s fees in addition to other costs.”
At present, Government Code title 1, division 7, chapter 2, that is, Government Code section 6100 et seq., entitled “Fees,” is made applicable to the commissioner by Insurance *1241 Code section 1059. Government Code section 6100 states: “Officers of the state . . . shall not perform any official services unless upon the payment of the fees prescribed by law for the performance of the services, except as provided in this chapter.” Under Government Code section 6103, a “public officer . . . acting in his official capacity on behalf of the state” does not pay fees “for the filing of any document or paper, for the performance of any official service, or for the filing of any stipulation or agreement which may constitute an appearance in any court . . . .” (Gov. Code, § 6103.) Thus, Insurance Code section 1059 incorporates the holding of Mitchell v. Taylor and exempts the commissioner from having to pay fees in a variety of situations. It appears that the legislative purpose in describing the commissioner as a “public officer acting in his official capacity on behalf of the State” was not to define the role so much as to conform to the language of Government Code section 6103.
The statutory history supports this view. The fee exemption first appeared in former Political Code section 4295. (Stats. 1915, ch. 422, § 1, p. 694 [any public officer acting in official capacity on behalf of the state not required to pay any fee for filing any document or paper or for performance of any official service].) Government Code section 6103 was enacted in 1943. (Stats. 1943, ch. 134, § 6103, p. 990.) In 1957, section 1059 was amended to change the statutory reference from Political Code section 4295 to the present reference to Government Code section 6103.
See discussion in part III, A., 3., infra.
All subsequent statutory references are to the Insurance Code unless otherwise stated.
Section 10 of the previous legislation, known as “ ‘An Act to Provide for Proceedings against and Liquidation of Delinquent Insurance Corporations and Associations’ ” and quoted in Anderson, stated in full: “ ‘In all cases arising under the provisions of this act where not otherwise provided the powers and duties of the Insurance Commissioner with relation to the property and assets and business of any corporation placed under his control shall be those heretofore exercised by and imposed on receivers of corporations within this state.’ ” (41 Cal.App.2d at pp. 187, 189.)
So revised, in fact, that the duties of the commissioner are no longer the subject of section 1058, which now reads, “In any proceeding pending under the provisions of this article, the court in which such proceeding is pending shall have jurisdiction to hear and determine, in such proceeding, all actions or proceedings then pending or thereafter instituted by or against the person affected by a proceeding under this article.”
The Uniform Act defines itself as “An Act concerning the liquidation, rehabilitation, reorganization, or conservation of insurers doing business in more than one state and to make uniform the law with reference thereto.” (13 U. Laws Ann. (Master ed. 1986) Uniform Insurers Liquidation Act, p. 328.) The California enactment varies from the official text in ways not pertinent to this discussion. (See 13 U. Laws Ann. (Master ed., 1994 cum. ann. pocket pt) Uniform Insurers Liquidation Act, p. 71, Notes following § 1.) To the extent that its provisions conflict with article 14, article 14.3 controls. (Id., at subd. (b).)
We note that Civil Code section 1717 “was enacted to establish mutuality of remedy where contractual provision makes recovery of attorney’s fees available for only one party.”
(Reynolds Metals Co.
v.
Alperson
(1979)
Moreover, the litigation in the conservatorship of ELIC has not abated. The second superior court-approved rehabilitation plan has been challenged. Some of the parties who contested the plan settled with Commissioner Garamendi. According to a letter brief submitted to this court by Commissioner Garamendi, the settlement amounts included the parties’ attorney fees. While it is true, as Commissioner Garamendi argues, that the settlements are based on a different aspect of the litigation, we find it ironic that Commissioner Garamendi agreed to the payment of the attorney fees of those parties who opposed appellants’ priority while he vigorously opposes payment to the prevailing appellants.
“The primary issues raised are as follows: (1) whether Muni-GICs were insurance annuities under Insurance Code section 101 [fn. omitted] when they were issued in 1986; (2) whether enactment in 1988 of section 10541 retrospectively alters the status and claim priority of the 1986 Muni-GICs in the BLIC liquidation proceedings; (3) whether the liquidation claim priority of the subject Muni-GICs is determined as of their status when issued in 1986 or, rather, as of April 11, 1991, when the order for conservation was entered; (4) whether the Muni-GICs sold in states other than California are exempt from any retroactive effect of section 10541 because their status as insurance annuities is controlled by the laws of the states where sold; (5) whether Muni-GICs are materially distinguishable from ‘Pension Fund Guaranteed Investment Contracts’ Pension-GICs), which the Insurance Commissioner has given ‘policyholder’ liquidation status; (6) whether, assuming the 1986 Muni-GICs were not insurance annuities when issued or are not such for purposes of the BLIC liquidation claim priorities, the Muni-GIC claims are entitled to class-5 priority as claims for ‘return of unearned premium.’ ” (
“Except as attorney’s fees are specifically provided for by statute, the measure and mode of compensation of attorneys and counselors at law is left to the agreement, express or implied, of the parties . . . .” (Code Civ. Proc., § 1021.)
In addition to the party with the net monetary recovery, the statute specifically refers to the following as prevailing parties: “. . . 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.” (Code Civ. Proc., § 1032, subd. (a)(4).)
