
533 So.2d 188 (1988)
Henry C. HUGHES, Jr.
v.
Ludger D. MARTIN.
86-1179.
Supreme Court of Alabama.
September 23, 1988.
*189 Leon Garmon, Gadsden, for appellant.
Curtis Wright of Dortch, Wright & Russell, Gadsden, for appellee.
PER CURIAM.
This is an appeal in a legal malpractice case, brought by plaintiff/appellant Henry C. Hughes, Jr., against attorney Ludger Martin, from a summary judgment entered in favor of the defendant attorney, Ludger Martin.

FACTS
Hughes's parents were killed when the vehicle they were driving was hit head-on by a tractor-trailer unit owned by Southern Haulers, Inc., and driven by George Porter, Jr. Hughes, as executor of his parents' estates, retained Myron Allenstein to represent him. Allenstein filed a wrongful death action against Southern Haulers, without joining Porter as a defendant. The jury returned a verdict in favor of Hughes in the amount of $10,000. Hughes appealed that judgment to the Alabama Court of Civil Appeals, claiming, inter alia, that the trial jury awarded insufficient damages; the Court of Civil Appeals affirmed the trial court's judgment on all grounds. See Hughes v. Southern Haulers, Inc., 379 So. 2d 601 (Ala.Civ.App.1979).
Hughes, acting through attorney Allenstein, filed another wrongful death action, this time against George Porter, Jr., the driver of the tractor-trailer rig. Approximately four months later, Allenstein associated attorney Ludger Martin to assist him in the Porter case. Heeding the advice of Allenstein and Martin, Hughes accepted Porter's pretrial settlement offer of $25,000.
Following the settlement of the Porter case, Hughes brought a malpractice action against Allenstein in a federal district court, claiming damages for Allenstein's alleged negligence in the Southern Haulers case. A jury returned a verdict in Allenstein's favor, and the judgment based on that verdict was subsequently affirmed on appeal. Hughes v. Allenstein, 802 F.2d 1397 (11th Cir.1986).
Within a month after the verdict in favor of Allenstein in the Southern Haulers case, plaintiff Hughes brought a malpractice action against both Allenstein and Martin in state court, alleging that Allenstein and Martin had breached their fiduciary duties and had negligently rendered legal advice with regard to Porter's settlement offer in the Hughes v. Porter case. The trial court granted Allenstein's motion for summary judgment, and Hughes appealed to this Court, which affirmed. See Hughes v. Allenstein, 514 So.2d 858 (Ala.1987). Martin also filed a motion for summary judgment, which the trial court also granted. Hughes now appeals from the summary judgment in Martin's favor.

I
The trial court did not specify the ground upon which it based its summary judgment in favor of Martin, but the law in Alabama is clear that this Court is bound to sustain a trial court's judgment, if there is a valid basis for it. Cole v. Racetrac Petroleum, Inc., 466 So.2d 93 (Ala. 1985); Kite v. Kite, 444 So.2d 863 (Ala.Civ.App.1983).
*190 We believe there is a legal ground upon which the summary judgment in favor of Martin can be sustained.
In our judgment, this Court's decision in Hughes v. Allenstein, supra, which affirmed the summary judgment in favor of Allenstein, adjudicated the same cause of action that appellant now seeks to litigate against Martin, who was associated in the case by Allenstein; therefore, the principle of res judicata is applicable.

