
74 So.3d 432 (2011)
Ex parte Beverly SCANNELLY.
(In re Beverly Scannelly v. Gary Toxey).
1100226.
Supreme Court of Alabama.
June 30, 2011.
*433 James H. White IV, and Stephen K. Pudner of Baker, Donelson, Bearman, Caldwell & Berkowitz, PC, Birmingham, for petitioner.
Jon B. Terry, of Bains & Terry, Bessemer, for respondent.
SHAW, Justice.
Beverly Scannelly petitions this Court for a writ of mandamus directing the Jefferson Circuit Court, Bessemer Division ("the Bessemer Division"), to vacate all orders entered after Scannelly filed a notice of dismissal pursuant to Rule 41(a), Ala. R. Civ. P., and for a writ of prohibition restraining that court from future attempts to exercise jurisdiction over Scannelly's case. For the reasons stated below, we deny the petition.

Facts and Procedural History
In June 2009, Scannelly initiated a civil suit against her brother, Gary Toxey, in the Birmingham Division of the Jefferson Circuit Court ("the Birmingham Division"), seeking to void certain real-estate transfers by their father to Toxey and alleging that those transfers were the result of undue influence by Toxey. Scannelly's complaint contained a legal description of each of the subject parcels.
Almost one year later, in May 2010, Toxey, in lieu of an answer, filed a motion pursuant to Rule 12(b), Ala. R. Civ. P., seeking to dismiss Scannelly's complaint based on, among others, grounds that the Birmingham Division lacked subject-matter jurisdiction based on the locations of the subject real estate and that the doctrine of res judicata precluded her action. In support of his claim that Scannelly's complaint was due to be dismissed pursuant to the doctrine of res judicata, Toxey's motion included three attachments consisting of orders relating to the subject real estate issued by the Jefferson Probate Court.
*434 After a hearing on Toxey's motion, the Birmingham Division transferred the case to the Bessemer Division on August 13, 2010, based on the conclusion that "the only real property located within the territorial jurisdiction of Jefferson County lies in the Bessemer Division...." See § 12-11-11, Ala.Code 1975 (providing for a transfer to another court in same county in actions where "it shall appear to the court that any case filed therein should have been brought in another court in the same county"). The transfer order clearly indicated that, in transferring the case to the Bessemer Division, the court "[did] not address [Toxey's] grounds to dismiss based on the affirmative defense of res judicata" because, it said, "[t]he matters necessary for the Court to review in considering [those] grounds lie outside of the parameters of [Scannelly's] complaint or any documents referenced therein." Therefore, the Birmingham Division noted, it left resolution of the issue of res judicata to the Bessemer Division.
Immediately following the transfer of her case to the Bessemer Division, on August 24, 2010, at 3:46 p.m., Scannelly filed, pursuant to Rule 41(a)(1), Ala. R. Civ. P., a "Notice of Dismissal of Claims" in which she purported to voluntarily dismiss all of her claims against Toxey without prejudice.[1] In her notice, Scannelly alleged that no responsive pleading, either in the form of an answer or a motion for a summary judgment, had yet been filed in the matter. In response to Scannelly's notice, and on that same date at 4:29 p.m., the Bessemer Division entered an order dismissing Scannelly's case without prejudice. Also on August 24, at 4:42 p.m., Toxey filed in the Bessemer Division a motion to dismiss or, in the alternative, for a summary judgment. In that motion, Toxey renewed his argument "that the doctrine of collateral estoppel, res judicata, issue recursion [sic], equitable estoppel and the Alabama Rules of Civil Procedure prohibit retrying issues that have been tried or that should have been tried and alleged prior hereto."
On August 26, 2010, Scannelly refiled her complaint in the Tuscaloosa Circuit Court, omitting her previous claims as to the real estate located in Jefferson County.[2] In response, on August 31, 2010, Toxey filed in the Bessemer Division a motion seeking to reinstate Scannelly's dismissed action to the Bessemer Division's active docket and alleging, in pertinent part:
"1. The Order granting the Motion to Dismiss was done within just a few hours of the Motion being filed.
"2. The Defendant had begun preparing, but had not yet filed a Motion to Dismiss and/or in the Alternative Motion for Summary Judgment.
"3. Contrary to [Scannelly's] [assertion] that no pleadings had been filed... attacking the jurisdiction of the Court to even hear these matters and asking the Court to dismiss this case[, such pleadings] had already been filed in the Birmingham Division.
"4. It is obvious that the Court would not have been aware of this filing that went directly to the merits of [Scannelly's] *435 ability [to bring] this case because of the doctrines of res judicata and collateral estoppel."
Thereafter, on October 19, 2010, the Bessemer Division granted Toxey's motion to reinstate Scannelly's action, set aside its August 24, 2010, order dismissing Scannelly's case, and both returned the matter to the court's active docket and scheduled a hearing. In support of that decision, the court specifically found "that the submission of [Toxey's] amounted to the filing of a Motion for Summary Judgment pursuant to Ala. R. Civ. P. 12(b)(6) thereby precluding summary unilateral dismissal by [Scannelly] pursuant to Ala. R. Civ. P. 41(a)." Scannelly then filed the present petition seeking the above-described writs of mandamus and prohibition. On January 4, 2011, this Court ordered answers and briefs.

Standard of Review
"`Mandamus is an extraordinary remedy and will be granted only where there is "(1) a clear legal right in the petitioner to the order sought; (2) an imperative duty upon the respondent to perform, accompanied by a refusal to do so; (3) the lack of another adequate remedy; and (4) properly invoked jurisdiction of the court."'
"Ex parte Ocwen Federal Bank, FSB, 872 So.2d 810, 813 (Ala.2003)(quoting Ex parte Alfab, Inc., 586 So.2d 889, 891 (Ala.1991)). Mandamus will lie to direct a trial court to vacate a void judgment or order. Ex parte Chamblee, 899 So.2d 244, 249 (Ala.2004).
"Like mandamus, prohibition is an extraordinary writ, `and will not issue unless there is no other adequate remedy.' Ex parte K.S.G., 645 So.2d 297, 299 (Ala. Civ.App.1992) (citing Ex parte Strickland, 401 So.2d 33 (Ala.1981)). `Prohibition is proper for the prevention of a usurpation or abuse of power where a court undertakes to act in a manner in which it does not properly have jurisdiction.' Ex parte K.S.G., 645 So.2d at 299. A writ of prohibition will issue `[o]nly if the pleadings show on their face that the lower court does not have jurisdiction.' Ex parte Perry County Bd. of Educ., 278 Ala. 646, 651, 180 So.2d 246, 250 (1965). `In such instances, the act of the usurping court is wholly void, and will not support an appeal.' Id."
Ex parte Sealy, L.L.C., 904 So.2d 1230, 1232-33 (Ala.2004).

Discussion
In her petition, Scannelly contends that she had "a clear legal right" to a Rule 41(a) dismissal because, she says, when she filed her notice of dismissal Toxey had not yet filed either an answer or a summary-judgment motion in response to her complaint. She further argues that once she filed her Rule 41(a)(1) notice of dismissal, that noticeand the dismissal became effective immediately (even without the Bessemer Division's subsequent dismissal order) and prevented the Bessemer Division's attempt to assert jurisdiction over her case. More specifically, Scannelly contends that, because in transferring her case to the Bessemer Division the Birmingham Division made clear in its order that it did not consider matters outside the pleadings, Toxey's Rule 12(b) motion was not converted to a motion for a summary judgment and therefore no answer or motion for a summary judgment had been filed before she filed her Rule 41(a)(1) notice of dismissal.
In support of her petition, Scannelly relies primarily on this Court's decision in Ex parte Sealy, supra. Among other issues, Sealy similarly involved a petitioner's contention that, because the defendant had filed neither an answer nor a motion seeking *436 a summary judgment before the petitioner filed its Rule 41(a)(1) notice of dismissal, any action taken by the trial court subsequent to the filing of the petitioner's notice of dismissal was void. This Court agreed with the petitioner's argument and granted the requested writs of mandamus and prohibition. In doing so, we stated the following regarding the application of Rule 41:
"Rule 41(a)(1) ..., Ala. R. Civ. P., provides, in pertinent part:
"`(a) Voluntary Dismissal: Effect Thereof.

"`(1) By Plaintiff; by Stipulation. Subject to the provisions of Rule 23(e), of Rule 66, and of any statute of this state, an action may be dismissed by the plaintiff without order of court (i) by filing a notice of dismissal at any time before service by the adverse party of an answer or of a motion for summary judgment, whichever first occurs.... Unless otherwise stated in the notice of dismissal or stipulation, the dismissal is without prejudice....
"`....'
"(Emphasis added.) `The committee comments to Rule 41 state that this rule is substantially the same as the federal rule, and we normally consider federal cases interpreting the federal rules of procedure as persuasive authority.' Hammond v. Brooks, 516 So.2d 614, 616 (Ala.1987).
"It is well settled that `[d]ismissal on motion under [subdivision (2) of Rule 41(a)] is within the sound discretion of the court.' Bevill v. Owen, 364 So.2d 1201, 1202 (Ala.1979); see also MetFuel, Inc. v. Louisiana Well Serv. Co., 628 So.2d 601 (Ala.1993). By contrast, review of a dismissal pursuant to subdivision (1) is de novo. See Marex Titanic, Inc. v. Wrecked & Abandoned Vessel, 2 F.3d 544, 545 (4th Cir. 1993); Matthews v. Gaither, 902 F.2d 877, 879 (11th Cir. 1990). This is so, because `Rule 41(a)(1) affords the plaintiff an unqualified right to dismiss' its action before the filing of an answer or a summary-judgment motion. Clement v. Merchants Nat'l Bank of Mobile, 493 So.2d 1350, 1353 (Ala. 1986) (emphasis added); see also Marex Titanic, Inc., 2 F.3d at 546. Conversely, Rule 41(a)(1) affords the trial court no discretion. See Williams v. Ezell, 531 F.2d 1261, 1264 (5th Cir.1976).
"The effect of a notice of dismissal pursuant to Rule 41(a)(1) was succinctly explained in Reid v. Tingle, 716 So.2d 1190, 1193 (Ala.Civ.App.1997). There, the Court of Civil Appeals said:
"`A voluntary dismissal under Ala. R. Civ. P. 41 terminates the action when the notice of the plaintiff's intent to dismiss is filed with the clerk. See... Hammond v. Brooks, 516 So.2d 614 (Ala.1987). The committee comments to Rule 41, Ala. R. Civ. P., note that the rule is "substantially the same as the corresponding federal rule." See Ala. R. Civ. P. 41, Committee Comments on 1973 Adoption. In interpreting F.R. Civ. P. 41(a)(1), the Fifth Circuit stated:
"`"Rule 41(a)(1) is the shortest and surest route to abort a complaint when it is applicable. So long as plaintiff has not been served with his adversary's answer or motion for summary judgment he need do no more than file a notice of dismissal with the Clerk. That document itself closes the file. There is nothing the defendant can do to fan the ashes of that action into life and the court has no role to play. This is a matter of right running to the plaintiff and may not be extinguished or circumscribed by adversary *437 or court. There is not even a perfunctory order of court closing the file. Its alpha and omega was the doing of the plaintiff alone."
"`American Cyanamid Co. v. McGhee, 317 F.2d 295, 297 (5th Cir.1963).'
"716 So.2d at 1193 (second emphasis added).
"Although cases involving a Rule 41(a)(1) dismissal `are not perfectly analogous to cases in which the ... court lacks subject matter jurisdiction, both contexts present the question of the court's continuing power over litigants who do not, or no longer, have a justiciable case before the court.' Chemiakin v. Yefimov, 932 F.2d 124, 128 (2d Cir. 1991). Thus, it is sometimes stated that a Rule 41(a)(1) dismissal deprives the trial court of `jurisdiction' over the `dismissed claims.' Duke Energy Trading & Mktg., L.L.C. v. Davis, 267 F.3d 1042, 1049 (9th Cir.2001); see Safeguard Business Sys., Inc. v. Hoeffel, 907 F.2d 861, 864 (8th Cir.1990); see also Gambale v. Deutsche Bank AG, 377 F.3d 133, 139 (2d Cir.2004); Netwig v. Georgia Pacific Corp., 375 F.3d 1009, 1011 (10th Cir.2004); Meinecke v. H & R Block of Houston, 66 F.3d 77, 82 (5th Cir.1995); Williams v. Ezell, 531 F.2d 1261, 1264 (5th Cir.1976) (`The court had no power or discretion to deny plaintiffs' right to dismiss or to attach any condition or burden to that right. That was the end of the case and the attempt to deny relief on the merits and dismiss with prejudice was void.').
"Similarly stated, `[t]he effect of a voluntary dismissal without prejudice is to render the proceedings a nullity and leave the parties as if the action had never been brought.' In re Piper Aircraft Distrib. Sys. Antitrust Litig., 551 F.2d 213, 219 (8th Cir.1977). Moreover, `"[i]t carries down with it previous proceedings and orders in the action, and all pleadings, both of plaintiff and defendant, and all issues, with respect to plaintiff's claim."' Id. (quoting 27 C.J.S. Dismissal and Nonsuit § 39 (1959))...."
904 So.2d at 1234-36. It is clear, as Scannelly argues, that in the absence of service of an answer or a motion for summary judgment by Toxey, she did, in fact, possess an unqualified right to dismiss her complaint without the need for intervention by the Bessemer Division.
Toxey does not dispute this principle. However, he counters that Scannelly lost the unqualified right to voluntarily dismiss her suit without prejudice because, he argues, the motion he filed in the Birmingham Division constituted a Rule 12(b), Ala. R. Civ. P., dismissal motion, which, he says, converted to a summary-judgment motion "when matters outside the pleadings were presented therewith." In support of this claim, Toxey points to Phillips v. AmSouth Bank, 833 So.2d 29 (Ala.2002), in which this Court held that, "unless the trial court expressly declines to consider the extraneous material [accompanying a motion to dismiss], its conclusions may be construed to include the extraneous material." 833 So.2d at 31 (citing 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 of that material)). Thus, the determinative question before this Court is whether Toxey's initial motion to dismiss in the Birmingham Division constituted a motion for a summary judgment.
We answer this question affirmatively, although not for the reasons argued by the parties. Because we conclude that, even in the absence of a conversion, Toxey's initial filing in the Birmingham Division *438 actually included, in part, a motion for a summary judgment, we hold that Scannelly has no clear legal right to the requested relief.
It is apparent that the portion of Toxey's motion relating to the affirmative defense of res judicata (paragraphs 6 and 7 of his "Motion to Dismiss"), which portion Toxey insists constitutes a Rule 12(b)(6) challenge, was, instead, a motion for a summary judgment. There is a notable distinction between a motion to dismiss filed pursuant to Rule 12(b)(6) and a motion for a summary judgment:
"The Rule 12(b)(6) motion ... must be distinguished from a motion for summary judgment under Rule 56, which goes to the merits of the claimindeed, to its very existenceand is designed to test whether there is a genuine issue of material fact. The Rule 12(b)(6) motion... only tests whether the claim has been adequately stated in the complaint. Thus, ... on a motion under Rule 12(b)(6), the [trial] court's inquiry essentially is limited to the content of the complaint; a motion for summary judgment, on the other hand, often involves the use of pleadings, depositions, answers to interrogatories, and affidavits."
5B Charles Alan Wright & Arthur C. Miller, Federal Practice and Procedure § 1356, at 372-75 (3d ed.2004) (footnote omitted). See also Lloyd Noland Found., Inc. v. HealthSouth Corp., 979 So.2d 784, 791 (Ala.2007) ("`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)."), and 1 Moore's Federal Rules Pamphlet § 12.4[5][b], p. 186 (2010) ("When the plaintiff's own factual allegations affirmatively demonstrate that the plaintiff cannot recover, dismissal under Rule 12(b)(6) is appropriate.... Similarly, a dismissal under Rule 12(b)(6) may be based on an affirmative defense when the defense is clear from the face of the pleadings." (emphasis added)).
Clearly, Toxey's res judicata argument raised issues that were not apparent from the face of Scannelly's complaint. This Court has previously indicated that because "a 12(b)(6) motion to dismiss only encompasses the determination of whether the pleading states a claim upon which relief can be granted.... [m]atters outside the pleadings should never be considered in deciding whether to grant a 12(b)(6) motion." Hales v. First Nat'l Bank of Mobile, 380 So.2d 797, 800 (Ala. 1980). See also 1 Moore's Federal Rules Pamphlet § 12.4[5][d], p. 186 (2010) ("Because the purpose of a Rule 12(b)(6) motion is to test the legal sufficiency of the pleader's claims for relief, the court generally may consider only the pleadings and incorporated exhibits in resolving the motion...."), and 1 Champ Lyons, Jr., & Ally W. Howell, Alabama Rules of Civil Procedure Annotated § 12.7, p. 304 (4th ed. 2004) ("[The defense of res judicata is] generally considered appropriately raised by a motion to dismiss only in a context where the defect appears on the face of the complaint.").
In HealthSouth Corp., supra, this Court examined a defendant's "motion to dismiss" based on the doctrines of res judicata and collateral estoppel. Like Scannelly's complaint in the present case, the plaintiff's complaint in HealthSouth Corp. contained no reference to other litigation. In concluding that, despite the label assigned the motion by the defendant, the motion actually constituted a motion for a summary judgment, this Court stated:

*439 "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)."
HealthSouth Corp., 979 So.2d at 792. Therefore, we conclude, as we did in HealthSouth Corp., that, in substance, Toxey's motion was "one seeking a summary judgment." Id.
In so holding, we do not imply that res judicata may never be properly raised in a Rule 12(b)(6) motion. See McClendon v. Hollis, 784 So.2d 1041, 1043 (Ala.Civ.App. 2000) ("A motion to dismiss based on the doctrine of res judicata is in the nature of a Rule 12(b)(6), Ala. R. Civ. P., motion to dismiss for failure to state a claim upon which relief can be granted." (citing Slepian v. Slepian, 355 So.2d 714, 716 n. 2 (Ala.Civ.App.1977), for the proposition "that a res-judicata defense may be properly asserted in a Rule 12 motion to dismiss for failure to state a claim upon which relief can be granted")). Indeed, we acknowledge that some affirmative defenses, including expiration of the applicable statute of limitations, may be readily apparent from the face of the complaint. See 1 Lyons & Howell, § 12.7, p. 303 ("The [Rule 12(b)(6)] motion is available when an affirmative defense which is a bar to relief appears on the face of the complaint.... The most obvious example lies in a complaint showing on its face that the statute of limitations has run." (citing McCullough v. Alabama By-Products Corp., 343 So.2d 508, 511 (Ala.1977) ("Where the plaintiff includes allegations that show on the face of the complaint that there is an insuperable bar to relief, dismissal is proper." (emphasis added)))). However, we merely reiterate, as our appellate courts have previously acknowledged, that, although, "[i]n some instances, res judicata may be properly raised by means of a motion to dismiss ... [it is] more commonly [raised] through a motion for a summary judgment." Wilger v. State Dep't of Pensions & Sec., 390 So.2d 656, 657 (Ala.Civ.App.1980).
Here, paragraph 6 of Toxey's motion to dismiss specifically acknowledges that Scannelly's complaint does not reveal that an affirmative defense, namely res judicata, bars Scannelly's claims. Further, a determination as to whether Toxey's res judicata allegations are true is determinable only by reference to documents outside the record. As we stated in Health-South Corp., supra, it is "the substance of a motion ... [that] determines the nature of the motion." 979 So.2d at 792. Here, paragraphs 6 and 7 of Toxey's motion seek a judgment based on the merits of an affirmative defense that is not apparent from the face of the pleadings, not a judgment based on the failure of the pleadings to state a claim. Thus, despite Toxey's assertions that his motion was a Rule 12(b)(6) motion to dismiss, a review of the substance of the motion shows that it was, in part, a motion seeking a summary judgment based on the affirmative defense of res judicata. Because at the time Scannelly filed her notice of dismissal pursuant to Rule 41(a)(1), Toxey had moved for a summary judgment, Scannelly was deprived of the unqualified right to voluntarily dismiss her complaint pursuant to Rule 41. In consideration of the foregoing, we conclude that Scannelly has failed to demonstrate a clear legal right to the requested writs. We therefore deny Scannelly's petition.
PETITION DENIED.
*440 COBB, C.J., and WOODALL, STUART, BOLIN, MURDOCK, MAIN, and WISE, JJ., concur.
NOTES
[1]  As discussed in more detail below, Rule 41(a)(1) provides, in pertinent part, that "an action may be dismissed by the plaintiff without order of court ... by filing a notice of dismissal at any time before service by the adverse party of an answer or of a motion for summary judgment...."
[2]  In her initial complaint filed in Jefferson County Scannelly had indicated that one of the parcels of real estate at issue was located in Tuscaloosa County. Scannelly's Tuscaloosa complaint further alleged both that "Toxey resides in Tuscaloosa County" and that "the actions giving rise to [the] lawsuit occurred in Tuscaloosa County."
