
    747 P.2d 1218
    Ziva BARMAT, on behalf of herself and as personal representative of the Estate of Charles Barmat, Plaintiff/Appellant, v. JOHN AND JANE DOE PARTNERS A-D, et al., Defendants/Appellees.
    No. CV-86-0572-PR.
    Supreme Court of Arizona, En Banc.
    Dec. 10, 1987.
    
      W. James Harrison, P.C. by John Gabroy, Richard M. Rollman, Sharmila Roy, Tucson, for plaintiff/appellant.
    Gallagher & Kennedy by Michael K. Kennedy, Chris J. Scheldrup, Phoenix, for defendants/appellees.
   FELDMAN, Vice Chief Justice.

This is a legal malpractice action in which the trial court granted summary judgment for the defendants. The court of appeals reversed and allowed plaintiffs attorney’s fees on appeal. Barmat v. John and Jane Doe Partners, 155 Ariz. 515, 747 P.2d 1214 (App.1986). We granted review for the sole purpose of determining whether a legal malpractice action “arises out of a contract” so as to be eligible for an award of attorney’s fees pursuant to A.R.S. § 12-341.01(A).

I. FACTS

In February 1982, police officer Jeffrey Ross was killed during a narcotics raid on a bar owned by Charles and Ziva Barmat. Ross’s widow filed a wrongful death action against the Barmats. Their insurer, Ambassador Insurance Company, assigned counsel to represent the Barmats. The rather complicated events that followed are fully set forth in the court of appeals’ opinion. For purposes of this case, we need only note that Ambassador eventually became insolvent and the Arizona Guaranty Fund (the Fund) took over the Barmats’ defense. See A.R.S. § 20-667 (Supp.1986). The Fund retained attorney Edward Hochuli to represent the Barmats. The Bar-mats now allege that the attorney breached the duty of “undeviating and single allegiance” he owed them by giving the Fund advice that was contrary to the Barmats’ best interests, by disclosing confidential information to the Fund, by placing its interests ahead of the Barmats’, and by providing the Barmats inadequate representation during certain proceedings in the trial court.

The trial court granted the attorney’s motion for summary judgment, ruling that he was an agent of the Fund and therefore immune from suit under A.R.S. § 20-675(A). The court of appeals reversed, holding that, when representing the Barmats, the attorney was not an agent of the Fund and was not entitled to the immunity granted by § 20-675(A). The court concluded that the rule of Parsons v. Continental National American Group, 113 Ariz. 223, 550 P.2d 94 (1976), precludes the existence of an agency relationship between the attorney and the insurer that assigned him to the defense. That attorney, the court held, acts as the attorney for and agent of the insured, and not as the agent of the Fund for purposes of the immunity statute. 155 Ariz. at 518, 747 P.2d at 1217. We agree with the analysis and conclusions of the court of appeals.

In passing, however, the court allowed the Barmats attorney’s fees on appeal, pursuant to A.R.S. § 12-341.01(A). Hochuli petitioned for review, raising five issues. We denied review on all but the propriety of the allowance of attorney’s fees. We review that issue to settle some uncertainty in previous cases with regard to the circumstances under which attorney’s fees may be recovered in tort actions in which the victim and the tortfeasor have some type of contractual relationship. See Rule 23, Ariz.R.Civ.App.P., 17A A.R.S. We have jurisdiction pursuant to Ariz. Const, art. 6, § 5(3) and A.R.S. § 12-120.24.

II. DISCUSSION

A. Interim Appeal

Hochuli contends that the award of fees on appeal was improper because the appeal resulted only in reversal of the summary judgment and remand for trial. It is not yet determined, Hochuli argues, who will be the “successful party” eligible under A.R.S. § 12-341.01(A) for an allowance of fees. We believe that our recent decision in Wagenseller v. Scottsdale Memorial Hospital, 147 Ariz. 370, 710 P.2d 1025 (1985), is dispositive. Here, as in Wagenseller, the Barmats’ legal position was meritorious and the issue resolved was central to the case. Id. at 393-94, 710 P.2d at 1048-49.

B. Arising Out of Contract