II
Res judicata is a broad, judicially developed doctrine, which rests upon the ground that public policy, and the interest of the litigants alike, mandate that there be an end to litigation; that those who have contested an issue shall be bound by the ruling of the court; and that issues once tried shall be considered forever settled between those same parties and their privies. 46 Am.Jur.2d, Res Judicata, § 395 (1969). "The principle of res judicata fosters reliance on judicial action, and tends to eliminate vexation and expense to the parties, wasted use of judicial machinery and the possibility of inconsistent results." "Developments in the LawRes Judicata," 65 Harv.L.Rev. 820 (1952).
In order for a judgment in the prior suit to bar a subsequent suit: (1) the question or fact must have been litigated and determined by a court of competent jurisdiction; (2) the final judgment must have been rendered on the merits; (3) the parties, or those in privity with them, must be of such a relationship to the parties in the subsequent action as to entitle them to the benefits and/or burdens of the prior litigation; and (4) the same cause of action must be involved in both lawsuits. Stevenson v. International Paper Co., 516 F.2d 103 (5th Cir.1975).
If these essential elements are met, any issue that was, or could have been, adjudicated in the prior action is barred from further litigation. Trimble v. Bramco Products, Inc., 351 So.2d 1357 (Ala.1977); McGruder v. B & L Construction Co., 331 So.2d 257 (Ala.1976).
Hughes, in his brief, concedes that "the first two elements of res judicata are present in the action at bar." However, he argues that the last two elements of res judicata are not present, namely, that the parties to the two suits are not identical and that the cause of action is not the same in both the original action against Allenstein and the present action against Allenstein and Martin.
It is our conclusion, reached after careful consideration of the record, that the requirements for the principle of res judicata to apply are met in this case. Both the first requirement (i.e., a question determined by a court of competent jurisdiction), and the second requirement (i.e., a final judgment rendered on the merits) are clearly met in this case. We also find that the third and fourth requirements, dealing respectively with whether the parties in the two lawsuits are in privity with each other and whether the cause of action is the same in both the original action and in the present action, have likewise been met. We set forth our specific reasons with regard to the third and fourth requirements.
Appellant strenuously insists that his prior claim against attorney Allenstein was for professional malpractice and was based on negligent pre-trial preparation and trial of the Hughes v. Southern Haulers case (the suit against the corporation), while the present action arose from the allegedly negligent advice of defendants Allenstein and Martin in the settlement of the Hughes v. Porter case (the suit against the driver). Therefore, appellant contends that the parties in the two suits are not "substantially identical" and that the causes of action are not related.
On its face, it would appear that appellant is correct, but the facts unequivocally show that Allenstein associated Martin in the case; therefore, we conclude that there was sufficient privity between Allenstein and Martin for the principle of res judicata to apply. Upon review of the record, it is clear that Hughes sued both Martin and Allenstein as joint tort-feasors in the malpractice case based on the Hughes v. Porter case, choosing not to claim, if he could, *191 that Martin's alleged negligence was different from Allenstein's. Because Hughes sued Allenstein and Martin as joint tort-feasors, we hold that privity existed between Allenstein and Martin and that the "substantial identity of the parties" prong of the res judicata test is met.
As stated earlier, before a prior judgment will bar a subsequent action, the parties, or those in privity with them, must be the same in the two lawsuits.
"The term `privity' has not been uniformly defined with respect to res judicata. The following three definitions have appeared in Alabama cases: (1) the relationship of one who is privy in blood, estate, or law; (2) the mutual or successive relationship to the same rights of property; and (3) an identity of interest in the subject matter of litigation. Largely defining privity by example, the Alabama cases seem to resolve the question on an ad hoc basis in which the circumstances determine whether a person should be bound by or entitled to the benefits of a judgment. The decision usually turns on whether the relationship between the parties was close enough and whether adequate notice of the action was received by the alleged privy; this test has been bolstered by the recent tendency of the Alabama courts to analyze privity as an identity of interests."
"Issue preclusion in Alabama," 32 Ala.L. Rev. 500, 520-21 (1981).
Appellee contends, and we agree, that "if the claim of Hughes v. Allenstein is barred by application of the doctrine of res judicata, then the claim against co-defendant Martin is likewise barred by the doctrine of res judicata; first, under claim preclusion, and secondly, that not only was there substantial identity of parties between Hughes and Allenstein, but also substantial identity between Allenstein and Martin."
The fourth requirement of res judicata is that each suit be based on the same cause of action. The question is whether the same evidence substantially supports both actions. Geer Brothers, Inc. v. Crump, 349 So.2d 577 (Ala.1977). It is considered the same cause of action when the same evidence is applicable in both actions. Gulf American Fire & Casualty Co. v. Johnson, 282 Ala. 73, 209 So.2d 212 (1968).
With respect to the "same cause of action" requirement, we hold that the alleged negligence asserted herein by Hughes against Martin arose out of one attorney-client relationship and involves one cause of action for wrongful death. There was a substantial nexus between Allenstein and Martin. Allenstein was lead counsel and Martin was associate counsel. Nowhere does the present action allege, and nowhere does Hughes contend, that the representation by Allenstein and Martin as his lawyers differed to any degree whatsoever.
The doctrine of res judicata is summarized in a treatise as follows:
"The doctrine of res judicata does not rest upon the fact that a particular proposition has been affirmed and denied in the pleadings, but upon the fact that it has been fully and fairly investigated and tried,that the parties have had an adequate opportunity to say and prove all that they can in relation to it, that the minds of court and jury have been brought to bear upon it, and so it has been solemnly and finally adjudicated."
2 Black on Judgments § 614, p. 936 (1902).
We conclude, based on all of the above, that the plaintiff's cause of action was the same in both cases, because both cases arose out of the same transaction and occurrence. Therefore, plaintiff's action is barred by the doctrine of res judicata.
Martin's summary judgment is due to be, and it hereby is, affirmed.
AFFIRMED.
JONES, MADDOX and BEATTY, JJ., concur.
SHORES, HOUSTON and STEAGALL, JJ., concur in the result.
