
84 So.3d 106 (2011)
Robert MCDANIEL and Shirley McDaniel
v.
HARLEYSVILLE MUTUAL INSURANCE COMPANY.
2100622.
Court of Civil Appeals of Alabama.
October 28, 2011.
*107 H. Arthur Edge III and Joseph H. McClure III of H. Arthur Edge, P.C., Birmingham, for appellants.
James M. Smith of Stockham, Carroll & Smith, P.C., Birmingham, for appellee.

On Application for Rehearing
THOMPSON, Presiding Judge.
The opinion of August 12, 2011, is withdrawn, and the following is substituted therefor.
Robert McDaniel and Shirley McDaniel ("the McDaniels") appeal from a judgment entered by the Madison Circuit Court in favor of Harleysville Mutual Insurance Company ("Harleysville"). For the reasons stated herein, we reverse that judgment and remand the cause for further proceedings.
On August 31, 2010, the McDaniels filed an action against Harleysville and Brian Homes, Inc. ("Brian Homes"). They alleged that they had entered into a contract with Brian Homes for the construction of a *108 house and that, in 2002, they and others had filed an action against Brian Homes asserting, among other things, negligence, breach of warranty, breach of contract, and fraud ("the 2002 action"). The McDaniels asserted that, at the time of the events giving rise to their claims in the 2002 action, Brian Homes was covered by a commercial-general-liability insurance policy that had been issued by Harleysville and that Harleysville had provided a defense for Brian Homes in the 2002 action. They asserted that, on November 20, 2008, a judgment had been entered in their favor in the amount of $82,000 against Brian Homes, after which Harleysville disclaimed liability. The McDaniels stated that neither Brian Homes nor Harleysville had satisfied the judgment, and they asserted a claim pursuant to § 27-23-2, Ala. Code 1975, which provides:
"Upon the recovery of a final judgment against any person, firm, or corporation by any person, including administrators or executors, for loss or damage on account of bodily injury, or death or for loss or damage to property, if the defendant in such action was insured against the loss or damage at the time when the right of action arose, the judgment creditor shall be entitled to have the insurance money provided for in the contract of insurance between the insurer and the defendant applied to the satisfaction of the judgment, and if the judgment is not satisfied within 30 days after the date when it is entered, the judgment creditor may proceed against the defendant and the insurer to reach and apply the insurance money to the satisfaction of the judgment."
On October 29, 2010, Harleysville filed a motion to dismiss pursuant to Rule 12(b), Ala. R. Civ. P. In its motion, Harleysville stated that, in late 2008, it had filed a declaratory-judgment action ("the federal-court action") against Brian Homes in the United States District Court for the Northern District of Alabama, less than a month before the entry of the jury verdict in favor of the McDaniels in the 2002 action. Harleysville stated that, in the federal-court action, it had obtained a default judgment against Brian Homes declaring that there was no insurance coverage available for the claims that had been made against Brian Homes in the 2002 action and that Harleysville did not owe a duty to indemnify Brian Homes for the judgment that had been entered in favor of the McDaniels in the 2002 action. Harleysville argued that, because there had been a judicial determination that it had no duty to indemnify Brian Homes, any liability it could have had to the McDaniels had been extinguished. In effect, Harleysville was asserting the affirmative defense of collateral estoppel, which is defined as "`[a]n affirmative defense barring a party from relitigating an issue determined against that party in an earlier action, even if the second action differs significantly from the first one.'" Bowers v. Wal-Mart Stores, Inc., 827 So.2d 63, 67 n. 2 (Ala.2001) (quoting Black's Law Dictionary 256 (7th ed.1999)). Harleysville attached to its motion a copy of the complaint it had filed in the federal-court action, a copy of its amendment to that complaint, a copy of the federal court's findings and conclusions on Harleysville's motion for a default judgment, and a copy of the federal court's default judgment.
On November 16, 2010, the McDaniels filed a response to the motion to dismiss. They pointed out that, in the default judgment in the federal-court action, the trial judge had included a footnote that read, "Of course, this court's declaration does not prejudice the rights of Robert and Shirley McDaniel, or any other parties who have an interest that would be affected *109 by this declaration, as they are not parties to this proceeding. See Ala.Code § 6-6-221 (1975)." Thus, the McDaniels argued, the declaratory judgment issued by the federal court was not binding on them and Harleysville's motion was due to be denied. Harleysville responded that, under § 27-23-2, the McDaniels were deemed to step into the shoes of Brian Homes in attempting to collect their judgment and that, as a result, the federal court's determination that Brian Homes had no insurance coverage for the claims that had been brought against Brian Homes foreclosed the McDaniels' claim against Harleysville.
On December 20, 2010, the trial court entered the following judgment:
"This Court is in receipt of the Motion to Dismiss filed on behalf of [Harleysville], requesting that this case be dismissed with prejudice pursuant to Rule 12 of the Alabama Rules of Civil Procedure. Further, this Court conducted a hearing on said Motion on December 17, 2010. Counsel for Harleysville was present but counsel for [the McDaniels] did not appear. After due consideration, Harleysville's Motion to Dismiss is hereby GRANTED and this case is dismissed with prejudice, costs taxed as paid."
The McDaniels filed a motion to alter, amend, or vacate the judgment, which, on February 14, 2011, the trial court denied as to Harleysville but granted as to Brian Homes. The trial court reinstated the McDaniels' action as to Brian Homes and directed the McDaniels to apply for a default judgment against Brian Homes no later than March 15, 2011.
On March 15, 2011, the McDaniels applied for an entry of default against Brian Homes. On March 21, 2011, the circuit clerk noted the entry of default against Brian Homes on the face of the McDaniels' application. On March 23, 2011, the McDaniels filed a notice of appeal to our supreme court naming only Harleysville as the appellee. That court transferred the appeal to this court pursuant to § 12-2-7(6), Ala.Code 1975.
Although the trial court was divested of jurisdiction as of the date the McDaniels filed their appeal, see Johnson v. Halagan, 29 So.3d 915, 917 (Ala.Civ.App.2009), the trial court purported to enter an order on March 25, 2011, in which it stated that, after a further review of the pleadings, it appeared that a judgment already had been entered in favor of the McDaniels against Brian Homes in the 2002 action; the trial court concluded that, as a result of that judgment, it was "without jurisdiction to award any further sums of money" against Brian Homes. Thus, the trial court purported to dismiss the McDaniels' claim against Brian Homes in the present action.
On May 3, 2011, this court entered an order reinvesting the trial court with jurisdiction for a period of 14 days "to enter, if appropriate, either a [Rule] 54(b)[, Ala. R. Civ. P.,] order as to the February 14, 2011, order or adjudicate all pending claims." On May 17, 2011, the trial court entered what it titled an "order and final judgment" in which it wrote, in pertinent part:
"[I]t is hereby ORDERED, ADJUDGED and DECREED that all claims against ... Harleysville are dismissed with prejudice as previously ordered, and all claims against [Brian Homes] have been addressed by this Court in its order dated March 25, 2011. Thus, all pending claims have been adjudicated and this judgment is made final pursuant to Rule 54(b) of the Alabama Rules of Civil Procedure."
We construe that order as adopting and entering the purported order of March 25, *110 2011, thus disposing of the remaining claim against Brian Homes.
On appeal, the parties dispute the nature of Harleysville's motion to dismiss. The McDaniels argue that the motion had been converted to one seeking a summary judgment because Harleysville attached materials to its motion that were outside the pleadings. Harleysville responds that the attachment of pleadings from a prior pending action to a motion to dismiss does not convert the motion into one seeking a summary judgment. We conclude that Harleysville's motion to dismiss was, in substance, a summary-judgment motion.
As noted above, the basis of Harleysville's motion was the assertion of the affirmative defense of collateral estoppel as a bar to the relitigation of its potential liability under the policy of insurance it had issued to Brian Homes. In Lloyd Noland Foundation, Inc. v. HealthSouth Corp., 979 So.2d 784 (Ala.2007), our supreme court considered whether a motion to dismiss that asserted collateral estoppel and res judicata was in fact a motion for a summary judgment. Determining that it was a motion for a summary judgment, the court wrote:
"The trial court based its final order on the affirmative defenses of res judicata and collateral estoppel. Rule 8(c), Ala. R. Civ. P., provides that affirmative defenses shall be set forth in a responsive pleading. `Res judicata' and `estoppel' are two of the affirmative defenses listed in Rule 8(c). An affirmative defense is `[a] defendant's assertion of facts and arguments that, if true, will defeat the plaintiff's or prosecution's claim, even if all the allegations in the complaint are true.' Black's Law Dictionary 451 (8th ed.2004). The party asserting the affirmative defense bears the burden of proving it. Stewart v. Brinley, 902 So.2d 1 (Ala.2004).
"Generally, an affirmative defense is pleaded in a responsive pleading, such as an answer to a complaint. The reason affirmative defenses must be pleaded in a responsive pleading is to give the opposing party notice of the defense and a chance to develop evidence and offer arguments to controvert the defense. Blonder-Tongue Labs., Inc. v. University of Illinois, 402 U.S. 313, 350, 91 S.Ct. 1434, 28 L.Ed.2d 788 (1971). `Since the facts necessary to establish an affirmative defense generally must be shown by matters outside the complaint, the defense technically cannot be adjudicated on a motion under Rule 12[, Fed.R.Civ. P.].' 5 Charles Alan Wright and Arthur C. Miller, Federal Practice and Procedure § 1277 (3d ed.2004). However, a party can obtain a dismissal under Rule 12(b)(6), Ala. R. Civ. P., on the basis of an affirmative defense when "`the affirmative defense appears clearly on the face of the pleading.'" Jones v. Alfa Mut. Ins. Co., 875 So.2d 1189, 1193 (Ala. 2003) (quoting Braggs v. Jim Skinner Ford, Inc., 396 So.2d 1055, 1058 (Ala. 1981)). In Jones v. Alfa, supra, the face of the plaintiffs' complaint did not indicate that the statutory limitations period applicable to their bad-faith refusal-to-pay-insurance-benefits claim had expired before they sued; therefore, the insurer was not entitled to a dismissal pursuant to Rule 12(b)(6), Ala. R. Civ. P., on the affirmative defense of the statute of limitations.
"....
"In the present case, the Foundation's complaint does not mention the federal litigation. In response to the Foundation's complaint, HealthSouth, in compliance with Rule 8(c), Ala. R. Civ. P., pleaded res judicata and collateral estoppel in its amended answer. Health-South filed a `motion to dismiss,' and, in *111 a supplemental brief in support of its motion to dismiss, it addressed the doctrines res judicata and collateral estoppel. Additionally, HealthSouth attached filings from the federal court proceeding. Although HealthSouth's motion addressing its defenses of res judicata and collateral estoppel was actually framed as a `motion to dismiss,' the motion should have been treated as one seeking a summary judgment because the face of the complaint did not reference the prior litigation and HealthSouth properly pleaded res judicata and collateral estoppel in its answer. The substance of a motion, not what a party calls it, determines the nature of the motion. Ex parte Lewter, 726 So.2d 603 (Ala.1998)."
979 So.2d at 791-92 (footnote omitted).
In the present case, the McDaniels' complaint does not reference the federal-court action. Thus, to decide Harleysville's motion, the trial court was required to consider matters outside of the pleadings, namely the assertions contained in Harleysville's motion as well as the documents attached to that motion. As a result, Harleysville's motion, although titled a motion to dismiss, was, in substance, a motion for a summary judgment, and, accordingly, we will review the judgment pursuant to the standard by which we review a summary judgment.
The standard by which this court reviews a summary judgment is well settled:
"`"To grant ... a [summary-judgment] motion, the trial court must determine that the evidence does not create a genuine issue of material fact and that the movant is entitled to a judgment as a matter of law. Rule 56(c)(3), Ala. R. Civ. P. When the movant makes a prima facie showing that those two conditions are satisfied, the burden shifts to the nonmovant to present `substantial evidence' creating a genuine issue of material fact. Bass v. SouthTrust Bank of Baldwin County, 538 So.2d 794, 797-98 (Ala.1989); § 12-21-12(d)[,] Ala.Code 1975. Evidence is `substantial' if it is 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 Assur. Co. of Florida, 547 So.2d 870, 871 (Ala.1989).
"`"In our review of a summary judgment, we apply the same standard as the trial court. Ex parte Lumpkin, 702 So.2d 462, 465 (Ala. 1997). Our review is subject to the caveat that we must review the record in a light most favorable to the nonmovant and must resolve all reasonable doubts against the movant. Hanners v. Balfour Guthrie, Inc., 564 So.2d 412 (Ala.1990)."'
"Payton v. Monsanto Co., 801 So.2d 829, 832-33 (Ala.2001) (quoting Ex parte Alfa Mut. Gen. Ins. Co., 742 So.2d 182, 184 (Ala. 1999))."
Maciasz v. Fireman's Fund Ins. Co., 988 So.2d 991, 994-95 (Ala.2008).
The McDaniels contend that the trial court erred in entering a judgment for Harleysville. Specifically, they argue that they could not be bound by the default judgment entered in the federal-court action because they were not parties to that action. We agree.
For a prior judgment as to an issue to have a preclusive effect on a party's later relitigation of that issue, it must be shown that the person against whom the preclusive effect is sought, or a person in privity with that person, was a party to the prior litigation in which the issue was decided and that the issue for which preclusion is sought was actually litigated in *112 the prior action. See Dairyland Ins. Co. v. Jackson, 566 So.2d 723, 726 (Ala.1990) (listing the elements of collateral estoppel). In the present case, neither the McDaniels nor someone with whom they were in privity were parties to the federal-court action in which the default declaratory judgment was entered. See Jim Parker Bldg. Co. v. G & S Glass & Supply Co., 69 So.3d 124, 132 (Ala.2011) ("`"Privity" is a flexible legal term, comprising several different types of relationships and generally applying when a person, although not a party, has his interests adequately represented by someone with the same interests who is a party.'" (quoting EEOC v. Pemco Aeroplex, Inc., 383 F.3d 1280, 1286 (11th Cir. 2004))). Moreover, an issue has not been actually litigated in a prior action if that action was resolved by a default judgment. See AAA Equip. & Rental, Inc. v. Bailey, 384 So.2d 107, 112 (Ala.1980) (discussing the doctrine of collateral estoppel and distinguishing another case that had held that collateral estoppel was applicable because, with regard to the other case, "[i]n the first suit that issue was actually litigated, that is, the judgment rendered in it was not based upon default, stipulation, or consent. Cf. Matter of McMillan, 579 F.2d 289 (3rd Cir.1978) (issues involved in an action terminated by default judgment not `actually litigated' for purpose of collateral estoppel)."); Martin v. Cash Express, Inc., 60 So.3d 236, 253 (Ala.2010) (Lyons, J., concurring in the result) ("If the previous judgment is by default ... then there can be no collateral estoppel or issue preclusion because nothing was `actually litigated' in the default judgment."). As a result, the default judgment entered in the federal-court action is not binding on the McDaniels, and they are free to litigate the issue of coverage determined by that judgment.
In so concluding, we join a substantial number of jurisdictions that have reached the same conclusion in circumstances that are the same or similar to those presented in this case. See, e.g., Harris v. Quinones, 507 F.2d 533, 537 (10th Cir.1974) (holding that trial court did not err in concluding that injured party was not bound by default judgment declaring that insurance was not in effect at time of accident issued in declaratory-judgment action brought by insurer against insured); Gallegos v. Nevada Gen. Ins. Co., 149 N.M. 364, 248 P.3d 912, 916-17 (N.M.Ct.App.2010) (concluding that judgment declaring that insurer was not required to indemnify insured in proceeding to which injured party was not made a party could not preclude injured party from litigating the insurer's liability); Coleman v. Mississippi Farm Bureau Ins. Co., 708 So.2d 6, 8-10 (Miss.1998) (same); Independent Fire Ins. Co. v. Paulekas, 633 So.2d 1111, 1113 (Fla.Dist.Ct.App.1994) ("Independent argues that the coverage question has previously been decided in its favor, relying on the doctrine of res judicata to support this position. We disagree, finding that the doctrine of res judicata does not apply under the facts of this case. A declaratory action obtained by an insurer against its insured is not binding on a third-party claimant who was not a party to the declaratory judgment action."); Glandon v. Searle, 68 Wash.2d 199, 202-03, 412 P.2d 116, 118-19 (1966) (holding that default judgment in favor of insurer against insured declaring that insurer was not liable under insurance policy did not bind injured parties in separate action against insured who had not been made parties to insurer's declaratory-judgment action); Southern Farm Bureau Cas. Ins. Co. v. Robinson, 236 Ark. 268, 270-72, 365 S.W.2d 454, 456-57 (1963) (holding that default judgment declaring that insurer was not liable under insurance policy could not estop injured party who was not party to declaratory-judgment action and who *113 had obtained judgment against insured from litigating the question of the insurance company's liability under the policy); and Churchman v. Ingram, 56 So.2d 297, 300-01 (La.Ct.App.1951) (holding that injured party was not bound by declaration in action between insurer and insured that insurance policy was void).[1] Because we conclude that Harleysville's motion was without merit and that the trial court's judgment is due to be reversed, we pretermit discussion of the other grounds for reversal the McDaniels assert on appeal.
Harleysville argues on appeal that the trial court's judgment can be affirmed because it was entered as a result of the McDaniels' failure to prosecute their action. We disagree. We recognize that it is within a trial court's discretion to dismiss an action pursuant to Rule 41(b), Ala. R. Civ. P., when a party has failed to prosecute its action under circumstances evidencing purposeful delay, willful default, or some other contumacious conduct on the part of that party. See Riddles-prigger v. Ervin, 519 So.2d 486, 487-88 (Ala.1987).[2] However, in the present case, the language of the trial court's December 20, 2010, order dismissing the McDaniels' action indicates that the order of dismissal was based on a consideration of the merits of Harleysville's motion. Although the order notes that counsel for the McDaniels did not appear for the hearing on the motion to dismiss, the order reflects that it was entered as a result of the trial court's "due consideration" of the pending motion, not because of a lack of diligence by the McDaniels in prosecuting their action. Further indicating that the trial court did not conclude that the action was due to be dismissed for failure to prosecute is the fact that the trial court set aside its December 20, 2010, order in part, despite a lack of argument in the McDaniels' postjudgment motion relative to any possible failure to prosecute their action. Indeed, the first time in this entire action that an issue has been raised as to a possible failure to prosecute on the part of the McDaniels is in Harleysville's appellate *114 brief; no such suggestion is contained in the record of the proceedings below.
Moreover, had the trial court dismissed the McDaniels' action on the basis that their counsel had failed to attend the hearing on Harleysville's motion to dismiss, such an action would have constituted reversible error. The McDaniels filed a response to Harleysville's motion to dismiss, and, as a result, the trial court was fully apprised of the McDaniels' position with respect to that motion. Furthermore, the record does not contain any evidence or, indeed, any suggestion of purposeful delay, willful default, or other contumacious conduct on the part of the McDaniels in their counsel's failure to attend the hearing. The trial court's discretion did not extend, under these circumstances, so far as to allow the trial court to dismiss the action for failure to prosecute. See Gill v. Cobern, 36 So.3d 31, 32-34 (Ala.2009).
Based on the foregoing, we conclude that the trial court erred to reversal when it dismissed the McDaniels' action as to Harleysville.[3] As a result, the trial court's judgment is due to be reversed and the cause remanded to the trial court for additional proceedings.
APPLICATION OVERRULED; OPINION OF AUGUST 12, 2011, WITHDRAWN; OPINION SUBSTITUTED; REVERSED AND REMANDED.
PITTMAN, BRYAN, THOMAS, and MOORE, JJ., concur.
NOTES
[1]  See also 17 Lee R. Russ and Thomas F. Segalla, Couch on Insurance § 239.68 (3d ed. 2005) ("When an insurer and insured oppose each other in a proceeding for a declaratory judgment concerning the validity of, or coverage under, a policy of liability insurance, there is not always the incentive on the part of the insured to vigorously contest the insurer's claims. Accordingly, when the insurer attempts to assert the judgment in that proceeding as preclusive of a later action by the injured party, or by an insurer of that party, there is considerable authority that the earlier judgment is not binding [o]n such new plaintiffs who were not party to the earlier declaratory judgment action." (footnotes omitted)); 20 John Alan Appleman, Insurance Law and Practice § 11371 (1980) ("Persons who have been injured in an automobile accident are certainly proper parties to a suit by the liability insurer to determine the coverage of its policy, and the better rule would seem to be that they are both proper and necessary parties to the maintenance of the suit. Hence, it would be error to dismiss such persons from the declaratory judgment suit. In fact, one case was reversed upon appeal where it refused the right to interested parties to attack a default judgment. However, if the court does not or cannot secure jurisdiction over them, their rights cannot be destroyed by their nonappearance; nor can such rights be determined where they are not made parties to the suit." (footnoted omitted)).
[2]  Rule 41(b) reads:

"For failure of the plaintiff to prosecute or to comply with these rules or any order of court, a defendant may move for dismissal of an action or of any claim against the defendant. Unless the court in its order for dismissal otherwise specifies, a dismissal under this subdivision and any dismissal not provided for in this rule, other than a dismissal for lack of jurisdiction, for improper venue, or for failure to join a party under Rule 19, operates as an adjudication upon the merits."
[3]  The McDaniels do not raise as an issue on appeal, and thus we do not address, whether the trial court erred in dismissing Brian Homes from the action.
