
13 Cal.App.4th 155 (1993)
16 Cal. Rptr.2d 486
NORMAN LERNER et al., Plaintiffs and Respondents,
v.
GEORGE R. WARD et al., Defendants and Appellants.
Docket No. B063705.
Court of Appeals of California, Second District, Division Six.
February 11, 1993.
*157 COUNSEL
Miller & Walter, William S. Walter, Radovich, Cumberland & Coates, M. Scott Radovich and David M. Cumberland for Defendants and Appellants.
J. Christopher Toews, George, Gallo, Collins & Sullivan and Ray A. Gallo for Plaintiffs and Respondents.
OPINION
GILBERT, J.
A provision in an agreement allows for the recovery of attorney fees to the prevailing party in any action or proceeding arising out of the agreement. Here we hold that such a provision permits attorney fees to the prevailing party in a tort cause of action under Code of Civil Procedure section 1021.
George and Jane Ward (the Wards) appeal from the trial court's denial of their motion for attorney fees after the court entered judgment against respondents, Norman and Ina Lerner (the Lerners). We reverse.

FACTS
The Lerners sued the Wards and others for falsely representing that the real property they agreed to purchase from the Wards could be subdivided. The complaint initially included causes of action for breach of contract and for reformation as well as for fraud, breach of fiduciary duty and negligence.
Before trial commenced, the Lerners dismissed the breach of contract and reformation causes against all defendants. The Lerners proceeded against the Wards only on the fraud cause of action.
After the jury returned a verdict in favor of the Wards, they unsuccessfully moved for attorney fees. The trial court denied the motion because our Supreme Court has held that attorney fees are not recoverable in a tort action for fraud arising out of a contract within the meaning of Civil Code *158 section 1717. (Stout v. Turney (1978) 22 Cal.3d 718, 730 [150 Cal. Rptr. 637, 586 P.2d 1228]; International Industries, Inc. v. Olen (1978) 21 Cal.3d 218, 221-222 [145 Cal. Rptr. 691, 577 P.2d 1031]; see also Boyd v. Oscar Fisher Co. (1989) 210 Cal. App.3d 368 [258 Cal. Rptr. 473].)

