
796 So.2d 399 (2000)
Ex parte State of Alabama.
(Re STATE of Alabama
v.
Wayne ZIMLICH).
1981536
Supreme Court of Alabama.
May 5, 2000.
Rehearing Denied July 7, 2000.
*400 Bill Pryor, atty. gen., and James B. Prude, asst. atty. gen., for petitioner.
Kenneth A. Nixon, Mobile; and Joseph D. Quinlivan, Jr., Mobile, for respondent.
ENGLAND, Justice.
Wayne Zimlich, a registered nurse-anesthetist, and his supervising physicians were sued in a medical-malpractice case; the plaintiff alleged that they had negligently caused the death of a patient during a surgical procedure. Zimlich testified at the trial of the malpractice case in October 1995. After the trial, Zimlich sued his insurance company, alleging that it had acted in bad faith in failing to settle the malpractice claim against him. After a trial in November 1997, he was awarded $15,000 against the insurance company. In the trial of his claim against the insurer, he alleged that he had been coerced into giving false testimony at the malpractice trial, and that the coercion was by the insurance company and its employees, the doctor who employed him, and the defense attorney for the insurance company.
Zimlich was indicted in June 1998 for perjury. The indictment read:
"WAYNE ZIMLICH, whose name is to the Grand Jury otherwise unknown than as stated, did, on or about October 9, 1995, after having been sworn to tell the truth, knowingly testified under that oath in an official proceeding, to-wit: a jury trial in the Circuit Court of Mobile County, Alabama as follows:
"Q. And according to the [EKG (echocardiogram) ] monitor this period, this second episode of bradycardia and hypotension would have lasted for what period of time?
"A. About three minutes from the time it went down below like forty-three and I started to treat it until she responded to the drugs.
"That said Wayne Zimlich did, on or about November 3, 1997, after having been sworn to tell the truth, knowingly testify under that oath at an official proceeding, to-wit: a jury trial in the Circuit Court of Mobile County, Alabama as follows:
"Q. Page eighty-one, I'll read this, starting at line four (of a prior deposition of the said Wayne Zimlich), question: is it your testimony that the bradycardia in the second episode lasted three to five minutes[?]
"Answer: Yes
"Question: Is it your testimony that Ms. McGahagin would not have been bradycardic for longer than three to five minutes?
"Answer: Correct, severe sinus bradycardia no longer three to five minutes.
"Q. That was a lie?
"A. That was what we had decided we were going to say and that was not the truth.
"Q. That's not the truth?
"A. That's correct.
". . . .
"That said Wayne Zimlich having knowingly made each said statement, one or the other of which is false and not believed by the said Wayne Zimlich to have been true when made, in violation of section 13[A]-10-101, of the Code of Alabama against the peace and dignity of the State of Alabama."
Zimlich moved to dismiss the indictment, arguing that it failed to allege the offense of perjury in the first degree because *401 it made no allegation that the alleged perjurious statement was "material." The trial court dismissed the indictment, stating:
"Even though the indictment is brought pursuant to § 13A-10-104, Code of Alabama (swearing falsely to inconsistent statements to the degree that one is necessarily false), it does not extinguish the essential component of materiality as an element of perjury in the first degree. `To constitute perjury (in the first degree), the matter falsely sworn to must be material to the issue in controversy.' Ikner v. State, 600 So.2d 435 (Ala.Cr.App.1992). No such allegation is made, nor does the indictment recite facts and use language which, taken as a whole, indicate materiality. United States v. Haas, 583 F.2d 216 (5th Cir.1981[1978])."
A second indictment was returned in January 1999. That indictment read:
"Wayne Zimlich whose name is to the Grand Jury otherwise unknown than as stated, did, on or about October 9, 1995, during his examination as a witness and after having been duly sworn to testify truthfully in the trial of James McGahagin, et al., vs DR. ANTHONY SAVOIE, et al., CV-93-1571, in the Circuit Court of Mobile County, Alabama, a jury trial alleging medical malpractice, which said court had authority to administer such oath, swear as follows:
"Q. And according to the EKG monitor this period, this second episode of bradycardia and hypotension would have lasted for what period of time?
"A. About three minutes from the time it went down below like forty-three and I started to treat it until she responded to the drugs.
and the matter so sworn to being material to a determination of whether or not there had been medical malpractice; and,
"The said WAYNE ZIMLICH did, on or about November 3, 1997 during his examination as a witness and after having been duly sworn to testify truthfully in the trial of WAYNE ZIMLICH vs. ST. PAUL FIRE & MARINE INSURANCE COMPANY, et al., CV-96-2441, in the Circuit Court of Mobile County, Alabama, a jury trial alleging bad faith, negligence or wanton failure to settle an insurance claim, which said court had authority to administer such oath, swear as follows:
"Q. All right. Did you testify at trial?
"A. Yes, I did.
"Q. And did you testify truthfully at trial?
"A. No.
"Q. Tell us what you said during trial that wasn't truthful.
"A. I stayed with the defense that I had been told to put forward, that the record was compressed, that it was only three to four minutes, or four to five minutes. I don't remember whether I was ever asked about Savoie, but basically it was trying to defend that time period,
and the matter so sworn to being material to a determination of whether or not there had been bad faith, negligence or wanton failure to settle an insurance claim, and [t]he said WAYNE ZIMLICH having willfully and corruptly made each said statement, one or the other of which is false and not believed by the said WAYNE ZIMLICH to have been true when made, a violation of Section 13A-10-104, of THE CODE OF ALABAMA, in violation of Section 13A-10-101, of THE CODE OF ALABAMA *402 against the peace and dignity of the State of Alabama."
Zimlich moved to dismiss the second indictment, alleging that it was barred by the three-year statute of limitations. The trial court denied Zimlich's motion on May 11, 1999.[1] The court set the perjury case for trial on May 26, 1999. Zimlich petitioned the Court of Criminal Appeals for a writ of mandamus directing Judge Robert G. Kendall, the judge to whom Zimlich's perjury case was assigned (see note 1), to dismiss the second indictment. Judge Kendall denied a motion by Zimlich to stay his trial pending a ruling by the Court of Criminal Appeals.
The Court of Criminal Appeals granted Zimlich's petition and ordered Judge Kendall to dismiss the second indictment, holding that it was barred by the statute of limitations. Ex parte Zimlich, 796 So.2d 394 (Ala.Crim.App.1999). The Court of Criminal Appeals concluded that the first indictment tracked the language of § 13A-10-103, Ala.Code 1975, the statute defining third-degree perjury. That statute reads: "A person commits the crime of perjury in the third degree when he swears falsely." The statutory limitations period for commencing a prosecution for third-degree perjury, a misdemeanor, is 12 months. Ala.Code 1975, § 15-3-2. The Court of Criminal Appeals held that the first indictment did not operate to toll the running of the time for returning the second indictment because, it said, the first indictment charged an offense different from that charged in the second indictment and because the first indictment was void, having been returned more than 12 months after the alleged perjury had occurred at the October 9, 1995 trial. Id.[2]
In order to obtain a writ of mandamus, the party seeking the writ must show (1) a clear legal right to the order sought; (2) an imperative duty upon the respondent to perform, accompanied by a refusal to do so; (3) a lack of another remedy; and (4) properly invoked jurisdiction of the court. Ex parte Gonzalez, 686 So.2d 204 (Ala.1996) (citing Ex parte Ziglar, 669 So.2d 133 (Ala.1995)).
The State has now petitioned this Court for a writ of mandamus directing the Court of Criminal Appeals to set aside the writ of mandamus it issued on Zimlich's petition.

