
897 So.2d 1022 (2004)
Ex parte ATLANTIS DEVELOPMENT COMPANY, INC., Bobby R. Ajdarodini, and Javad Ajdarodini.
(In re Pace Properties, an Alabama general partnership, and JBJ Partnership
v.
Atlantis Development Company, Inc., et al.).
1030475.
Supreme Court of Alabama.
September 3, 2004.
*1023 F. Page Gamble of Garrison Scott Gamble & Rosenthal, P.C., Birmingham, for petitioners.
Robert C. Gammons of Stephens, Millirons, Harrison & Gammons, P.C., Huntsville, for respondents.
LYONS, Justice.
Atlantis Development Company, Inc., Bobby R. Ajdarodini, and Javad Ajdarodini (hereinafter collectively referred to as "Atlantis") petition this Court for a writ of mandamus. Atlantis seeks relief from an order of the trial court granting the motion of Pace Properties, an Alabama general partnership, and JBJ Partnership (hereinafter collectively referred to as "Pace") to strike Atlantis's jury demand. The issue is whether, under Rule 38(b), Ala. R. Civ. P., Atlantis's demand for a jury trial, made simultaneously with a counterclaim for fraud filed more than 30 days after the fraud issue was raised as an affirmative defense in Atlantis's answer to the complaint, was timely. We answer that question in the negative; accordingly, we deny the petition.

I. Factual Background and Procedural History

Atlantis purchased real property that had been subdivided into lots from Pace and issued promissory notes secured by the property. Pace conveyed the property by a general warranty deed, but failed to disclose that the previous owner had a right of redemption as to certain of the lots. Atlantis began building homes on the lots. When the previous owner sold its right of redemption, the purchaser of the right, John Lary, L.L.C., filed an action in the Madison Circuit Court, and the property became the subject of litigation involving numerous parties and claims. John Lary, L.L.C. v. JBJ Partnership, Case No. CV-97-563. In that action, Atlantis, a defendant, filed a cross-claim against codefendants JBJ Partnership and its individual partners, James E. Pace, James P. Pace, and William B. Pace, alleging fraud based on JBJ and the Paces' failure to disclose the outstanding right of redemption. In the same document, Atlantis also filed a cross-claim against codefendant E. Ray McKee, Jr., and a counterclaim against the plaintiff, John Lary, L.L.C. Atlantis demanded a jury trial on its cross-claims and on the counterclaim.
On February 21, 2003, Pace Properties and JBJ Partnership, one of the defendants on Atlantis's cross-claim in the first action, filed the present action, also in the Madison Circuit Court, claiming that Atlantis had defaulted on certain promissory notes that were the subject of the litigation in John Lary, L.L.C. v. JBJ Partnership. Atlantis answered on April 3, 2003, alleging, among others, the following affirmative defense: "Defendants were defrauded by [Pace], who sold property with defective title, while at the same time warranting that title was clear, the details of which is [sic] set forth in Civil Action Number 97-563 pending in the Circuit Court of Madison County, Alabama." Contemporaneously, Atlantis filed a motion to dismiss or, alternatively, to consolidate Pace's action with the pending action because, according to Atlantis, the claims Pace was asserting were already the subject of John Lary, L.L.C. v. JBJ Partnership.
After hearing oral argument on the issues on June 27, 2003, the trial court denied Atlantis's motions. On August 28, 2003, Atlantis, now required to litigate its defenses and claims in a second action, *1024 filed a counterclaim and demanded a jury trial. The counterclaim alleged that Atlantis had suffered losses on the costs of housing construction, materials, financing, and litigation because of Pace's fraudulent conduct in failing to disclose the outstanding right of redemption on certain of the property Atlantis had purchased from Pace. On September 12, 2003, Pace filed a motion to strike the jury demand. The trial court granted Pace's motion. Atlantis now petitions this Court for a writ of mandamus, arguing that its jury demand was timely and that the trial court therefore erred in granting Pace's motion to strike the demand, and asking this Court to order the trial court to vacate its order granting Pace's motion.

II. Standard of Review

A petition for a writ of mandamus is the appropriate vehicle for seeking review by this Court of a denial of a demand for a jury trial. "Mandamus is an extraordinary remedy, however, requiring a showing that 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 Jackson, 737 So.2d 452, 453 (Ala.1999) (quoting Ex parte Alfab, Inc., 586 So.2d 889, 891 (Ala.1991)). Because mandamus is an extraordinary remedy, the standard of review on a petition for a writ of mandamus is whether there is a clear showing of error on the part of the trial court. Ex parte Finance America Corp., 507 So.2d 458, 460 (Ala.1987).