Hochuli next argues that the Bar-mats’ legal malpractice claim does not meet the criteria of A.R.S. § 12-341.01(A). The statute allows an award of fees to be made in contested actions “arising out of a contract, express or implied.” Pointing out that the law implies a contract between attorney and client and that one of the terms so implied is the lawyer’s covenant to render competent and ethical service, the Barmats argue that their claim fairly meets the eligibility criteria of the statute. We agree that the law implies a contract between lawyer and client, including an implied covenant of competent and ethical representation. In re Hegstrom, 153 Ariz. 286, 736 P.2d 370 (1987). We do not believe, however, that the breach of an implied covenant in a contract implied in law necessarily brings the action within the statute.

The application of the contract statute to implied contracts has been variously decided in Arizona. See, e.g., Wenk v. Horizon Moving & Storage Co., 131 Ariz. 131, 639 P.2d 321 (1982), and Amphitheater Public Schools v. Eastman, 117 Ariz. 559, 574 P.2d 47 (App.1977) (both dealing with the attempt to recover attorney’s fees for breach of bailment contract implied in fact); Sato v. Van Denburgh, 123 Ariz. 225, 599 P.2d 181 (1979) (declining to apply contract statute of limitations in malpractice action against accountant); Lewin v. Miller Wagner & Co., 151 Ariz. 29, 725 P.2d 736 (App.1986) (disallowing attorney’s fees in malpractice action against accountant); Trebilcox v. Brown & Bain, P.A., 133 Ariz. 588, 653 P.2d 45 (App.1982) (reaching opposite result in breach of fiduciary duty action against attorney).

The law implies contracts in many professional relationships, and in such contracts generally implies a covenant that the professional is liable if he or she does not act in accordance with the standard of reasonable care. See W.L. PROSSER & W.P. KEETON, THE LAW OF TORTS § 92, at 657-58 (5th ed. 1984); 2 J. DOOLEY, MODERN TORT LAW § 33.17 (Lindahl ed. 1983). Implied contracts are also recognized in certain nonprofessional relationships, such as that between innkeeper and guest and between common carrier and passenger. See, e.g., Dove v. Lowden, 47 F.Supp. 546 (W.D.Mo.1942); Yu v. New York, New Haven & Hartford Railroad Co., 145 Conn. 451, 144 A.2d 56 (1958). To carry the Barmats’ argument to its logical conclusion, our statute would permit the allowance of attorney’s fees in an ordinary negligence action by a bus passenger against his carrier or by a tenant against his landlord. We do not believe that the legislature intended so broad a reading of the statute. See Wagenseller, 147 Ariz. at 391, 710 P.2d at 1046. Nor do we believe that the text of the statute requires so broad an interpretation.

Specifically, we believe that a distinction must be drawn between contracts implied in fact and those implied in law. A contract implied in fact is a true contract— an undertaking of contractual duty imposed “by reason of a promissory expression.” 1 A. CORBIN, CORBIN ON CONTRACTS § 18, at 39 (1963). The distinction between an express contract and one implied in fact is that in the former the undertaking is made by words written or spoken, while in the latter conduct rather than words conveys the necessary assent and undertakings. Id. at 43. Contracts implied in law, on the other hand, are not true contracts at all. They are obligations “created by the law without regard to expressions of assent by either words or acts.” Id. § 19, at 44. Historically, contracts implied in law arose as a species of obligation created to achieve a just result in a case, even though there had been no expression of assent “and sometimes even against a clear expression of dissent.” Id. at 46. Corbin remarks, in fact, that it might be “better not to use the word ‘contract’ at all,” id., and today the term “quasi contract” is often used in its place.

An excellent illustration is an early case involving a professional relationship between a physician and an injured, unconscious patient. Acknowledging that there could have been “ ‘no contract or promise in fact—no meeting of the minds,’ ” the court described such a contract:

“It has no actual existence; it is simply a mythical creation of the law. The law says it shall be taken that there was a promise when, in point of fact, there was none. Of course, this is not good logic, for the obvious and sufficient reason that it is not true. It is a legal fiction, resting wholly for its support on a plain legal obligation and a plain legal right____ There is a class of legal rights [and] duties ... which seem to lie in the region between contracts on the one hand and torts on the other, and to call for the application of a remedy not strictly furnished either by actions ex contractu or actions ex delicto.”

