
571 So.2d 1104 (1990)
Albert TURNER and Edna Turner
v.
Robert S. GREEN and Rita F. Green.
89-1265.
Supreme Court of Alabama.
November 30, 1990.
*1105 John A. Courtney, Mobile, for appellants.
Mylan R. Engel and Karen H. Carr of Engel, Walsh and Zoghby, Mobile, for appellees.
SHORES, Justice.
The plaintiffs, Albert and Edna Turner, filed this action against the defendants, Robert S. and Rita F. Green, on November 16, 1988, claiming money due on account and money due for the sale of land. The defendants raised the affirmative defense of res judicata, alleging that these claims were, or could have been, litigated and determined in a previous action. The defendants filed a motion to dismiss under Rule 12(b)(6), A.R.Civ.P., and an answer containing the affirmative defense of res judicata.
The trial judge, Robert E. Lee Key, held a hearing to determine whether the plaintiffs' claims were barred by the doctrine of res judicata. He treated the defendants' motion as a Rule 56 motion for summary judgment (see Rule 12(b)(6)) and he entered a summary judgment on March 12, 1990, in favor of the defendants. The court later entered an amended order. That amended order read as follows:
"THIS matter coming on for hearing before the Court on the defendants' affirmative defense of res judicata filed herein, which defense alleges that the plaintiffs are estopped from asserting their claims in this action inasmuch as said claims were, or could have been, litigated and determined in the previous action styled Albert Turner and Edna Turner v. Robert S. Green and Rita F. Green, Case No. CV-87-003610, which was tried by the Circuit Court of Mobile County, Alabama, on the 5th day of July, 1988 (Case 1); and the said affirmative defense of res judicata, being treated as a motion for summary judgment under Rule 12(b)(6) and Rule 56, A.R.C.P., and being a question of law, and having been submitted to the Court on the pleadings, briefs and oral argument of counsel, together with a Stipulation of Facts, including the reporter's transcript of the evidence taken in the former trial (Case 1); and the court, having heard and considered the same, finds that the plaintiffs filed the instant action against the defendants on the 16th day of November, 1988 (Case 2); that the case before the Court consists of two counts, Count One claiming money due on account from or about December 20, 1986, and Count Two being for money due from the defendants to the plaintiffs for the sale of land on or about the 1st day of December, 1986; and
"The Court further finds that on, to-wit, the 17th day of November, 1987, plaintiffs filed suit against these same defendants in Case 1, seeking to reform the description in the warranty deed dated December 18, 1986 (Real Property Book 4028, page 474, of the Probate Court Records of Mobile County, Alabama), wherein a judgment in favor of these same defendants was entered, and the matters complained about in the Complaint in Case 2 dealing with the consideration paid for the lands sold by the plaintiffs to the Greens in December, 1986, having already been adjudicated or, if not adjudicated, should have been included in and claimed in said former suit. Accordingly, the Court is of the opinion:
"1. That the prior judgment in Case 1 was rendered by a court of competent jurisdiction;
"2. That the prior judgment was rendered on the merits;
"3. That the parties to both suits are identical;

*1106 "4. That plaintiffs set up all of their rights in the prior action upon which their cause of action could have been maintained;
"5. That the prior suit (Case 1) was an action to reform the description in the deed given by the plaintiffs to the defendants in December, 1986, and said action also pled real property deeded by the plaintiffs to the defendants in September, 1986;
"6. That the second action (Case 2) sues for money allegedly due from the defendants on account and from the sale of lands sold by the plaintiffs to the defendants in December, 1986.
"The Court is of the opinion that the plaintiffs could have easily asserted the alter ego claim in Case 1 against these same defendants under Rule 18(a), A.R. C.P. All that was required was an amendment to their Complaint to such effect, claiming the balance of the purchase price for the property conveyed by plaintiffs to defendants on December 18, 1986.
"It is the further opinion of this Court that the question of consideration was, or could have been litigated in the prior action and that the judgment entered in the prior action is a bar to the present action. The Court concludes that the affirmative defense of res judicata is well taken and that it bars recovery in the instant action.
"IT IS THEREFORE ORDERED, ADJUDGED AND DECREED by the Court that the judgment entered in the prior trial (Case 1) is res judicata and a bar to the present trial (Case 2).
"IT IS FURTHER ORDERED, ADJUDGED AND DECREED that judgment is rendered in favor of the defendants....
"DONE this the 16th day of April, 1990.
              "/s/ R.E.L. Key
              "Circuit Judge"
The plaintiffs appeal.
"Alabama law requires four elements for the application of res judicata. First, there must be a substantial identity between the parties in the prior and subsequent suits. Second, there must be the same cause of action in both suits. Third, the previous case must have been decided by a court of competent jurisdiction. Fourth, the previous adjudication must have reached the merits of the case. Missildine v. Avondale Mills, Inc., 415 So.2d 1040, 1041 (Ala.1981)."
Higgins v. Henderson, 551 So.2d 1050, 1052-53 (Ala.1989). "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)." Wood v. Tricon Metals & Services, Inc., 548 So.2d 138, 140 (Ala. 1989).
We have carefully reviewed the record in this case, including the pleadings, the stipulation of facts, and the briefs. Because all of the elements of res judicata, as set out above and as enumerated by the trial judge, are met in this case, the present claim is barred. Therefore, the judgment is due to be affirmed.
AFFIRMED.
HORNSBY, C.J., and JONES, HOUSTON and KENNEDY, JJ., concur.