Discussion

I.
Zimlich argued before the Court of Criminal Appeals that he would suffer irreparable harm if convicted of felony perjury because the felony conviction, he said, would deprive him of his license to practice his profession and thereby deprive him of his livelihood. The Court of Criminal Appeals quoted from Ex parte Spears, 621 So.2d 1255, 1259 (Ala.1993), where this Court had stated that "mandamus review *403 will generally be restricted ... to those cases where one of the recognized exceptions applies, or to those extraordinary cases where the rights of the parties cannot be adequately protected by appellate review of a final judgment." That court concluded that Zimlich's rights could not be adequately protected if it denied mandamus review. Ex parte Zimlich, 796 So.2d at 396. The State argues here that the Court of Criminal Appeals erred in issuing its writ of mandamus because, it says, Zimlich failed to establish that he had a clear legal right to the relief sought. We agree.
We have stated:
"It is well established in Alabama that a writ of mandamus, which is a drastic and extraordinary remedy, will not issue when there is an adequate remedy by appeal, and that the writ cannot be used as a substitute for appellate review. The reason for this rule was succinctly stated by then Justice Livingston in Koonce v. Arnold, 244 Ala. 513, 514, 14 So.2d 512, [512] (1943):
"`If the matters complained of can be ultimately presented to the appellate court through the medium of an appeal from the final decree, mandamus will not ordinarily be granted. This for the reason, that appellate courts will not hear causes in piecemeal.'"
Ex parte Fowler, 574 So.2d 745, 747 (Ala. 1990). We conclude that on his petition to the Court of Criminal Appeals Zimlich failed to establish that Judge Kendall had a duty to dismiss his indictment as barred by the statute of limitations and improperly refused to do so. "The fact that a statute of limitations defense is applicable is not a proper basis for issuing a writ of mandamus, due to the availability of a remedy by appeal." Ex parte Southland Bank, 514 So.2d 954, 955 (Ala.1987). Zimlich did not show that he had a clear legal right to the order he sought.

