delivered the opinion of the court:
Plaintiffs appeal the dismissal of their amended complaint for failure to state a cause of action for legal malpractice against the defendant, Ronald Griesheimer. The circuit court of Lake County held that there was no attorney-client relationship between the plaintiffs and the defendant and that therefore no cause of action for legal malpractice was stated. The appellate court affirmed. (93 Ill. App. 3d 751.) We granted plaintiffs leave to appeal (73 Ill. 2d R. 315).
Plaintiffs’ amended complaint alleges that the defendant was retained to represent Loretta Ray in a divorce action against her husband, George Ray. The plaintiffs herein are the children of Loretta and George Ray, all of whom were minors at the time the divorce was granted in June 1971. The divorce decree contained a provision requiring George Ray to “maintain all four of his children as the prime beneficiaries in his life insurance policies.” George Ray had a $10,000 life insurance policy through his employer at the time the divorce decree was entered. After the divorce decree was entered, he remarried and named his second wife the beneficiary of the insurance policy. She received the proceeds after his death in 1976.
The complaint also alleges that the defendant owes the plaintiffs “the duty to exercise a reasonable degree of professional care and skill, as an attorney, with reference to seeing that the plaintiffs became the prime beneficiaries in all life insurance policies which insured GEORGE J. RAY.” The complaint also alleges that the defendant breached that duty by “negligently and carelessly,” inter alia, failing to notify George Ray’s employer, or the insurance company, of the divorce-decree provision and failing to advise Loretta Ray to notify her *17ex-husband’s employer or insurance company of the provision. Finally, the amended complaint alleges that “as a direct and proximate result of the negligent acts or omissions of the defendant” the plaintiffs have suffered monetary damage.
Plaintiffs argue that their complaint states a cause of action for breach of contract. The plaintiffs maintain that this complaint should be construed to allege that the children are direct third-party beneficiaries of the contract between their mother, Loretta Ray, and her attorney, the defendant. The defendant argues that the complaint fails to allege that a contract was entered into for the direct benefit of the plaintiffs and that, in any event, the plaintiffs herein could not have been intended beneficiaries of the contract.
The purpose of pleadings is to present, define and narrow the issues and limit the proof needed at trial. (People ex rel. Fahner v. Carriage Way West, Inc. (1981), 88 Ill. 2d 300, 307.) We acknowledge that pleadings are to be liberally construed with a view to doing justice between the parties. (Ill. Rev. Stat. 1977, ch. 110, par. 33(3).) In considering a motion to dismiss, however, “the pleadings are to be construed strictly against the pleader.” (Knox College v. Celotex Corp. (1981), 88 Ill. 2d 407, 421.) Illinois requires fact pleading under its Civil Practice Act. (Ill. Rev. Stat. 1977, ch. 110, pars. 31, 33.) Notice pleading, as used in Federal courts and other jurisdictions, is not sufficient. Although sections 42(2) and 33(3) of our practice act (Ill. Rev. Stat. 1977, ch. 110, pars. 42(2), 33(3)) contain provisions concerning liberal construction, such provisions do not remedy the failure of a complaint to state a cause of action. Knox College v. Celotex Corp. (1981), 88 Ill. 2d 407, 427.
The amended complaint herein clearly fails to state a cause of action for breach of contract. The amended complaint fails to allege, legally or factually, that a con*18tract was entered into for the direct benefit of the plaintiffs, which is an indispensable element of a third-party beneficiary theory of recovery. (Altevogt v. Brinkoetter (1981), 85 Ill. 2d 44; People ex rel. Resnik v. Curtis & Davis, Architects & Planners, Inc. (1980), 78 Ill. 2d 381; Carson Pirie Scott & Co. v. Parrett (1931), 346 Ill. 252.) The making of a contract with an attorney for the benefit of a third party does not necessarily create an attorney-client relationship between the attorney and the third-party beneficiary.
Also, this complaint for legal malpractice is couched in terms of negligence, not contract. Throughout the complaint there are allegations that the defendant attorney owed certain duties to the plaintiffs and that he negligently breached those duties. Paragraph 4 of the complaint states:
“That the Defendant *** owed to the Plaintiffs the duty to exercise a reasonable degree of professional care and skill, as an attorney ***.”
Paragraph 5 states:
“That the Defendant *** failed to exercise a reasonable degree of professional care and skill by negligently and carelessly doing one or more of the following ***.”
Paragraph 8 states:
“That as a direct and proximate result of the negligent acts or omissions of the defendant ***.”
If plaintiffs' amended complaint states a cause of action at all, it is in tort, rather than contract.
A complaint for negligence, to be legally sufficient, must set out facts that establish the existence of a duty owed by the defendant to the plaintiff, a breach of that duty, and an injury proximately resulting from the breach. (Cunis v. Brennan (1974), 56 Ill. 2d 372, 374.) The determination of the duty — whether the defendant and the plaintiffs stood in such a relationship to one another that the law imposed upon the defendant an obligation of reason*19able conduct for the benefit of the plaintiffs — is an issue of law for the determination of the court. Mieher v. Brown (1973), 54 Ill. 2d 539; Prosser, Torts sec. 45, at 289 (4th ed. 1971).
In concluding that the plaintiffs’ complaint failed to state a cause of action, the appellate court relied on the fact that no attorney-client relationship — no privity — existed between the plaintiffs and the defendant and, therefore, no duty existed. We consider that privity is not an indispensable prerequisite to establishing a duty of care between a nonclient and an attorney in a suit for legal malpractice. In this case, however, we find that no duty existed between the parties to this lawsuit.
The traditional, general rule has been that the attorney is liable only to his client, not to third persons. (National Savings Bank v. Ward (1880), 100 U.S. 195, 25 L. Ed. 621.) The concept of privity has long protected attorneys from malpractice claims by nonclients. We note that several Illinois cases have refused to extend the obligations of an attorney to nonclient third parties. In Bloomer Amusement Co. v. Eskenazi (1979), 75 Ill. App. 3d 117, the contract seller of certain realty brought an action against the attorney for the contract purchaser, alleging negligence in the attorney’s failure to record the real estate contract. In affirming the trial court’s granting of summary judgment for the attorney, the court quoted from National Savings Bank v. Ward (1880), 100 U.S. 195, 200, 25 L. Ed. 621, 623, that “the general rule is that the obligation of the attorney is to his client and not to a third party,” absent fraud or collusion.
More recently in Byron Chamber of Commerce, Inc. v. Long (1981), 92 Ill. App. 3d 864, 868, the appellate court stated:
“It is the general rule and the rule followed in Illinois that a contract for professional services between a lawyer and a client does not create a professional obligation between the lawyer and an unknown third party.”
*20Though both Bloomer and Long arose under substantially different factual circumstances than the case at bar, both recognized the traditional requirement of privity for a non-client to recover from an attorney. See Annot., 45 A.L.R3d 1181 (1972).
The trend in tort law has been to abolish privity of contract (Rozny v. Marnul (1969), 43 Ill. 2d 54) as a prerequisite to establishing a duty. In Rozny; the plaintiffs purchased a house and lot which was described in a plat of an admittedly inaccurate survey prepared by defendant for S&S Builders. In discussing the tort of misrepresentation the court stated:
“This process of adhering to or eliminating the privity requirement has proved to be an unsatisfactory method of establishing the scope of tort liability to third persons. *** To eliminate any uncertainty still remaining after Suvada v. White Motor Co., 32 Ill. 2d 612, 617, we emphasize that lack of direct contractual relationship between the parties is not a defense in a tort action in this jurisdiction. Thus, tort liability will henceforth be measured by the scope of the duty owed rather than the artificial concepts of privity.” Rozny v. Marnul (1969), 43 Ill. 2d 54, 62.
While privity of contract has been abolished in many areas of tort law, the concern is still that liability for negligence not extend to an unlimited and unknown number of potential plaintiffs. In the area of legal malpractice the attorney’s obligations to his client must remain paramount. In such cases the best approach is that the plaintiffs must allege and prove facts demonstrating that they are in the nature of third-party intended beneficiaries of the relationship between the client and the attorney in order to recover in tort. (See Clagett v. Dacy (1980), 47 Md. App. 23, 420 A.2d 1285; R. Mallen & V. Levit, Legal Malpractice sec. 80, at 156-59 (2d ed. 1981); cf. Marker v. Greenberg (Minn. 1981), 313 N.W.2d 4; Brody v. Ruby (Iowa 1978), 267 N.W.2d 902.) By this we mean that to establish a duty *21owed by the defendant attorney to the nonclient the non-client must allege and prove that the intent of the client to benefit the nonclient third party was the primary or direct purpose of the transaction or relationship. Note, Attorney’s Liability to Third Parties for Malpractice: The Growing Acceptance of Liability in the Absence of Privity, 21 Washburn L.J. 48, 59 (1981).
Analogizing the scope of the duty to the concept of a third-party direct beneficiary serves the purpose of limiting the scope of the duty owed by an attorney to nonclients. The key consideration is the attorney’s acting at the direction of or on behalf of the client to benefit or influence a third party. (Probert & Hendricks, Lawyer Malpractice: Duty Relationships Beyond Contract, 55 Notre Dame Law. 708, 728 (1980).) In Clagett v. Dacy (1980), 47 Md. App. 23, 29, 420 A.2d 1285, 1289, a legal malpractice action, the court stated:
“Whether the action is based upon a contract (express or implied), to which the traditional rules relating to third party beneficiaries may apply, or more on a theory of negligence — the violation of a duty not founded exclusively upon contract — there still must be shown (i.e., alleged and shown) that the plaintiff, if not the direct employer/client of the defendant attorney, is a person or part of a class of persons specifically intended to be the beneficiary of the attorney’s undertaking.”
We conclude that, for a nonclient to succeed in a negligence action against an attorney, he must prove that the primary purpose and intent of the attorney-client relationship itself was to benefit or influence the third party. Under such proof, recovery may be allowed, provided that the other elements of a negligence cause of action can be proved. Comment, Liability of Lawyers to Third Parties for Professional Negligence in Oregon, 60 Or. L. Rev. 375 (1981).
The analogy to third-party direct beneficiaries to determine the duty owed to a nonclient by an attorney in a neg*22ligence action provides for a broader scope of liability than privity, but a narrower scope of liability than the balancing approach used in California. (R. Mallen & V. Levit, Legal Malpractice sec. 81, at 161 (2d ed. 1981).) In Biakanja v. Irving (1958), 49 Cal. 2d 647, 320 P.2d 16, the California Supreme Court held that whether in a specific case the defendant will be liable to a third person not in privity is a matter of policy and involves the balancing of various factors. The factors are the extent to which the transaction was intended to affect the plaintiff, the foreseeability of harm to him, the degree of certainty that the plaintiff suffered injury, the closeness of the connection between the defendant’s conduct and the injury suffered, the moral blame attached to the defendant’s conduct and the policy of preventing future harm. However, even under the California balancing test, the predominant inquiry has generally resolved to one criterion: Were the services intended to benefit the plaintiff? R. Mallen & V. Levit, Legal Malpractice sec. 80, at 157 (2d ed. 1981).
It would appear that courts are more willing to apply the balancing test to extend an attorney’s duty to non-clients in cases in which the attorney’s representation of his client has essentially been of a nonadversarial nature, such as drafting wills for the benefit of intended beneficiaries thereunder. Garcia v. Borelli (1982), 129 Cal. App. 3d 24, 180 Cal. Rptr. 768; Heyer v. Flaig (1969), 70 Cal. 2d 223, 449 P.2d 161, 74 Cal. Rptr. 225; Biakanja v. Irving (1958), 49 Cal. 2d 647, 320 P.2d 16.
Where a client’s interest is involved in a proceeding that is adversarial in nature, the existence of a duty of the attorney to another person would interfere with the undivided loyalty which the attorney owes his client and would detract from achieving the most advantageous position for his client. (R. Mallen & V. Levit, Legal Malpractice sec. 80, at 159 (2d ed. 1981).) Our code of professional responsibility requires that a lawyer represent his client with undi*23vided fidelity (84 Ill. 2d R. 5—107), and Canon 7 provides that a lawyer should represent a client zealously within the boundaries of the law (84 Ill. 2d Canon 7). In cases of an adversarial nature, in order to create a duty on the part of the attorney to one other than a client, there must be a clear indication that the representation by the attorney is intended to directly confer a benefit upon the third party.
Applying the “intent to directly benefit” test to the facts alleged in the complaint, it is clear that the plaintiffs herein are not in the nature of direct third-party beneficiaries. The attorney was hired primarily for the purpose of obtaining a divorce, property settlement, and custody of the minor children for Loretta Ray, not to represent her children’s interest. The plaintiffs herein are, at best, only incidental beneficiaries in this situation. That George Ray name the children as beneficiaries of the policy cannot be described as the primary reason that Loretta Ray retained the defendant to be her attorney.
Dissolution proceedings are, for the most part, adversarial in nature. To conclude that an attorney representing one of the spouses also owes a legal duty to the children of the two litigants would clearly create conflict-of-interest situations. (R. Mallen & V. Levit, Legal Malpractice sec. 447 (2d ed. 1981).) In this case, a conflict could possibly have arisen between the plaintiffs’ right to support or the proceeds of the insurance policy versus the wife’s interest in a property settlement and maintenance. The same conflict could arise in all dissolution proceedings when minor children’s support issues arise. In this case, if the wife was the beneficiary of the insurance policy in question before the divorce, and the husband insisted on naming the children as beneficiaries, or the court so decreed, then the wife’s interest would conflict with the children’s interest. We refuse to create such a wide range of potential conflicts by imposing such duties upon an attorney in favor of a nonclient, unless the intent to benefit the third party is clearly evi*24dent.
We believe a different situation would confront us if this complaint had alleged sufficient facts to show that the defendant had undertaken a duty to notify the insurance company or the husband’s employer of the provision in the divorce decree. In that situation, the attorney may have a duty to exercise reasonable care because his client and the plaintiffs herein could have justifiably relied on that undertaking. Schwartz v. Greenfield, Stein & Weisinger (1977), 90 Misc. 2d 882, 396 N.Y.S.2d 582; Steward v. Sbarro (1976), 142 N.J. Super 581, 362 A.2d 581.
In cases where it appears that the interest of a minor requires separate representation, we note that section 506 of the Illinois Marriage and Dissolution of Marriage Act (Ill. Rev. Stat. 1979, ch. 40, par. 506) provides for representation of minor children by an attorney and a guardian ad litem. This provision was not in effect when the decree in this case was entered. However, courts have always had the inherent equitable power to appoint a guardian ad litem for minors interested in litigation. (Flynn v. Flynn (1918), 283 Ill. 206; In re Estate of Viehman (1964), 47 Ill. App. 2d 138, 150; 43 C.J.S. Infants sec. 228 (1978). See also, Ill. Ann. Stat., ch. 40, par. 506, Historical and Practice Notes, at 630 (Smith-Hurd 1980); Chambers, The Ambiguous Role Of The Lawyer Representing The Minor In Domestic Relations Litigation, 70 Ill. B.J. 510 (1982).) Courts have always had statutory authority to appoint guardians ad litem for minor parties to litigation. (See Ill. Rev. Stat. 1979, ch. 110, par. 356.) Thus, the rights of the minor children of the parties in this case could have been protected without compromising the undivided loyalty of either spouse’s attorney.
Under the facts as pleaded, we hold that no duty in negligence was owed by the wife’s attorney to his client’s children; hence, no cause of action was stated. In this case, to establish a duty, the plaintiffs must plead and prove that *25the relationship between the attorney and his client was entered into for the primary and direct benefit of the plaintiffs, plus the other traditional elements of negligence. Also, the allegations of this complaint do not state a cause of action in contract for the reasons heretofore stated.
Accordingly, we conclude that the appellate court properly affirmed the dismissal by the circuit court of Lake County of plaintiffs’ amended complaint for failure to state a cause of action.
JUSTICE MORAN took no part in the consideration or decision of this case.