Cotnam v. Wisdom, 83 Ark. 601, 605-06, 104 S.W. 164, 165-66 (1907), quoting Sceva v. True, 53 N.H. 627 (1873).

Thus, although A.R.S. §• 12-341.01(A) covers actions arising out of either express or implied contracts, there is some doubt whether the term “implied contract” includes those that are only a legal fiction. As Corbin indicates, the oft-used statutory phrase “contract express or implied” has no single meaning and “requires interpretation and definition.” 3 A. CORBIN, supra § 563, at 291. Statutory interpretation of the word “implied”

must vary with the circumstances and [statutory] context. It may include ... constructive or quasi contracts as well as those actually but tacitly intended by the parties involved. It has been thought[, however] that when used in a statute the applicable meaning is generally limited to include only ... those [contracts] actually intended____

Id. at 291-92.

We believe that the problem of interpretation is properly resolved by the principles announced in Sparks v. Republic National Life Insurance Co., 132 Ariz. 529, 647 P.2d 1127, cert. denied, 459 U.S. 1070, 103 S.Ct. 490, 74 L.Ed.2d 632 (1982). There we held that fees may be awarded under the statute even though a single act constitutes both a tort and breach of contract, “as long as the cause of action in tort could not exist but for the breach of contract.” Id. at 543, 647 P.2d at 1141 (emphasis in original). In Sparks, we allowed fees to an insured in an action based upon the insurer’s breach of an implied covenant of good faith. In such actions, neither the duty of “good faith” nor any other duty would exist between insurer and insured but for the promises between the parties. Similarly, the tort action for breach of the implied covenant of good faith could not have existed “but for” the breach of agreements, express or implied, in the contract of indemnity. Thus, whether the action for breach was pleaded in contract, in tort, or both, whether it involved the breach of an express or implied covenant, the action in Sparks and similar cases (see, e.g., Ford v. Revlon, Inc., 153 Ariz. 38, 45, 734 P.2d 580, 587 (1987)) “arises out of a contract.”

Quite the opposite is true with regard to the contracts arising from relationships between professionals and their clients and from other special relationships long recognized at common law, such as those between innkeeper and guest, common carrier and passenger, bailor and bailee. In those relationships, the law imposes special duties to all within the foreseeable range of harm as a matter of public policy, regardless of whether there is a contract, express or implied, and generally regardless of what its covenants may be. PROSSER & KEETON, supra, at 660-62. See, for example, Salt River Project Agricultural Improvement & Power District v. Westinghouse Electric Corp., 143 Ariz. 368, 694 P.2d 198 (1984), which illustrates the reluctance of the law to uphold contractual provisions that negate tort duties.

As a matter of public policy, attorneys, accountants, and other professionals owe special duties to their clients, and breaches of those duties are generally recognized as torts. The essential nature of actions to recover for the breach of such duties is not one “arising out of contract,” but rather one arising out of tort—breach of legal duties imposed by law. The cause of action for malpractice would exist even if the client or patient had expressly declined the professional’s services. See Sato, 123 Ariz. at 227, 599 P.2d at 183; PROSSER & KEETON, supra, at 657-58; cf. Wenk, supra (contract implied in fact). In these cases, where the cause of action does not depend on the existence of a contract, express or implied in fact, the “but for” test of Sparks is not satisfied. Accordingly, we hold that A.R.S. § 12-340.1(A) is not applicable to such actions.

We note that the court of appeals has reached a similar result in Lewin, supra. The rationale there, as we read the opinion, is that where the implied contract does no more than place the parties in a relationship in which the law then imposes certain duties recognized by public policy, the gravamen of the subsequent action for breach is tort, not contract. 151 Ariz. at 36, 725 P.2d at 743. We approve that view. See also Western Technologies, Inc. v. Sverdrup & Parcel, Inc., 154 Ariz. 1, 739 P.2d 1318 (App.1986). Courts in other states have reached similar conclusions in situations where the “ ‘contract is the mere inducement creating the state of things [the relationship] that furnishes the occasion for the tort.’ ” Equilease Corp. v. State Federal Savings & Loan Association, 647 F.2d 1069, 1074 (10th Cir.1981) (citations omitted); see also Yeager v. Dunnavan, 26 Wash.2d 559, 174 P.2d 755 (1946).