II.
The State contends that the Court of Criminal Appeals erred in holding that the June 1998 indictment (the first indictment) charged third-degree perjury; that that indictment was void on the basis that it was returned after the one-year limitations period had expired; and that it did not toll the running of the limitations period for a prosecution of the offense charged in the second indictment. Zimlich argued in the Court of Criminal Appeals that the June 1998 indictment was void because it attempted to state a first-degree perjury charge but in actuality stated only a third-degree perjury charge because it did not allege that the alleged false statements made either during the malpractice trial or during Zimlich's trial against his insurance carrier were "material." In making this argument, Zimlich asserted that the Court of Criminal Appeals needed to decide whether Rule 15.5(c), Ala. R.Crim. P., applied; whether the tolling statute, § 15-3-6, Ala.Code 1975, applied and was superior to Rule 15.5(c); and whether the tolling statute permitted a subsequent indictment to increase the nature of the alleged offense from a misdemeanor to a felony. The uncertainty about the applicability of Rule 15.5(c) and § 15-3-6 and the question whether the State's error in regard to the first indictment was the kind of "inadvertent technical error" contemplated by Rule 15.5(c) (see Committee Comments to that rule) lead us to conclude that Zimlich had no clear legal right to an order by Judge Kendall dismissing the second indictment as barred by the statute of limitations, given that Zimlich, if improperly convicted, would have had a remedy by appeal.
The State is entitled to a writ directing the Court of Criminal Appeals to set aside its writ of mandamus.
*404 PETITION GRANTED; WRIT ISSUED.
HOUSTON, COOK, LYONS, BROWN, and JOHNSTONE, JJ., concur.
HOOPER, C.J., and MADDOX and SEE, JJ., concur in the result.
NOTES
[1]  The perjury case based on the second indictment was assigned to Judge Chris Galanos. He recused himself before ruling on the motion to dismiss, after learning that the law firm he was planning to join upon resigning his judgeship represented the insurance company that had been involved in the medical-malpractice action. The case was reassigned to Judge Robert G. Kendall.
[2]  Although the Court of Criminal Appeals concluded that the first indictment charged Zimlich with misdemeanor perjury and that the language of the indictment tracked § 13A-10-103 (third-degree perjury), an equally persuasive argument can be made that it did not track § 13A-10-103 and did not charge misdemeanor perjury. We note that the indictment more closely tracked § 13A-10-104, which allows a person to be prosecuted for inconsistent statements that occurred within the statutory limitations period, and that it cited the felony-perjury statute, § 13A-10-101.