DISCUSSION
(1a) "`An award of attorney fees is a matter within the sound discretion of the trial court and absent a manifest abuse of discretion the determination of the trial court will not be disturbed.' [Citation.]" (Bussey v. Affleck (1990) 225 Cal. App.3d 1162, 1165 [275 Cal. Rptr. 646].)
"Unless authorized by either statute or agreement, attorney's fees ordinarily are not recoverable as costs. [Citations.]" (Reynolds Metals Co. v. Alperson (1979) 25 Cal.3d 124, 127-128 [158 Cal. Rptr. 1, 599 P.2d 83]; International Industries, Inc. v. Olen, supra, 21 Cal.3d at pp. 221-222; Code Civ. Proc., § 1021 et seq., see especially § 1033.5  attorney fees allowable as costs to the prevailing party "when authorized by either of the following: [¶] (A) Contract. [¶] (B) Statute;" Civ. Code, § 1717, post, stating when attorney fees are recoverable on a contract.)
(2a) The Wards contend they are entitled to attorney fees, either under Civil Code section 1717 or under Code of Civil Procedure section 1021.
Civil Code section 1717 states in pertinent part: "(a) 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.... [¶] (b)(1) The court ... shall determine who is the party prevailing on the contract for purposes of this section.... The court may also determine that there is no party prevailing on the contract for purposes of this section. [¶] (2) Where an action has been voluntarily dismissed ..., there shall be no prevailing party for purposes of this section."
(1b) "In resolving a motion for attorney fees, the [trial] court should consider the pleaded theories of recovery, the theories asserted and the evidence produced at trial, if any, and also any additional evidence submitted on the motion in order to identify the legal basis of the prevailing party's recovery. [Citations.]" (Boyd v. Oscar Fisher Co., supra, 210 Cal. App.3d at p. 377.)
Here, the Lerners pled a purchase agreement in a contract cause of action. The agreement contains a provision permitting recovery of attorney fees to *159 the prevailing party "[i]n any action or proceeding arising out of this agreement...." The Lerners voluntarily dismissed that cause of action before trial, however, and proceeded only on a tort theory.
(3) In Stout v. Turney, supra, the Supreme Court held, inter alia, that "[a] tort action for fraud arising out of a contract is not, however, an action `on a contract' within the meaning of this section [1717]." (Stout v. Turney, supra, 22 Cal.3d at pp. 723, 730; see also McKenzie v. Kaiser-Aetna (1976) 55 Cal. App.3d 84, 89 [127 Cal. Rptr. 275]  "an action for negligent misrepresentation is not an action to enforce the provisions of a contract"; Schlocker v. Schlocker (1976) 62 Cal. App.3d 921, 923 [133 Cal. Rptr. 485].)
In Reynolds Metals Co. v. Alperson, supra, 25 Cal.3d at page 129, our Supreme Court stated that even "[w]here a cause of action based on the contract providing for attorney's fees is joined with other causes of action beyond the contract, the prevailing party may recover attorney's fees under section 1717 only as they relate to the contract action. [Citations.]" These decisions of our Supreme Court are binding upon us. (Auto Equity Sales, Inc. v. Superior Court (1962) 57 Cal.2d 450, 455 [20 Cal. Rptr. 321, 369 P.2d 937].)
In Perry v. Robertson (1988) 201 Cal.App.3d 333 [247 Cal. Rptr. 74], for example, plaintiff declined to elect a remedy in an action concerning the negligent drafting of a real estate sales contract. In upholding attorney fees under such facts, the Perry court pointed out that whether that action sounded in tort or contract "is purely one of legal perspective. This is analogous to the example of the line drawing which could be seen either as a duck or as a rabbit, a duck-rabbit, at the will of the viewer." (Id., at p. 335, fn. 1, citing Wittgenstein, Philosophical Investigations (Blackwell ed. 1953).) Not so here.
(2b) In the instant case, because the trial court entirely dismissed the Lerners' contract action upon their motion at the inception of the trial, this action cannot be construed as a hybrid between contract and tort. (See generally, D & J, Inc. v. Ferro Corp. (1986) 176 Cal. App.3d 1191, 1194-1195 [222 Cal. Rptr. 656]  attorney fees unavailable in cases where plaintiff voluntarily seeks dismissal of complaint or applicable cause of action.) Under these facts, attorney fees are not recoverable under Civil Code section 1717. (Perry v. Robertson, supra, 201 Cal. App.3d at pp. 342-343.)
(4) The Wards also argue they are entitled to attorney fees under Code of Civil Procedure section 1021, a position they raised in their motion for attorney fees to the trial court. Section 1021 states in pertinent part: *160 "Except as attorney's fees are specifically provided for by statute, the measure and mode of compensation of attorneys ... is left to the agreement, express or implied, of the parties...."
The Wards urge this court to construe the phrase "arising out of this agreement" broadly here. To support their position, the Wards cite Xuereb v. Marcus & Millichap, Inc. (1992) 3 Cal. App.4th 1338 [5 Cal. Rptr.2d 154]. In Xuereb, plaintiffs sued sellers and others for delivering real property in a defective condition. Plaintiffs averred failure to conduct a competent, diligent inspection of the property during escrow and negligent handling of the transaction. (Xuereb v. Marcus & Millichap, Inc., supra, 3 Cal. App.4th at p. 1343.) They sued and tried the case on a variety of tort causes and for breach of contract. At the conclusion of testimony, the plaintiffs dropped their contract theory. The trial court denied a motion for attorney fees and the appellate court reversed.
The Xuereb court found the language in the purchase agreement, providing for attorney fees to the prevailing party in any "`lawsuit or other legal proceeding' to which `this Agreement gives rise,'" sufficiently broad "to encompass both contract actions and actions in tort...." (Xuereb v. Marcus & Millichap, Inc., supra, 3 Cal. App.4th at pp. 1342-1343.) The Xuereb court determined that its interpretation of the circumstances is in accord with the apparent intention of the parties because "the complaint does not indicate that respondents were seeking attorney fees only in connection with their contract cause of action and not in connection with their tort claims, or that their attorney fees claim was limited to parties other than appellants." (Id., at p. 1343.)
In the instant case, the clause in the contract concerning attorney fees was similar to the clause in the Xuereb case. The clause was not limited merely to an action on the contract, but to any action or proceeding arising out of the agreement. This included any action for fraud arising out of that agreement.
It is true when the Lerners voluntarily dismissed their contract cause of action before trial and proceeded only on a tort theory, they gave up the opportunity to obtain attorney fees pursuant to Civil Code section 1717. They still, however, had the opportunity to obtain attorney fees pursuant to Code of Civil Procedure section 1021. This is because the tort cause of action arose out of the written agreement. The Lerners alleged and tried to prove that the Wards, through their fraudulent representations, induced the Lerners to enter into an agreement to purchase the property.
The Wards were the prevailing party and they were entitled to recover reasonable attorney fees as costs pursuant to the terms of the agreement. *161 (Code Civ. Proc., § 1021; see also Code Civ. Proc., § 1033.5, subd. (a)(10)(A), (B), which provides that attorney fees authorized by contract or statute are allowable as costs.) "The parties to a contract may validly agree to allow for the award of attorney's fees, even though the suit is based on tort rather than contract." (Skyway Aviation, Inc. v. Troyer (1983) 147 Cal. App.3d 604, 610-611 [195 Cal. Rptr. 281]; Wagner v. Benson (1980) 101 Cal. App.3d 27, 36-37 [161 Cal. Rptr. 516].)
The trial court's order denying attorney fees is reversed. The matter is remanded for the trial court to determine reasonable attorney fees at trial and on appeal. The Lerners to pay costs on appeal.
Stone (S.J.), P.J., and Yegan, J., concurred.
A petition for a rehearing was denied March 10, 1993.
