
495 So.2d 655 (1986)
John S. SULLIVAN, et al.
v.
WALTHER BUILDERS, INC., et al.
85-520.
Supreme Court of Alabama.
September 26, 1986.
*656 Gary A. Moore, Fairhope, for appellants.
James H. Reid, Jr. of Reid, Stein, Smith & Bass, Fairhope, for appellees.
PER CURIAM.
The plaintiff homeowners appeal from the trial court's granting of a motion for summary judgment for Walther Builders, Inc., and former officers of the corporation.
In 1979, Lawrence and Margaret Oldemoppen filed an action against Walther Builders, Inc., and its president, William Walther, claiming damages for breach of contract, alleging faulty construction of their house. The case was tried, and the jury returned a verdict for the Oldemoppens.
In 1980, Walther Builders filed an action against John and Helen Sullivan to enforce a materialman's lien, arising from the construction of the Sullivans' house. The Sullivans counterclaimed for damages resulting from faulty construction of the house and for assault and battery by William Walther against Mrs. Sullivan; Mr. Walther was brought in as a third-party defendant. The jury returned a verdict for Walther Builders on the construction claim and for Mrs. Sullivan on the assault and battery claim.
On January 28, 1982, the Sullivans, the Oldemoppens, and David and Gloria McWatters filed this action against Walther Builders; William Walther and his wife Carolyn Walther, who was the secretary-treasurer of the corporation; and several organizations associated with the promotion of homeowner warranties. The complaint alleged breach of contract, fraud, concealment, and conspiracy in the marketing of 10-year homeowner warranties.
On January 29, 1985, Walther Builders and Carolyn Walther filed a motion for summary judgment on the claims by the Sullivans and the Oldemoppens, stating that the present action was barred by the prior judgments on the faulty construction claims. Carolyn Walther supported the motion with an affidavit, which included lists of deficiencies drawn up by the Sullivans and the Oldemoppens and offered for use in the prior cases. On the lists, the couples had noted that the defendants had failed to provide the 10-year homeowner warranties allegedly promised to them. The Sullivans and the Oldemoppens filed opposing motions, along with affidavits stating that the issue of warranties was not part of the prior claims and was not litigated. The circuit court granted summary judgment for Walther Builders and William and Carolyn Walther. That judgment was made final pursuant to Rule 54(b), A.R.Civ.P. This appeal followed. We affirm.
The issue here is whether the prior judgments bar the present claims by the Oldemoppens and the Sullivans under the doctrines of either collateral estoppel or res judicata. The doctrine of collateral estoppel will preclude the litigation of an issue if (1) the issue is identical to one involved in a prior suit; (2) the issue was actually litigated in the previous suit; (3) the resolution of that issue was necessary to the prior judgment; and (4) the same parties are involved. Wheeler v. First Alabama Bank of Birmingham, 364 So.2d 1190 (Ala.1978).
Under the doctrine of res judicata, a prior judgment bars later actions on all questions falling within the scope of the *657 original action, including those which could have been litigated by exercising due diligence. Sims v. City of Birmingham, 254 Ala. 598, 49 So.2d 302 (1950). Res judicata will apply to a later action only if the following elements are present: (1) the prior judgment was rendered by a court of competent jurisdiction; (2) the prior judgment was rendered on the merits; (3) the parties to both suits are substantially identical; and (4) the same cause of action is present in both suits. Wheeler, supra. Whether the two suits are based on the same cause of action depends upon whether substantially the same evidence supports both actions. Geer Brothers, Inc. v. Crump, 349 So.2d 577 (Ala.1977).
In First State Bank of Altoona v. Bass, 418 So.2d 865, 866 (Ala.1982), the Court stated:
"The doctrine of res judicata rests upon the primary principle that matters once adjudicated are settled and determined. McGruder v. B & L Construction Co., Inc., 331 So.2d 257 (Ala.1976); Irwin v. Alabama Fuel & Iron Co., 215 Ala. 328, 110 So. 566 (1925)."
The Court quoted from Century 21 Preferred Properties, Inc. v. Alabama Real Estate Commission, 401 So.2d 764, 768 (Ala.1981):
"`This doctrine is based on the notion that "[a] party ... is not at liberty to split up his demand and prosecute it by piecemeal, or present only a portion of the grounds upon which special relief is sought, and leave the rest to be presented in a second suit, if the first fail. There would be no end to litigation if such a practice were permissible." Baltimore Steamship Company v. Vernon Phillips, 274 U.S. 316 [47 S.Ct. 600, 71 L.Ed. 1069] (1926).'"
Each of the claims made in the current litigation either was, or could have been, raised in the prior litigation between the same parties. Thus, the trial court correctly granted the defendants' motions for summary judgment. The law will not permit two separate lawsuits between the same parties to resolve disputes arising out of a single transaction.
AFFIRMED.
TORBERT, C.J., and JONES, SHORES, ADAMS and STEAGALL, JJ., concur.
