
946 So.2d 536 (2006)
Ex parte Christopher Jacques SEYMOUR.
In re Christopher Jacques Seymour
v.
State of Alabama.
1050597.
Supreme Court of Alabama.
June 30, 2006.
Christopher Jacques Seymour, pro se.
Troy King, atty. gen., and Kevin C. Newsom, deputy atty. gen., and Stephanie N. Morman, asst. atty. gen., for respondent.
NABERS, Chief Justice.
The issue presented in this case is whether a conviction is void for lack of subject-matter jurisdiction because the indictment charging the offense omitted an element of the offense. We hold that it is not.

I.
On November 8, 2001, Christopher Jacques Seymour opened fire on a group of five men somewhere in Randolph County. One of the five, Kevin Turner, was shot in his leg below the knee. As Turner retreated into his house, the gunfire continued, and some of the bullets entered Turner's house. Turner's wife and three-year-old son were inside the house.
Seymour was convicted of second-degree assault, § 13A-6-21, Ala.Code 1975, and of shooting into an occupied dwelling, § 13A-11-61, Ala.Code 1975. The Court of Criminal Appeals affirmed those convictions on direct appeal, without an opinion. Seymour v. State [No. CR-02-1902], 910 So.2d 834 (Ala.Crim.App.2004) (table).
*537 On January 3, 2005, Seymour filed a Rule 32, Ala. R.Crim. P., petition for postconviction relief. The trial court denied the petition. The Court of Criminal Appeals affirmed the trial court's denial of Seymour's Rule 32 petition in an unpublished memorandum; Judge Cobb dissented from the memorandum affirmance with an opinion. Seymour v. State, 946 So.2d 535 (Ala.Crim.App.2005). In her dissent, Judge Cobb wrote:
"For the reasons I joined Judge Shaw's special writing in Sullens v. State, 878 So.2d 1216 (Ala.Crim.App. 2003)(Shaw, J., concurring in part and dissenting in part), I cannot agree with the conclusion in the unpublished memorandum that the indictment in this case, which failed to allege a culpable mental state, was sufficient to charge the offense of shooting into an occupied dwelling, a violation of § 13A-11-61, Ala.Code 1975."
We granted Seymour's petition for the writ of certiorari to determine whether the failure to allege a culpable mental state in the indictment charging Seymour with the offense of shooting into an occupied dwelling divested the trial court of jurisdiction over that offense.[1]