III. Analysis

Rule 38(b), Ala. R. Civ. P., requires a party seeking a trial by jury on an issue to make that demand "not later than thirty (30) days after the service of the last pleading directed to such issue." Waiver of the right to a trial by jury occurs when a party fails to comply with the deadline established by Rule 38(b). See Rule 38(d) ("The failure of a party to serve and file a demand as required by this rule and to file it as required by Rule 5(d)[, Ala. R. Civ. P.,] constitutes a waiver by the party of trial by jury."). Consequently, when Rule 38(b) and Rule 38(d) are read together, as they must be, a pleading "`raises an issue' only once within Rule 38(b)'s meaning when it introduces it for the first time." Guajardo v. Estelle, 580 F.2d 748, 752-53 (5th Cir.1978).
Rule 13(a), Ala. R. Civ. P., requires that a "pleading shall state as a counterclaim any claim which at the time of serving the pleading the pleader has against the opposing party," subject to exceptions, one of which the trial court here found not applicable. Rule 7(a), Ala. R. Civ. P., entitled "Pleadings," provides: "There shall be a complaint and an answer; a reply to a counterclaim denominated as such...." Rule 7(a) does not state, "There shall be a complaint, an answer and a counterclaim; a reply to a counterclaim denominated as such...." A counterclaim must therefore be asserted in an answer. This conclusion is buttressed by Rule 13(f), Ala. R. Civ. P., "Omitted Counterclaim," which provides: "When a pleader fails to set up a counterclaim through oversight, inadvertence, or excusable neglect, or when justice requires, the pleader may by leave of court set up the counterclaim by amendment." (Emphasis added.) The only reasonable interpretation of Rule 13(f) is that "amendment" refers to an amendment to the answer.
In this proceeding, Pace's complaint was filed on February 21, 2003. Atlantis served its answer on April 3, 2003, asserting, among other things, the defense of fraud. Atlantis did not demand a trial *1025 by jury in the answer. The answer constituted the last pleading directed to the issues as to which a jury might have been demanded, because a reply to an answer is not provided for in the rules. See Rule 7(a). The time in which to demand a trial by jury on the issues in the complaint and the answer therefore expired 30 days after April 3, 2003. Consequently, the demand for a jury trial first asserted in the counterclaim asserting fraud, a document that must be viewed as an amendment to the previously served answer asserting fraud as a defense, is untimely, because it was not served until August 28, 2003, more than three months after the expiration of the deadline established by Rule 38(b).
In Baggett v. Sims, 387 So.2d 792 (Ala.1980), this Court held a jury demand asserted in a counterclaim to be timely. The defendant in Baggett, unlike Atlantis, initially served a motion to dismiss unaccompanied by an answer. A motion to dismiss is not a pleading. See Polytec, Inc. v. Utah Foam Prods., Inc., 439 So.2d 683, 687 (Ala.1983) ("A motion to dismiss is not a responsive pleading within the meaning of [Rule 15]. Rule 7(a)."). Thus, the service of the motion to dismiss in Baggett did not trigger the commencement of the 30-day period for asserting a jury demand pursuant to Rule 38(b), because that rule refers to "the last pleading directed to such issue." (Emphasis added.) The trial court in Baggett denied the motion to dismiss and allowed the defendant 20 days in which to answer. Within the 20-day period, the defendant served an answer and a counterclaim. Thus, before the service of the answer and counterclaim there had been no waiver of the right to a trial by jury because the critical 30-day period "after the service of the last pleading directed to such issue" had not begun to run. Baggett thus correctly held that the period would not run until 30 days after the service of the reply to the counterclaim, the last pleading directed to the issue as to which the jury demand was being made.
This case is indistinguishable from Ex parte Twintech Industries, Inc., 558 So.2d 923 (Ala.1990). In that case, the defendant asserted the affirmative defense of fraud in its initial answer, served a counterclaim eight days later that contained no allegations of fraud, and did not at that time demand a trial by jury. Three years later, the defendant amended its answer to assert a counterclaim based on fraud. This Court there stated:
"In the instant case, the record does not indicate that the fraud claims set forth in Twintech's amendment [asserting a counterclaim for fraud] created a new issue. To the contrary, Twintech had already raised fraud as an affirmative defense in its answer, and, within 30 days of filing that answer, could have demanded a jury. Its failure to timely file a jury demand when the issue was first raised operated as a waiver of the right; the right was not revived by the later amendment relating to the same issue. Therefore, the trial judge's order granting Boeing's motion to strike Twintech's jury demand was proper and will not be disturbed by this Court."
558 So.2d at 925-26 (emphasis added).
Our research reflects that Pace's contention that Atlantis's demand for a jury trial is untimely is consistent with the holding in Curry v. Pyramid Life Insurance Co., 271 F.2d 1 (8th Cir.1959), a case arising under Rule 38(b), Fed.R.Civ.P., which is virtually identical to our Rule 38(b).[1] There, as here, the defendant filed an answer setting up fraud as a defense. That *1026 answer was filed on September 19. On November 5, the defendant, with leave of court, filed a counterclaim seeking rescission based on fraud. The plaintiff demanded a jury in a reply filed on November 12. The Curry court held the demand to be timely. Addressing Curry, an authoritative treatise dealing with Rule 38 of the Federal Rules of Civil Procedure states as follows:
"Its [the rule dealing with timeliness of a jury demand served within 10 days of the service of a reply to a counterclaim] application in that case [Curry], however, appears to have been erroneous.... It should have been held that the failure to demand a jury [within 10 days after the answer was filed] waived jury trial on the issue of fraud set up in the answer and that the subsequent counterclaim, in which this same issue was made the basis for a claim for affirmative relief, did not revive a right to jury already waived. See note 38 below. [Right to jury trial not revived after previous waiver]."
9 C. Wright and A. Miller, Federal Practice and Procedure: Civil 2d § 2320 n. 9 (1994). Subsequent treatment of Curry by other courts conforms to the view expressed in the foregoing treatise. See Land Office Co. v. Clapp-Thomssen Co., 442 N.W.2d 401 (N.D.1989), where the Supreme Court of North Dakota held as follows:
"In this case, the fraud alleged in the defendants' counterclaim rests upon the same conduct as the fraud asserted as an affirmative defense in their answer, i.e. Land Office's misrepresentation of the net operating income of the apartments. That misrepresentation is the same `basic issue' or `general area of dispute' as the conduct for which the defendants sought damages in their counterclaim. There is no dispute that the counterclaim involves the same basic issue. Counsel acknowledged as much at a hearing on May 6, 1988, regarding the stipulation permitting the defendants to file their counterclaim, when he said that `the contents of the Counterclaim would not deviate from the issues that will be tried anyway.' By not demanding a jury trial in their answer, the defendants waived their right to a jury trial and once waived, that right was not revived by a counterclaim which did not raise `new issues.'
"We are not persuaded that Curry v. Pyramid Life Ins. Co., 271 F.2d 1 (8th Cir.1959), cert. denied, 361 U.S. 933, 80 S.Ct. 373, 4 L.Ed.2d 355 (1960), requires a different result. In that case, the defendant filed an answer alleging an affirmative defense of fraud in the procurement of an insurance contract. More than a month later, the defendant, with leave of the court, filed a counterclaim seeking rescission of the insurance contract because of fraud. The plaintiff demanded a jury trial in her reply to the counterclaim. The Eighth Circuit Court of Appeals held that the demand was timely because the plaintiff's reply to the counterclaim `was the "last pleading directed to such (fraud) issue" within the contemplation of Rule 38(b).' Curry, supra, 271 F.2d at 5.
"Professors Wright and Miller have questioned the application of the `new issues' doctrine in Curry:

