After Remand from the Alabama Supreme Court
BRYAN, Judge.The supreme court has reversed this court’s September 2, 2011, judgment and remanded the cause for further consideration of the petition for a writ of mandamus filed by Jennifer Ann Vest (Herron) (“the mother”) on April 14, 2011, in light of the supreme court’s decision. Ex parte Vest, 130 So.3d 572 (Ala.2012) (“the supreme court’s September 14 decision”).1
In our September 2, 2011, judgment, we did not address the issue whether the mother had waived her affirmative defense based on § 6-5-440, Ala.Code 1975, and had failed to revive it before the Elmore Circuit Court entered its April 13, 2011, order, which is the subject of the mother’s April 14, 2011, mandamus petition.
Section 6-5-440 provides:
“No plaintiff is entitled to prosecute two actions in the courts of this state at the same time for the same cause and against the same party. In such a case, the defendant may require the plaintiff to elect which he will prosecute, if commenced simultaneously, and the pen-dency of the former is a good defense to the latter if commenced at different times.”
(Emphasis added.) As noted by Justice Stuart in her special concurrence in the supreme court’s September 14 decision, § 6-5-440 “ ‘ “does not provide that the trial court ‘is deprived of jurisdiction over the second-filed action, or that the second-filed action ‘is void.’ ” ’ ” 130 So.3d at 574 (Stuart, J., concurring specially) (quoting Washington Mut. Bank, F.A. v. Campbell, 24 So.3d 435, 437 n. 2 (Ala.2009), quoting in turn First Tennessee Bank, N.A. v. Snell, 718 So.2d 20, 27 (Ala.1998) (See, J., concurring in the result)). Rather, § 6-5-440
“ ‘constitutes an affirmative defense, and if that defense is not raised by the defendant in a motion to dismiss, Benson v. City of Scottsboro, 286 Ala. 315, 317, 239 So.2d 747, 748-49 (1970) (stating that the defense must be raised by a “plea in abatement,” the procedural predecessor of the motion to dismiss), it is waived. Chappell v. Boykin, 41 Ala. App. 137, 141, 127 So.2d 636, 639 (1960).’ ”
Regions Bank v. Reed, 60 So.3d 868, 884 (Ala.2010) (quoting Veteto v. Yocum, 793 So.2d 814, 815 n. 1 (Ala.Civ.App.2001)). Like other affirmative defenses, however, if an affirmative defense based on § 6-5-440 is waived, it can be revived under certain circumstances. See Regions Bank, 60 So.3d at 884.
In the present case, on July 23, 2010, the mother filed in the Elmore Cir*577cuit Court a motion to dismiss or to transfer the postdivorce proceeding (“the father’s postdivorce proceeding”) filed by David Jeremy Vest (“the father”) in that court. See Ex parte Vest, 68 So.3d 881, 883 (Ala.Civ.App.2011). Although she asserted in that motion that the father’s postdivorce proceeding was due to be dismissed or transferred because a postdi-vorce proceeding she had commenced in the Mobile Circuit Court (“the mother’s postdivorce proceeding”) was already pending when the father commenced his postdivorce proceeding, she neither cited § 6-5-440 to the Elmore Circuit Court in support of that assertion nor asserted that the claim asserted by the father in his postdivorce proceeding constituted a compulsory counterclaim in the mother’s post-divorce proceeding and, therefore, that § 6-5-440 barred him from asserting that claim in his postdivorce proceeding.2 68 So.3d at 885.
After the Elmore Circuit Court denied the mother’s July 23, 2010, motion to dismiss or to transfer, the mother, on November 8, 2010, petitioned this court for a writ of mandamus directing the Elmore Circuit Court to vacate its order denying her July 23, 2010, motion to dismiss or to transfer. 68 So.3d at 882-84. The mother asserted as one of the grounds of her November 18, 2010, mandamus petition that the claim the father had asserted in his postdivorce proceeding constituted a compulsory counterclaim in the mother’s postdivorce proceeding and, therefore, that § 6-5-440 barred him from asserting that claim in his postdi-vorce proceeding. 68 So.3d at 884. However, we denied the mother’s November 18, 2010, mandamus petition insofar as it was based on that ground because the mother had neither cited § 6-5-440 to the Elmore Circuit Court nor asserted to that court that the claim asserted by the father in his postdivorce proceeding constituted a compulsory counterclaim in the mother’s postdivorce proceeding. 68 So.3d at 885.
After we denied the mother’s November 18, 2010, mandamus petition, the mother filed two motions in the father’s postdivorce proceeding; one of the motions was titled “Renewed Motion to Dismiss,” and the other was titled “Second Renewed Motion to Dismiss.” As one of the grounds of those motions, the mother asserted that the claim the father had asserted in his postdivorce proceeding constituted a compulsory counterclaim in the mother’s postdivorce proceeding and, therefore, that § 6-5-440 barred the father from asserting that claim in his post-divorce proceeding. The mother supported those motions with, among other things, matter that was outside the pleadings that had been filed in the father’s postdivorce proceeding (“the matter outside the pleadings”). On April 13, 2011, the Elmore Circuit Court entered an order stating: “Renewed dispositive motion (summary judgment, judgment on the pleadings, or other dispositive motion not pursuant to Rule 12(b)[, Ala. R. Civ. P.]) filed by [the mother] is hereby denied.”
On April 14, 2011, the mother petitioned this court for a writ of mandamus directing the Elmore Circuit Court to vacate its April 13, 2011, order. Because (1) the mother had supported her motions titled *578“Renewed Motion to Dismiss” and “Second Renewed Motion to Dismiss” with the matter outside the pleadings and (2) the El-more Circuit Court, in ruling on those motions, did not expressly decline to consider the matter outside the pleadings, those motions were automatically converted to motions for a summary judgment. See Phillips v. AmSouth Bank, 833 So.2d 29, 31 (Ala.2002). In Phillips, the supreme court stated:
“ ‘[W]here matters outside the pleadings are considered on a motion to dismiss, the motion is converted into a motion for summary judgment ... regardless of its denomination and treatment by the trial court.’ Boles v. Blackstock, 484 So.2d 1077, 1079 (Ala.1986). Indeed, unless the trial court expressly declines to consider the extraneous material, its conclusions may be construed to include the extraneous material. Cf. Ex parte Liberty Nat’l Life Ins. Co., 825 So.2d 758, 763 n. 1 (Ala.2002) (trial court’s express refusal to consider extraneous material constituted an exclusion).”
833 So.2d at 31.
When the mother filed those motions for a summary judgment, she had waived her affirmative defense based on § 6-5-440 by failing to assert it in the July 23, 2010, motion to dismiss or to transfer she had filed in the father’s postdivorce proceeding, see Regions Bank, supra, and an affirmative defense that has been waived cannot be revived by raising and litigating it in a summary-judgment proceeding, see Rector v. Better Houses, Inc., 820 So.2d 75, 79 (Ala.2001) (“[A]n affirmative defense the defendant has waived cannot be revived by the fact that it is raised and litigated in a summary-judgment proceeding.”). Moreover, the materials before us do not indicate that the mother had revived that affirmative defense in any other manner before asserting it as a ground of her motions for a summary judgment. Consequently, we conclude that the mother had waived her affirmative defense based on § 6-5-440 and had not revived it before the Elmore Circuit Court denied her motions for a summary judgment and, therefore, that the Elmore Circuit Court did not err in denying those motions insofar as they were based on § 6-5-440.
The mother also argues that she is entitled to a writ of mandamus compelling the Elmore Circuit Court to vacate its April 13, 2011, order denying her motions for a summary judgment because, she says, the proper venue for the claim asserted in the father’s postdivorce proceeding is the Mobile Circuit Court. Section 30-3-5, AIa.Code 1975, determines the proper venue for both the mother’s postdi-vorce proceeding and the father’s postdi-vorce proceeding. Section 30-3-5 provides:
“Notwithstanding any law to the contrary, venue of all proceedings for petitions or other actions seeking modification, interpretation, or enforcement of a final decree awarding custody of a child or children to a parent and/or granting visitation rights, and/or awarding child support, and/or awarding other expenses incident to the support of a minor child or children, and/or granting post-minority benefits for a child or children is changed so that venue will lie in: (1) the original circuit court rendering the final decree; or (2) in the circuit court of the county where both the custodial parent or, in the case of post-minority benefits, where the most recent custodial parent, that parent having custody at the time of the child’s attaining majority, and the child or children have resided for a period of at least three consecutive years immediately preceding the filing of the petition or other action. The *579current or most recent custodial parent shall be able to choose the particular venue as herein provided, regardless of which party files the petition or other action.”
(Emphasis added.)
The record establishes the following facts that are material to a determination of the proper venue for the claim asserted in the father’s postdivoree proceeding. The Elmore Circuit Court entered a judgment divorcing the mother and the father on March 20, 2002. The divorce judgment awarded the mother primary physical custody of the parties’ child and awarded the father visitation. The father filed a petition to modify the divorce judgment in the Elmore Circuit Court on September 7, 2005, and the mother filed an answer to the father’s petition and a petition for a rule nisi in the Elmore Circuit Court on September 8, 2005. On October 6, 2006, the mother and the father entered into an agreement modifying the divorce judgment and resolving the disputes that were the subject of the 2005 postdivoree proceeding. The mother remained the custodial parent of the parties’ child. Sometime between March 20, 2002, and October 6, 2006, the mother and the parties’ child moved to Mississippi. Sometime after October 6, 2006, the father moved to Mobile County. When the mother filed her postdivoree proceeding in the Mobile Circuit Court on June 10, 2010, she and the parties’ minor child had resided in Mississippi for the three-year period immediately preceding the filing of that proceeding, and the father was residing in Mobile County.
Because the mother and the parties’ child had not resided in a county in Alabama for a period of at least three consecutive years immediately preceding the filing of her postdivoree proceeding in the Mobile Circuit Court, § 30-8-5 dictated that the proper venue for the mother’s postdivoree proceeding was the Elmore Circuit Court, which was “the original circuit court rendering the final [divorce] decree.” The fact that the father, who was not the custodial parent, was residing in Mobile County when the mother filed her postdivoree proceeding was irrelevant to the determination of the proper venue of the mother’s postdivoree proceeding under § 30-3-5. The father subsequently filed his postdivoree proceeding in the Elmore Circuit Court, which was the proper venue for that proceeding under § 30-3-5. Therefore, the Elmore Circuit Court did not err in denying the mother’s motions for a summary judgment insofar as they were based on her contention that the Mobile Circuit Court was the proper venue for the claim asserted in the father’s post-divorce proceeding.
The mother also argues that the father waived his objection to improper venue in the mother’s postdivoree proceeding by omitting such an objection from the first pleading he filed in the mother’s post-divorce proceeding. However, the issue whether the father waived his objection to the Mobile Circuit Court as the venue for litigating the mother’s postdivoree proceeding is irrelevant to the issue whether she is entitled to a writ of mandamus directing the Elmore Circuit Court to vacate its April 13, 2011, order denying the mother’s summary-judgment motions because, due to the mother’s waiver of her affirmative defense based on § 6-5-440, the father is entitled to prosecute his post-divorce proceeding in the Elmore Circuit Court separately from, and independently of, the mother’s postdivoree proceeding unless she should revive and assert her affirmative defense based on § 6-5-440 in the future. See Washington Mutual Bank, 24 So.3d at 437 n. 2 (holding that § 6-5-440 does not deprive the trial court of jurisdiction over the second-filed action *580or render the second-filed action void); and Regions Bank, 60 So.3d at 884 (holding that § 6-5-440 is an affirmative defense that can be waived). Thus, any alleged waiver of the father’s objection to the Mobile Circuit Court as the venue for litigating the mother’s postdivorce proceeding would have no effect on the father’s separate and independent postdi-vorce proceeding in the Elmore Circuit Court. Id. Moreover, if the mother should revive and assert her affirmative defense based on § 6-5-440 in the future, the issue whether the father had waived his objection to the Mobile Circuit Court as the venue for litigating the mother’s postdi-vorce proceeding would still be irrelevant to the Elmore Circuit Court’s determination regarding whether § 6-5^140 barred the father from prosecuting his postdi-vorce proceeding in the Elmore Circuit Court because, as noted by Justice Mur-dock in his special concurrence in the supreme court’s September 14 decision, “[sjection 6-5-440 does not require some inquiry into whether an otherwise valid objection to the venue of an earlier filed action has or has not been waived in that earlier action.” Ex parte Vest, 130 So.3d at 574 (Murdock, J., concurring specially).
Although the mother presents additional arguments in support of her April 14, 2011, mandamus petition, we cannot consider them because she did not present them to the Elmore Circuit Court. See Ex parte M &F Bank, 58 So.3d 111, 117 (Ala.2010) (“Because it does not appear that the circuit court was presented with an argument concerning Rule 502(b)(3), [Ala. R. Evid.,] we will not consider that argument as a reason for issuing the writ of mandamus.”).
Because the mother has failed to establish that she has a clear legal right to the writ of mandamus she seeks, we deny the mother’s petition. See Ex parte Children’s Hosp. of Alabama, 931 So.2d 1, 5-6 (Ala.2005) (“The writ of mandamus is an extraordinary remedy; it will not be issued unless the petitioner shows ‘ “ ‘(1) a clear legal right in the petitioner to the order sought(quoting Ex parte Inverness Constr. Co., 775 So.2d 153, 156 (Ala.2000), quoting in turn other cases)).
PETITION DENIED.
PITTMAN, THOMAS, and MOORE, JJ., concur. THOMPSON, P.J., concurs in the result, without writing.. For a detailed recitation of the procedural history of this cause before the mother filed the mandamus petition that is now before us, see Ex parte Vest, 68 So.3d 881 (Ala.Civ.App.2011), and Ex parte Vest, 130 So.3d 566 (Ala.Civ.App.2011).
. The supreme court has held that Rule 13(a), Ala. R. Civ. P., which governs compulsory counterclaims, when read in conjunction with § 6-5-440, makes the defendant with a compulsory counterclaim in the first-filed action a plaintiff in that action for purposes of § 6-5-440. See Ex parte Breman Lake View Resort, L.P., 729 So.2d 849, 851 (Ala.1999). "Thus, the defendant subject to the [compulsory] counterclaim rule who commences another action has violated the prohibition in § 6-5-440 against maintaining two actions for the same cause.” Id.