II.
Seymour argues that in order for him to be convicted of shooting into an occupied dwelling, the State was required to prove that he acted with a culpable mental state.[2] The indictment charging Seymour with that offense failed to allege a culpable mental state. Seymour argues that this omission was a fatal jurisdictional error.
Our analysis begins with the grounds for preclusion of remedy in Rule 32.2, Ala. R.Crim. P. Seymour did not raise his defective-indictment claim at trial or on direct appeal. See Rule 32.2(a)(3) and (5), Ala. R.Crim. P. Rule 32.2 thus sharply limits the scope of our review.
"A petitioner will not be given relief under this rule based upon any ground:
". . . .
"(3) Which could have been but was not raised at trial, unless the ground for relief arises under Rule 32.1(b); or
". . . .
"(5) Which could have been but was not raised on appeal, unless the ground for relief arises under Rule 32.1(b)."
Rule 32.2(a), Ala. R.Crim. P. (emphasis added). The exception under Rule 32.1(b) is limited to claims that "[t]he [trial] court was without jurisdiction to render judgment or impose sentence."[3]
Seymour argues that his defective-indictment claim is jurisdictional and that it thus falls within the exception provided in Rule 32.2(a) for claims arising under Rule 32.1(b). Under current Alabama caselaw, he is correct. This Court has held that "[a] valid indictment is the source of the *538 subject matter jurisdiction to try a contested criminal case." Ash v. State, 843 So.2d 213, 216 (Ala.2002). Although Ash is a recent decision, similar language can be found in opinions dating back, in at least one case, more than a century. Butler v. State, 130 Ala. 127, 30 So. 338 (1901); see also Kyser v. State, 22 Ala.App. 431, 117 So. 157 (1928). Alabama law has not always been clear as to which defects will invalidate an indictment, but this Court has expressly held that "[f]ailure to allege an essential element of the charged offense is a jurisdictional defect. . . ." Ex parte Lewis, 811 So.2d 485, 487 (Ala.2001). Under Lewis, Seymour presents a jurisdictional claim.
In response, the State challenges the statement in Ash that a valid indictment is the source of a trial court's subject-matter jurisdiction. Instead, the State argues, a trial court derives its jurisdiction from the Alabama Constitution and the Alabama Code. We agree.
Jurisdiction is "[a] court's power to decide a case or issue a decree." Black's Law Dictionary 867 (8th ed.2004). Subject-matter jurisdiction concerns a court's power to decide certain types of cases. Woolf v. McGaugh, 175 Ala. 299, 303, 57 So. 754, 755 (1911) ("`By jurisdiction over the subject-matter is meant the nature of the cause of action and of the relief sought.'" (quoting Cooper v. Reynolds, 77 U.S. (10 Wall.) 308, 316, 19 L.Ed. 931 (1870))). That power is derived from the Alabama Constitution and the Alabama Code. See United States v. Cotton, 535 U.S. 625, 630-31, 122 S.Ct. 1781, 152 L.Ed.2d 860 (2002)(subject-matter jurisdiction refers to a court's "statutory or constitutional power" to adjudicate a case). In deciding whether Seymour's claim properly challenges the trial court's subject-matter jurisdiction, we ask only whether the trial court had the constitutional and statutory authority to try the offense with which Seymour was charged and as to which he has filed his petition for certiorari review.
Under the Alabama Constitution, a circuit court "shall exercise general jurisdiction in all cases except as may be otherwise provided by law." Amend. No. 328, § 6.04(b), Ala. Const.1901. The Alabama Code provides that "[t]he circuit court shall have exclusive original jurisdiction of all felony prosecutions. . . ." § 12-11-30, Ala.Code 1975. The offense of shooting into an occupied dwelling is a Class B felony. § 13A-11-61(b), Ala.Code 1975. As a result, the State's prosecution of Seymour for that offense was within the circuit court's subject-matter jurisdiction, and a defect in the indictment could not divest the circuit court of its power to hear the case.
The United States Supreme Court has long held that "defects in an indictment do not deprive a court of its power to adjudicate a case." Cotton, 535 U.S. at 630, 122 S.Ct. 1781. As Justice Holmes stated in Lamar v. United States, 240 U.S. 60, 64, 36 S.Ct. 255, 60 L.Ed. 526 (1916), "[t]he objection that the indictment does not charge a crime . . . goes only to the merits of the case."
A number of states agree. See Sawyer v. State, 327 Ark. 421, 938 S.W.2d 843 (1997); Howell v. State, 421 A.2d 892, 895 (Del.1980); Ford v. State, 330 Md. 682, 625 A.2d 984 (1993); Roth v. State, 714 P.2d 216 (Okla.Crim.App.1986); State v. Gentry, 363 S.C. 93, 610 S.E.2d 494 (2005); Studer v. State, 799 S.W.2d 263 (Tex.Crim.App. 1990); but see State v. Byington, 135 Idaho 621, 21 P.3d 943 (2001). The Supreme Court of Missouri, addressing this precise issue, framed the issue succinctly: "Subject matter jurisdiction of the circuit court and the sufficiency of the information or indictment are two distinct concepts. The *539 blending of these concepts serves only to confuse the issue to be determined." State v. Parkhurst, 845 S.W.2d 31, 34-35 (Mo. 1992). We find this approach persuasive and consistent with both the Alabama Constitution and the Alabama Code.
The validity of Seymour's indictment is irrelevant to whether the circuit court had jurisdiction over the subject matter of this case. A defect in an indictment may be error, see Rule 15.2(d), Ala. R.Crim. P.or even constitutional error, see Ala. Const., Art. I, § 8  but the defect does not divest the circuit court of the power to try the case. A defendant who challenges a defective indictment is thus subject to the same preclusive bars as one who challenges any other nonjurisdictional error, such as an illegal seizure or a violation of the Confrontation Clause.
In this case, Seymour failed to raise his defective-indictment claim at trial or on direct appeal. As a result, his claim is barred by Rule 32.2(a)(3) and Rule 32.2(a)(5), Ala. R.Crim. P., and the trial court correctly denied relief.[4]

III.
We hold that a circuit court has subject-matter jurisdiction over a felony prosecution, even if that prosecution is based on a defective indictment. To the extent that Lewis, Ash, and other Alabama cases have held to the contrary, they are overruled. The decision of the Court of Criminal Appeals is affirmed.
AFFIRMED.
SEE, LYONS, HARWOOD, STUART, SMITH, BOLIN, and PARKER, JJ., concur.
WOODALL, J., dissents.
NOTES
[1]  Seymour does not challenge the Court of Criminal Appeals' judgment insofar as it affirmed his conviction for second-degree assault.
[2]  Alabama recognizes four culpable mental states: when a person acts intentionally, knowingly, recklessly, and with criminal negligence. § 13A-2-2, Ala.Code 1975.
[3]  The language "jurisdiction to render judgment or impose sentence" refers to the court's jurisdiction over the subject matter, as opposed to the person. Although a court must have both personal jurisdiction and subject-matter jurisdiction in an action, Woolf v. McGaugh, 175 Ala. 299, 303, 57 So. 754, 755 (1911), defects in personal jurisdiction are waived if they are not raised before trial. City of Dothan v. Holloway, 501 So.2d 1136, 1139 (Ala.1986). The Rule 32.1(b) exception applies only to claims alleging that the trial court lacked subject-matter jurisdiction.
[4]  Because Seymour's defective-indictment claim is precluded, we do not reach the merits of his argument that an indictment charging a violation of § 13A-11-61 must allege a culpable mental state, and we express no opinion as to the Court of Criminal Appeals' resolution of that issue.