"`It should have been held that the failure to demand a jury [within ten days after the answer was filed] waived jury trial on the issue of fraud set up in the answer and that the subsequent counterclaim, in which this same issue was made the basis for a claim for affirmative relief, did not revive a right to jury already waived. See note 38 below. [Right to jury trial not revived [after] previous waiver].' *1027 9 C. Wright and A. Miller, [Federal Practice and Procedure] § 2320 at 93, fn. 35 [(1971)].
"We agree with Professors Wright and Miller that the Curry decision is not persuasive because the opinion did not address the previously waived right to a jury trial on the same issue, a principle which has been relied upon in subsequent Eighth Circuit cases. Cardiac Pacemakers, Inc. v. Coratomic, Inc., 702 F.2d 671 (8th Cir.1983); First Wis. National Bank of Rice Lake v. Klapmeier, 526 F.2d 77 (8th Cir.1975); Williams v. Farmers and Merchants Ins. Co., 457 F.2d 37 (8th Cir.1972)."
442 N.W.2d at 404-05 (emphasis added). A similar result has been reached in Pyramid Co. v. Homeplace Stores Two, Inc., 175 F.R.D. 415 (D.Mass.1997); Leighton v. New York, Susquehanna and Western R.R., 36 F.R.D. 248, 249 (S.D.N.Y.1964), as noted in Bricks, Blocks & Concrete Co. v. Frontier Ins. Co., 39 Fed. Appx. 610, 611-12 (D.C.Cir.2002) (unpublished). In Bricks, although noting the conflict between Curry, on the one hand, and the treatise and subsequent cases in agreement with the rule as set forth in the treatise, on the other hand, the United States Court of Appeals for the District of Columbia Circuit refused to overturn an earlier holding on a former appeal that a jury demand in relation to a counterclaim did not "reopen the window" after a previous closing of the window for demand for a trial by jury by the inactivity of the parties. We decline to follow Curry and adhere to Twintech.
Atlantis's contention that the pendency of the prior action barred the present action appears to have diverted its focus from the impact of Rule 38(b). However, Atlantis's defense to this action could have been asserted by motion, unaccompanied by an answer. See, e.g., Ex parte Canal Ins. Co., 534 So.2d 582, 583 (Ala.1988) ("Canal filed a motion to dismiss, or, in the alternative, to stay the proceedings in the state court action, asserting that the prior action pending in the federal court barred the state claim, and that the matters asserted in the complaint were properly matters of compulsory counterclaim in the federal action. Fed.R.Civ.P. 13(a)."). Nevertheless, Atlantis chose to file a motion and an answer to the complaint asserting the defense of fraud without demanding a trial by jury. This pleading had consequences in terms of the deadline imposed by Rule 38(b) for asserting a demand for a trial by jury.
Adhering to the plain language of Rule 38(b) and Rule 38(d), as we are obliged to do, can of necessity lead to what one might view in a specific case as a harsh result, as the provisions of Rule 38 plainly impose a penalty for failing to adhere to a deadline. Yet, our legal system functions based on adherence to deadlines, for example, statutes of limitations. When the consequences of a missed deadline appear unduly harsh, the proper approach of the aggrieved party is to pursue an available remedy for relief from the consequences of the deadline.
The same rules of civil procedure that create a deadline for demanding a trial by jury also afford a remedy for those seeking relief from the consequences of a missed deadline. Rule 39(b), Ala. R. Civ. P., permits the trial court, upon motion, to order a trial by jury in its discretion "notwithstanding the failure of a party to demand a jury in an action in which such a demand might have been made of right." We do not have before us in this proceeding a review of the trial court's failure to exercise its discretion in favor of a trial by *1028 jury pursuant to Rule 39(b).[2]
Under the circumstances of this case as disclosed by the record (a defendant serves an answer with the expectation that the trial court would grant its simultaneously filed motion to dismiss or to stay based on the pendency of another action in which a jury had been demanded), a motion filed pursuant to Rule 39(b), if Atlantis chooses on remand to file such a motion, seeking a trial by jury in the trial court's sound discretion, as informed by the requirements of Rule 1, Ala. R. Civ. P.,[3] would deserve serious consideration.

