Plaintiffs, who are some of the beneficiaries under the will of Eugene H. Emmick, deceased, brought this action for damages against defendant L. S. Hamm, an attorney at law who had been engaged by the testator to prepare the will. They have appealed from a judgment of dismissal entered after an order sustaining a general demurrer to the second amended complaint without leave to amend.
The allegations of the first and second causes of action are summarized as follows: Defendant agreed with the testator, for a consideration, to prepare a will and codicils thereto for him by which plaintiffs were to be designated as beneficiaries of a trust provided for by paragraph Eighth of the will and were to receive 15 per cent of the residue as specified in that paragraph. Defendant, in violation of instructions and in breach of his contract, negligently prepared testamentary instruments containing phraseology that was invalid by virtue of section 715.2 and former sections 715.1 and 716 of the Civil Code relating to restraints on alienation and the rule against perpetuities. 1 Paragraph Eighth of these instru *587 ments “transmitted” the residual estate in trust and provided that the “trust shall cease and terminate at 12 o’clock noon on a day five years after the date upon which the order distributing the trust property to the trustee is made by the Court having jurisdiction over the probation of this will.” After the death of the testator the instruments were admitted to probate. Subsequently defendant, as draftsman of the instruments and as counsel of record for the executors, advised plaintiffs in writing that the residual trust provision was invalid and that plaintiffs would be deprived of the entire amount to which they would have been entitled if the provision had been valid unless they made a settlement with the blood relatives of the testator under which plaintiffs would receive a lesser amount than that provided for them by the testator. As the direct and proximate result of the negligence of defendant and his breach of contract in preparing the testamentary instruments and the written advice referred to above, plaintiffs were compelled to enter into a settlement under which they received a share of the estate amounting to $75,000 less than the sum which they would have received pursuant to testamentary instruments drafted in accordance with the directions of the testator.
(The third cause óf action will be discussed separately because it concerns matters not involved in the first two counts.)
*588
It was held in
Buckley
v.
Gray,
The reasoning underlying the denial of tort liability in the
Buckley
case, i.e., the stringent privity test, was rejected in
Biakanja
v.
Irving,
Many of the factors which led to the conclusion that the notary public involved in' Biakanja was liable are equally *589 applicable here. As in Biakanja, one of the main purposes which the transaction between defendant and the testator intended to accomplish was to provide for the transfer of property to plaintiffs; the damage to plaintiffs in the event of invalidity of the bequest was clearly foreseeable; it became certain, upon the death of the testator without change of the will, that plaintiffs would have received the intended benefits but for the asserted negligence of defendant; and if persons such as plaintiffs are not permitted to recover for the loss resulting from negligence of the draftsman, no one would be able to do so and the policy of preventing future harm would be impaired.
Since defendant was authorized to practice the profession of an attorney, we must consider an additional factor not present in Biakanja, namely, whether the recognition of liability to beneficiaries of wills negligently drawn by attorneys would impose an undue burden on the profession. Although in some situations liability could be large and unpredictable in amount, this is also true of an attorney’s liability to his client. We are of the view that the extension of his liability to beneficiaries injured by a negligently drawn will does not place an undue burden on the profession, particularly when we take into consideration that a contrary conclusion would cause the innocent beneficiary to bear the loss. The fact that the notary public involved in Biakanja was guilty of unauthorized practice of the law was only a minor factor in determining that he was liable, and the absence of the factor in the present case does not justify reaching a different result.
It follows that the lack of privity between plaintiffs and defendant does not preclude plaintiffs from maintaining an action in tort against defendant.
Neither do we agree with the holding in
Buckley
that beneficiaries damaged by an error in the drafting of a will cannot recover from the draftsman on the theory that they are third-party beneficiaries of the contract between him and the testator.
2
Obviously the main purpose of a con
*590
tract for the drafting of a will is to accomplish the future transfer of the estate of the testator to the beneficiaries named in the will, and therefore it seems improper to hold, as was done in
Buckley,
that the testator intended only “remotely” to benefit those persons. It is true that under a contract for the benefit of a third person performance is usually to be rendered directly to the beneficiary, but this is not necessarily the case. (See Rest., Contracts, § 133, comment d; 2 Williston on Contracts (3d ed. 1959) 829.) For example, where a life insurance policy lapsed because a bank failed to perform its agreement to pay the premiums out of the insured’s bank account, it was held that after the insured’s death the beneficiaries could recover against the bank as third-party beneficiaries.
(Walker Bank & Trust Co.
v.
First Security Corp.,
Section 1559 of the Civil Code, which provides for enforcement by a third person of a contract made “expressly” for his benefit, does not preclude this result. The effect of the section is to exclude enforcement by persons who are only incidentally or remotely benefited. (See
Hartman Ranch Co.
v.
Associated Oil Co.,
' Defendant relies on language in
Smith
v.
Anglo-
*591
California Trust Co.,
We conclude that intended beneficiaries of a will who lose their testamentary rights because of failure of the attorney who drew the will to properly fulfill his obligations under his contract with the testator may recover as third-party beneficiaries.
However, an attorney is not liable either to his client or to a beneficiary under a will for errors of the kind alleged in the first and second causes of action.
The general rule with respect to the liability of an attorney for failure to properly perform his duties to his client is that the attorney, by accepting employment to give legal advice or to render other legal services, impliedly agrees to use such skill, prudence, and diligence as lawyers of ordinary skill and capacity commonly possess and exercise in the performance of the tasks which they undertake.
(Estate of Kruger,
The complaint, as we have seen, alleges that defendant drafted the will in such a manner that .the trust was invalid because it violated the rules relating to perpetuities and restraints on alienation. These closely akin subjects have long perplexed the courts and the bar. Professor Gray, a leading authority in the field, stated: “There is something in the subject which seems to facilitate error. Perhaps it is because the mode of reasoning is unlike that with which lawyers are most familiar. ... A long list might be formed of the demonstrable blunders with regard to its questions made by eminent men, blunders which they themselves have been sometimes the first to acknowledge; and there are few lawyers of any practice in drawing wills and settlements who have not at some time either fallen into the net which the Rule spreads for the unwary, or at least shuddered to think how narrowly they have escaped it.” (Gray, The Rule Against Perpetuities (4th ed. 1942) p. xi; see also Leach, Perpetuities Legislation (1954) 67 Harv.L.Rev. 1349 [describing the rule as a “technicality-ridden legal nightmare” and a “dangerous instrumentality in the hands of most,members of the bar”].) Of the California law on perpetuities and restraints it has been said that few, if any, areas of the law have been fraught with more confusion or concealed more traps for the unwary draftsman; that members of the bar, probate courts, and title insurance companies make errors in these matters; that the code provisions adopted in 1872 created a situation worse than if the matter had been left to the common law, and that the legislation adopted in 1951 (under which the will involved here was drawn), despite the best of intentions, added further complexities. (See 38 Cal.Jur.2d 443; Coil, Perpetuities and Restraints; A Needed Reform (1955) 30 State Bar J. 87, 88-90.)
In view of the state of the law relating to perpetuities and restraints on alienation and the nature of the error, if any, assertedly made by defendant in preparing the instrument, it would not be proper to hold that defendant failed to use such skill, prudence, and diligence as lawyers of ordinary skill and capacity commonly exercise. The provision of the will quoted in the complaint, namely, that the trust was to terminate five years after the order of the probate court distributing the property to the trustee, could cause the trust to be
*593
invalid only because of the remote possibility that the order of distribution would be delayed for a period longer than a life in being at the creation of the interest plus 16 years (the 21-year statutory period less the five years specified in the will). Although it has been held that a possibility of this type could result in invalidity of a bequest
(Estate of Johnston,
The third cause of action contains additional allegations as follows: After admission of the will and codicils to probate, Harold Houghton Emmick, Walton Russell Emmiek, delta Inez Spelman, and Retha Newell, hereinafter called the contestants, instituted a will contest. The executors, defendant, and the contestants tentatively reached a settlement agreement, subject to court approval, under which $10,000 would be paid to the contestants from the assets of the estate in return for which each contestant would sign an “appropriate release.” Defendant was negligent in the performance of his duties in that he caused to be executed on behalf of the estate and those interested therein, including plaintiffs, releases which did not preclude the contestants from a subsequent attack upon the validity of the testamentary instruments. After complete execution of the releases and their transmittal to escrow but before approval of the compromise *594 by the court, defendant was advised by competent counsel that the residual clause of the will and codicils was invalid as a violation of the rule against perpetuities and that as a consequence the phraseology of the releases was inadequate to protect the estate and persons interested therein, and defendant was requested by competent counsel to modify the releases and insert appropriate language suggested by counsel under which the contestants would release the estate and persons interested in it from any claims of whatsoever kind or nature. Defendant refused to do so and also refused to call the court’s attention to the recommendations. As a consequence of the failure to direct the matter to the attention of the court, the order approving the compromise was made on the assumption that the releases would give adequate protection. The sum of $10,000 was paid to the contestants from the assets of the estate, and the releases were filed in the proceedings. Subsequently the contestants joined in a legal attack upon the validity of the residual clause of the will and codicils and by virtue of the invalidity of the clause participated in the settlement referred to above concerning paragraph Eighth of the will. If the releases had been prepared in accord with good legal practice they would have precluded such participation, with the result that plaintiffs would have received an additional sum of $15,000 from the estate.
This cause of action, unlike the first two, does not concern defendant’s conduct as attorney for the testator, but, rather, asserted negligence by him when acting as attorney for the executors with respect to the execution of releases in the settlement of a will contest based on lack of testamentary capacity. It is undisputed that the releases were adequate to preclude any further litigation of that contest, but plaintiffs assert that defendant had a duty to obtain releases which, in addition, would waive all other claims of the contestants against the estate and prevent them from subsequently attacking the validity of the trust provisions.
There are no allegations that the contestants, either at the time of the negotiations for the settlement or at the time of the signing of the releases, were willing to waive their rights to make other attacks upon the will after the settlement of that contest. In the absence of additional allegations we must assume that the agreed sum of $10,000 was intended solely for the settlement of the contest and the ground on which it was based, i.e., lack of testamentary capacity, and it would ordinarily be expected that the contestants would have de *595 manded an additional sum for a more extensive waiver terminating their rights to attack the validity of the various provisions of the will. The written releases, of course, were required to conform to the settlement agreement. Under these circumstances it could well be argued that the attorneys for the contestants would have been derelict in their duty to their clients if they had approved broader releases. At most, under the allegations, defendant had a duty to request that the contestants sign broader releases, but there is no allegation that he failed to ask them to do so. The third count does not state a cause of action for negligence.
Although defendant pointed out in both the trial court and this court that there is no allegation that he could have secured releases different from the ones given, plaintiffs make no claim that they can amend their complaint so as to cure the deficiency, and we cannot properly hold that the trial court abused its discretion in denying leave to amend.
The judgment is affirmed.
Traynor, J., Schauer, J., McComb, J., Peters, J., White, J., and Dooling, J., concurred.
Appellants’ petition for a rehearing was denied October 4, 1961.
Notes
Former section. 715.1 of the Civil Code, as it read at the times involved here, provided: “The absolute power of alienation cannot be suspended, by any limitation or condition whatever, for a period longer than 21 years *587 after some life in being at the creation of the interest and any period of gestation involved in the situation to which the limitation applies. The lives selected to govern the time of suspension must not be so numerous or so situated that evidence of their deaths is likely to be unreasonably difficult to obtain. ’ ’
Section 715.2 reads as follows: "No interest in real or personal property shall be good unless it must vest, if at all, not later than 21 years after some life in being at the creation of the interest and any period of gestation involved in the situation to which the limitation applies. The lives selected to govern the time of vesting must not be so numerous or so situated that evidence of their deaths is likely to be unreasonably difficult to obtain. It is intended by the enactment of this section to make effective in this State the American common-law rule against perpetuities. ’ ’
Former section 716, as it read at the times involved here, provided: "Every future interest is void in its creation which, by any possibility, may suspend the absolute power of alienation for a longer period than is prescribed in this chapter. Such power of alienation is suspended when there are no persons in being by whom an absolute interest in possession can be conveyed. The period of time during which an interest is destructible pursuant to the uncontrolled volition and for the exclusive personal benefit of the person having such a power of destruction is not to be included in determining the existence of a suspension of the absolute power of alienation or the permissible period for the vesting of an interest within the rule against perpetuities, ’ ’
It has been recognized in other jurisdictions that the
client
may recover in a contract action for failure of the attorney to carry out his agreement. (See 5 Am.Jur. 331;
Defendant asserts that a provision of a will like the one quoted in the complaint could not cause a trust to be invalid unless it also appeared that there were contingent interests which could not vest within the statutory time or that the trust could not be terminated by the beneficiaries acting together within the statutory period. (See
Estate of Phelps,