Where, however, the duty breached is not imposed by law, but is a duty created by the contractual relationship, and would not exist “but for” the contract, then breach of either express covenants or those necessarily implied from them sounds in contract. Sparks, supra; Lewin, supra. The essence of such actions arises “out of a contract,” eligible for an award of fees under the statute.

We are well aware of the ambiguities in the distinction drawn above between tort actions ineligible for an award of fees under § 12-341.01(A) and contract actions that are eligible. The ambiguities exist simply because the “distinction between tort and contract liability ... has become an increasingly difficult distinction to make.” PROSSER & KEETON, supra, at 655. Basically, contract law consists of enforcing the intention of the parties manifested through promises expressly made or implied from conduct. Tort law, on the other hand, is a matter of imposing duties to be recognized or not depending upon three primary considerations.

These considerations are: (1) the nature of the defendant’s activity such as a builder or a manufacturer-seller of a product; (2) the relationship between the parties, such as occupier of land and business guest; and (3) the type of injury or harm threatened. The obligations which give rise to tort actions and which are imposed on the basis of the three factors just mentioned are created primarily on the basis of policy reasons of one kind or another apart from enforcing a commitment of an intention to do or not to do something in the future. These obligations, commonly referred to as [tort] duties, are often owed to all those within the range of harm or at least to some considerable class of people that can include parties to a contract.

Id. Duties that are essentially contractual in nature, however, are generally owed only to the contracting parties.

We are also aware that the application of these general principles will not permit the formulation of any bright line test and that each class of case will have to be considered and ruled upon. Perhaps the best we can say is that, as with pornography, we cannot define a tort but can recognize one when we see it. The legislature clearly did not intend that every tort case would be eligible for an award of fees whenever the parties had some sort of contractual relationship or ingenious counsel could find authority for an implied-in-law contractual claim. Thus, we see no alternative but to attempt to draw the line on the basis of the principles set forth above. As difficult as line-drawing may be in general, we have no doubt that professional malpractice cases, such as the case before us, fall outside the line of eligibility. Absent some special contractual agreement or undertaking between those in the professional relationship, therefore, a professional malpractice action does not “arise” from contract, but rather from tort. Insofar as they are contrary to this view, Trebilcox, supra, and Lake Havasu Community Hospital v. Arizona Title Insurance & Trust Co., 141 Ariz. 363, 687 P.2d 371 (App.1984), which relies on it, are disapproved. It follows that the award of fees made by the court of appeals in the present case was improper.

The portion of the court of appeals’ opinion awarding attorney’s fees to the Bar-mats is accordingly disapproved and the award of fees is vacated. The balance of the court of appeals’ opinion is approved and the case is remanded to the trial court for proceedings consistent with both this opinion and that of the court of appeals.

GORDON, C.J., and CAMERON, HOLOHAN and MOELLER, JJ., concur. 
      
      . Consider, for example, the client who tries to reject his court-appointed attorney, or the seller of a chattel that causes damage. If the chattel was defective and unreasonably dangerous in the latter case, the injured buyer may maintain a tort action under the theory of strict liability. Here, too, although the relationship between buyer and seller arose out of a contract, the essential nature of the action sounds in tort: the liability of the seller would exist even without the contract. Even a "mere bystander” having no contractual relationship could recover from the seller. See Caruth v. Mariani, 11 Ariz.App. 188, 463 P.2d 83 (1970). The duty breached was one imposed by law in recognition of the foreseeability of harm if defendant’s conduct fell below a particular standard. The action is a tort action.
     
      
      . Phrase borrowed from Justice Stewart’s concurring opinion in Jacobellis v. Ohio, 378 U.S. 184, 197, 84 S.Ct. 1676, 1683, 12 L.Ed.2d 793 (1964).
     