IV. Conclusion

For the reasons previously stated, we deny the petition for the writ of mandamus.
PETITION DENIED.
NABERS, C.J., and HOUSTON, BROWN, HARWOOD, and STUART, JJ., concur.
JOHNSTONE and WOODALL, JJ., concur specially.
JOHNSTONE, Justice (concurring specially).
I concur in all of the holdings, in all of the rationale for the holdings, and in the judgment of the scholarly main opinion. I express no opinion on the suggestion or prospects of a motion for Rule 39(b), Ala. R. Civ. P., relief in the future proceedings in this case. Since no Rule 39(b) issue is before us, I would not want any expression by me on this topic to influence either party, counsel, or the trial judge. WOODALL, Justice (concurring specially).
WOODALL, Justice, (concurring specially).
I concur in the holding of the main opinion and with the rationale for that holding. However, with respect to the gratis dictum concerning Ala. R. Civ. P. 39(b), I express no opinion. "`An opinion given in Court ..., if not necessary to the judgment given of record, but that it might have been as well given, if no such, or a contrary opinion had been broached, is no judicial opinion, no more than a gratis dictum.'" Planters' & Merchants' Bank v. Walker, 7 Ala. 926, 944 (1845).
NOTES
[1]  Rule 38(b), Fed.R.Civ.P., establishes a 10-day period within which a demand for a jury trial must be made, while Rule 38(b), Ala. R. Civ. P., establishes a 30-day period.
[2]  Rule 39(b) provides: "Issues not demanded for trial by jury as provided in Rule 38 shall be tried by the court; but notwithstanding the failure of a party to demand a jury in an action in which such a demand might have been made of right, the court in its discretion upon motion may order a trial by jury of any or all issues."
[3]  See Rule 1(c), Ala. R. Civ. P. ("These rules shall be construed and administered to secure the just, speedy and inexpensive determination of every action.").
