
793 So.2d 811 (2001)
AMERICAN TRUST CORPORATION
v.
Mack CHAMPION, Billy Cox, et al.
2990940.
Court of Civil Appeals of Alabama.
March 2, 2001.
*812 Robert T. Wilson, Jr., and Patricia Frederick of Wilson & Wilson, P.C., Jasper, for appellant.
Alex L. Holtsford, Jr., and Rick A. Howard of Nix, Holtsford, Gilliland, Lyons & Higgins, P.C., Montgomery, for appellee.
CRAWLEY, Judge.
In September 1998, American Trust Communication Corporation ("ATCC") sued Mack Champion, Billy Cox, and several fictitiously named defendants, alleging trespass to realty and damage to personalty. ATCC operates a radio station in Prattville. Champion and Cox are employees of the City of Prattville who, ATCC alleged, negligently damaged its radio transmission equipment while they were digging a sewer trench. In April 1999, the circuit court dismissed the complaint, pursuant to Rule 41(b), Ala.R.Civ. P., for lack of prosecution.
In August 1999, American Trust Corporation ("ATC") sued Champion and Cox and several fictitiously named defendants; its complaint was virtually identical to the complaint ATCC had filed the year before. Champion and Cox moved to dismiss, arguing (1) that, by the doctrine of res judicata, the prior judgment in their favor barred the second action and (2) that the lawsuit was an attempt "to bypass time frames for claims against a municipality by suing only individual employees of the City of Prattville."
In support of their motion to dismiss on the ground of res judicata, Champion and Cox attached a copy of the complaint and the case action summary sheet in the earlier case, Civil Action No. CV-98-223.R. The attachments show that in September 1998, ATCC had sued Champion and Cox and that in April 1999 the Autauga Circuit Court had dismissed the complaint for lack of prosecution. In support of their motion to dismiss on the second groundthat the *813 action against the individual City employees was in reality a claim against the City and was thus an attempt to bypass the six-month limitation period for filing claims against a municipality, see § 11-47-23, Ala.Code 1975Champion and Cox submitted nothing. The trial court granted the motion to dismiss, without stating a reason. ATC appealed to the Alabama Supreme Court, which transferred the case to this court, pursuant to § 12-2-7(6), Ala.Code 1975.
When a trial court considers matters outside the pleadings in ruling on a defendant's motion to dismiss filed pursuant to Rule 12(b)(6), Ala.R.Civ.P., the motion is converted into a motion for a summary judgment. Rule 12(b) (last sentence); Sims v. Lewis, 374 So.2d 298 (Ala.1979). Because, on the issue of res judicata, the trial court considered matters outside the pleadings, we conclude that the motion to dismiss on that ground should be treated as one for a summary judgment, and that we should review the res judicata issue by the summary-judgment standard. We review a summary judgment de novo. A motion for a summary judgment is to be granted when no genuine issue of material fact exists and the moving party is entitled to a judgment as a matter of law. Rule 56(c)(3), Ala.R.Civ.P. A party moving for a summary judgment must make a prima facie showing "that there is no genuine issue as to any material fact and that [it] is entitled to a judgment as a matter of law." Rule 56(c); see Lee v. City of Gadsden, 592 So.2d 1036, 1038 (Ala.1992). If the movant meets this burden, "the burden then shifts to the nonmovant to rebut the movant's prima facie showing by `substantial evidence.' "Lee, 592 So.2d at 1038. "Substantial evidence is evidence of such weight and quality that fair-minded persons in the exercise of impartial judgment can reasonably infer the existence of the fact sought to be proved." West v. Founders Life Assurance Co. of Florida, 547 So.2d 870, 871 (Ala.1989); see Ala.Code 1975, § 12-21-12(d).
The doctrine of res judicata is an affirmative defense; the party asserting that defense has the burden of proving it at trial. Wilger v. State Dep't of Pensions & Security, 390 So.2d 656 (Ala.Civ.App. 1980).
"`If the movant [for a summary judgment] has the burden of proof at trial, the movant must support his motion with credible evidence, using any of the materials specified in Rule 56(c), [Ala.] R.Civ.P. ("pleadings, depositions, answers to interrogatories, and admissions on file, together with the affidavits"). The movant's proof must be such that he would be entitled to a directed verdict if this evidence was not controverted at trial.'"
Ex parte General Motors Corp., 769 So.2d 903, 908 (Ala.1999) (quoting Berner v. Caldwell, 543 So.2d 686, 691 (Ala.1989) (Houston, J., concurring specially)).
In order to be entitled to a summary judgment, Champion and Cox were required to make a prima facie showing that the res judicata defense entitled them to a judgment as a matter of law, i.e., that there was no genuine issue of material fact as to whether that defense applied. To do that, they had to establish the following elements of the affirmative defense of res judicata:
"(1) a prior judgment on the merits, (2) rendered by a court of competent jurisdiction, (3) with substantial identity of the parties, and (4) with the same cause of action presented in both actions. Smith v. Union Bank & Trust Co., 653 So.2d 933 (Ala.1995); Dairyland Ins. Co. v. Jackson, 566 So.2d 723 (Ala. 1990)."
*814 Parmater v. Amcord, Inc., 699 So.2d 1238, 1240-41 (Ala.1997).
Although ATC responded to that portion of the motion to dismiss that relied on the res judicata defense, submitting affidavits and other evidentiary materials in opposition, we need not discuss the sufficiency of its response, because we conclude that Champion and Cox did not meet their burden of making a prima facie showing that they were entitled to a judgment as a matter of law. The materials submitted by Champion and Cox show that the Autauga Circuit Court had entered a prior judgment in their favor against ATCC. The complaint in the instant case, however, was filed by ATC. Thus, the materials Champion and Cox submitted in support of their motion did not establish the third element of res judicata defense: that ATCC and ATC had a "substantial identity."
ATC submitted nothing in response to the second ground for the motion to dismiss.
"The appropriate standard of review under Rule 12(b)(6) is whether, when the allegations of the complaint are viewed most strongly in the pleader's favor, it appears that the pleader could prove any set of circumstances that would entitle her to relief. In making this determination, this Court does not consider whether the plaintiff will ultimately prevail, but only whether she may possibly prevail.... [A] Rule 12(b)(6) dismissal is proper only when it appears beyond doubt that the plaintiff can prove no set of facts in support of the claim that would entitle the plaintiff to relief."
Nance v. Matthews, 622 So.2d 297, 299 (Ala.1993) (citations omitted). We conclude that the court could not properly have dismissed the action on the basis of the second ground stated in the motion to dismiss. Section 11-47-23 applies to claims against a municipality, but not to tort claims against individuals. See Harris v. City of Montgomery, 435 So.2d 1207 (Ala.1983). We cannot conclude that ATC could prove no set of facts in support of its claim that the individuals it sued were liable.
The judgment of the circuit court is reversed, and the cause is remanded for further proceedings.
REVERSED AND REMANDED.
YATES, P.J., and THOMPSON and PITTMAN, JJ., concur.
MURDOCK, J., concurs in the result.
