OPINION
Appellant Brad William Reinke’s application for writ of habeas corpus raises an issue of first impression involving recent statutory amendments governing the long-term commitment of defendants who are found incompetent to stand trial. Specifically, the 2005 Legislature’s article 46B.009(b) — now 46B.0095(a) — prohibits a defendant who is found incompetent to stand trial from being committed by the State to a mental hospital or other inpatient or residential facility for a period “that exceeds the maximum term provided by law for the offense for which the defendant was to be tried.” See Act of May 23, 2005, 79th Leg., R.S., ch. 324, § 3, 2005 Tex. Gen. Laws 949 (amended 2007) (current version at Tex.Code Crim. Proc. Ann. art. 46B.0095(a) (West Supp.2010)). Once this maximum period of commitment is reached, the State must institute civil commitment proceedings if it desires to further confine the defendant in the mental-health system. Tex.Code Crim. Proc. Ann. art. 46B.0095(b). The case before us raises the question of how to calculate the maximum term under this statute when the defendant has prior convictions that could enhance his punishment — i.e., is the “maximum term” calculated as the time prescribed as punishment for the level of the indicted offense, or is the “maximum term” lengthened by punishment enhancements that could have been applied at trial based upon prior convictions? We conclude that the statute’s plain language requires that the maximum term be based upon the offense for which the defendant was to be tried without regard to the enhanced punishment that the defendant might have received had a jury both found him guilty and found enhancement allegations to be true. As such, we reverse the trial court’s denial of Reinke’s request for habeas corpus relief and conclude that Reinke has reached the “maximum term provided by law for the offense for which he was to be tried.” See id. art. 46B.0095(a). Accordingly, Reinke may *375 only be further confined in the State mental-health system, assuming he remains incompetent to stand trial, pursuant to civil commitment proceedings under article 46B.0095(b). See id. art. 46B.0095(b).
BACKGROUND
Reinke has been confined, mostly in the State mental-health system, since the day in September of 1990 when he allegedly stabbed his father in the chest, abdomen, and left index finger with a knife. A grand jury indicted Reinke for the second-degree felony of attempted murder, which carries a punishment range of two to twenty years in prison. The indictment included an enhancement paragraph, noting that Reinke had two prior felony offenses that could be considered to enhance his punishment if he were convicted. If a jury found true either of the prior felonies alleged in the enhancement paragraph following a conviction under the instant indictment, Reinke would be subject to imprisonment as if for a first-degree felony, with a punishment range of five to ninety-nine years or life.
Reinke’s prosecution was halted because the district court found him incompetent to stand trial and committed him to a mental-health facility.
1
In 2010, having been committed in the mental-health system due to continuing incompetence for twenty years, Reinke filed an application for writ of ha-beas corpus with the district court seeking relief from his mental-health facility commitment under article 46B.0095 of the code of criminal procedure.
See id.
art. 46B.0095(a);
see also id.
art. 11.01 (West 2005) (explaining that writ of habeas corpus functions as remedy for restraint on person’s liberty);
Queen v. State,
In his application for writ of habeas corpus, Reinke argued that his commitment in the State mental-health system had become unlawful because it exceeded the “maximum term provided by law for the offense for which [he] was to be tried,” i.e., the twenty-year statutory maximum amount of time prescribed for the second-degree felony offense for which he was indicted in 1990. The State responded that Reinke has not completed the maximum term of commitment because the indictment sought punishment enhancements that, upon conviction, made Reinke eligible for the greater sentence of five to ninety-nine years or life.
Reinke was given a habeas corpus hearing before a criminal court magistrate during which the parties entered into the following written stipulation of facts:
1. Applicant is restrained of his liberty by the Travis County Sheriff in the Travis County Jail under a capias issued pursuant to charges of attempted murder in Travis County, Texas. Applicant has been in continuous custody since September 23, 1990, most of which has been served at a mental health facility while waiting to regain competency.
2. Defendant was arrested on September 23, 1990, for the offense of aggravated assault, alleged to have been committed on that date.
3. Defendant was subsequently indicted for the second-degree felony of attempted murder, which carries a punishment range of two years to twenty years in prison.
*376 4. There is an enhancement paragraph in the indictment, alleging prior felony convictions for criminal mischief and burglary of a habitation, both on October 13, 1988, which convictions are alleged to have become final before the commission of the offense alleged in this cause.
5. If either of the prior felonies alleged were found to be true at trial, Applicant would be subject to imprisonment as a first-degree felony, five to ninety-nine years or life.
[[Image here]]
7. Upon motion of counsel at the time of arrest, Defendant was examined and found incompetent to stand trial with further findings that he would not regain competency in the near future.
8. Defendant has remained in continuous custody in a mental health facility since the date of arrest and has been found to be incompetent with the further findings that he will not regain competency in the near future.
[[Image here]]
At the conclusion of the hearing, the magistrate interpreted article 46B.0095(a)’s phrase “maximum term provided by law for the offense for which the defendant was to be tried” to include the term that may have resulted from punishment enhancements, ruling that it means “the maximum punishment to which the individual defendant is exposed in the event that all of the allegations in the indictment are found to be true.” On the magistrate’s recommendation, the district court then issued the order denying the application for habeas corpus that Retake challenges in this appeal.
ANALYSIS
In his sole issue, Reinke argues that the district court erred in denying his application for habeas corpus and that he must either be released or held under civil commitment proceedings 2 because he has been committed to a mental-health facility for longer than the maximum amount of time for the 1990 offense for which he was to be tried. Based on the plain language of article 46B.0095, we agree.
Standard of review
A trial court’s grant or denial of habeas corpus relief is ordinarily reviewed under an abuse of discretion standard.
See Ex parte Spaulding,
Because statutory construction is a question of law, our review is de novo.
Spence v. State,
“Maximum term” under article 46B.0095
The instant ease turns upon the construction of Texas Code of Criminal Procedure article 46B.0095, which states in relevant part:
(a) A defendant may not, under this chapter, be committed to a mental hospital or other inpatient or residential facility, ordered to participate in an outpatient treatment program, or subjected to both inpatient and outpatient treatment for a cumulative period that exceeds the maximum term provided by law for the offense for which the defendant was to be tried ....
(b) On expiration of the maximum restoration period under Subsection (a), the defendant may be confined for an additional period in a mental hospital or other inpatient or residential facility or ordered to participate for an additional period in an outpatient treatment program, as appropriate, only pursuant to civil commitment proceedings.
Tex.Code Crim. Proc. Ann. art. 46B.0095 (emphasis added). Specifically, the question we must answer is whether the “maximum term” language refers to the sentence specified for the offense itself, without additional time incorporated for enhancements, or the total length of punishment that the defendant might have received, including enhancements. The parties’ arguments on appeal mirror their arguments below. Both parties contend that the statute is unambiguous, and both assert that its plain language supports their respective interpretations.
Reinke contends that “maximum term” as used in article 46B .0095(a) means the maximum sentence for the indicted offense. Thus, he argues, the maximum amount of time for which he could be committed lawfully — absent a civil commitment proceeding — is twenty years, the statutory maximum amount of time available for the second-degree felony of attempted murder. See id. art. 46B.0095(a); see also Tex. Penal Code Ann. §§ 12.33(a) (West Supp.2010) (setting punishment range for second-degree felony at two to *378 twenty years); 15.01(a), (d) (defining criminal attempt and classifying it as one category below offense attempted); 19.02(b), (c) (West 2008) (defining offense of murder and classifying it generally as first-degree felony). In support of his interpretation, Reinke points out that article 46B.0095 is directed at the “offense” to be tried and that punishment enhancements, applicable only after a determination of guilt, are not components of the “offense.” Having been committed to a mental-health facility for more than twenty years for a second-degree felony offense, Reinke asserts that he is entitled to habeas relief. Because Reinke is incompetent to stand trial and is not expected to regain competency in the near future, he argues that the State must either release him or have him civilly committed pursuant to article 46B.0095(b).
The State contends that “maximum term” means the maximum amount of time for the offense tried, including any enhancements to punishment. Thus, the State argues, the maximum amount of time that Reinke could be committed lawfully — absent a civil commitment proceeding — is ninety-nine years or life, the maximum possible total sentence that Reinke could have received at trial for the indicted second-degree felony offense of attempted murder, increased by the punishment enhancements sought in the indictment.
See
Tex.Code Crim. Proc. Ann. art. 46B.0095(a);
see also
Tex. Penal Code Ann. §§ 12.42(b) (authorizing punishment enhancement for repeat felony offenders: “[I]f it is shown on the trial of a second-degree felony that the defendant has been once before convicted of a felony, on conviction he shall be punished for a first-degree felony”), 32(a) (West Supp.2010) (setting punishment range for first-degree felony at five to ninety-nine years or life);
Allen v. State,
Texas cases have not addressed the application of article 46B.0095 in the face of an offense enhanced by prior felonies. Considering this matter of first impression, we disagree with the State’s argument that the maximum term of commitment under article 46B.0095(a) goes beyond the maximum term for the indicted offense to include increased time for punishment enhancements. Such an interpretation would be contrary to the statute’s plain language, which correlates calculation of an accused’s “maximum term” of commitment not to the total potential punishment, but to the indicted offense:
(a) A defendant may not, under this chapter, be committed to a mental hospital ... for a cumulative period *379 that exceeds the maximum term provided by law for the offense for which the defendant was to be tried.
[[Image here]]
Id. art. 46B.0095(a) (emphasis added). The legal limit (“maximum term provided by law”) is modified by the phrase “for the offense for which the defendant was to be tried.” Presuming as we must that each word in the statute has a purpose, we conclude that the plain language of article 46B.0095(a) prohibits commitment of an accused to a mental-health facility for a duration that exceeds the maximum amount of time prescribed for the offense for which the accused was to stand trial, not including time added for any enhancements that might serve to increase the ultimate verdict on punishment.
A useful distinction between an “unen-hanced offense” and an “enhanced punishment” was illuminated recently, albeit in a different context, by the Texas Court of Criminal Appeals. In
Ford v. State,
the Court analyzed statutory language in the code of criminal procedure and the penal code to determine whether a defendant’s prior conviction for the same crime increased the level of his current offense, or merely the level of his punishment.
The Court’s conclusion that penal code section 12.42 enhances punishment — but not the level of the offense — is significant here. The State cites subsection 12.42(b) to support its contention that Reinke’s maximum term of commitment under article 46B .0095(a) is the enhanced term of ninety-nine years or life.
See
Tex. Penal Code Ann. §§ 12.42(b) (enhancing punishment from second-degree felony to first-degree felony if defendant had prior felony conviction), .32(a) (setting first-degree punishment range at five to ninety-nine years or life). To adopt the State’s position, we must disregard the holding of the Court of Criminal Appeals that enhancements under chapter 12.42 increase punishment, but not the offense level. The State’s position is also inconsistent with the well-established principle that prior offenses alleged to enhance punishment are not re-tried: “ ‘The prisoner is not tried over again for his first offense’.... ‘A statement of a previous conviction does not charge an offense. It is only the averment of a fact which may affect the punishment.’ ”
Williams v. State,
Accepting the State’s interpretation of article 46B .0095(a) would require us to add language allowing consideration of possible enhancements to punishment and to omit the language limiting the maximum term to the offense to be tried. But when — as here — a statute is clear and unambiguous, “the Legislature must be understood to mean what it has expressed, and it is not for the courts to add or subtract from such a statute.”
Tapps v. State,
Our conclusion also comports with the plain meaning of the words used in article 46B.0095. If the Legislature intended punishment enhancements to be included in the calculation of a defendant’s maximum term of mental-health care commitment before trial, the Legislature could have used language such as “maximum punishment,” as it has done in other statutes. See, e.g., Tex.Code Crim. Proc. Ann. art. 27.15 (West 2006) (allowing change of venue under certain circumstances for defendant who seeks to plead guilty or nolo contendere when he is “charged with a felony and the maximum punishment therefor shall not exceed fifteen years”) (emphasis added); Tex. Water Code Ann. § 7.188 (West 2008) (“If it is shown at the trial of the defendant that the defendant has previously been convicted of the same offense under this subchapter, the maximum punishment is doubled with respect to both the fíne and confinement ....”) (emphasis added). Alternatively, if the Legislature intended to include punishment enhancements, it could have omitted “for the offense for which the defendant was to be tried” and simply ended subsection (a) with the phrase “maximum term provided by law.”
Maximum sentence in plea admonishments
The State argues that its interpretation of article 46B .0095(a) aligns with the law addressing the maximum-possible-sentence admonishment that trial courts must give to defendants who plead guilty.
See
Tex. Code Crim. Proc. Ann. art. 26.13(a)(1) (West Supp.2010) (requiring trial court to admonish defendant of punishment range “attached to the offense” before accepting defendant’s plea of guilty or nolo contende-re);
Taylor v. State,
CONCLUSION
The plain language of article 46B.0095(a) of the Texas Code of Criminal Procedure limits commitment to the maximum term for the offense for which the defendant *381 was to be tried. We conclude that the “maximum term” calculation does not include any potential punishment enhancements that the defendant may have received had a jury found him guilty and found punishment enhancements to be true. When that maximum term is reached, article 46B .0095(b) provides that the defendant’s commitment in the State mental-health system may be extended only through civil commitment proceedings. Tex. Code Crim. Proc. Ann. art. 46B.0095(b). 4 Such a conclusion follows the statutory scheme and the specific text adopted by the Legislature and considers the statute’s words and phrases in context.
Accordingly, we sustain Reinke’s sole issue. We reverse the district court’s order denying habeas corpus relief and remand this case to the district court for further proceedings consistent with this opinion.
Notes
. A person is incompetent to stand trial if he does not have sufficient present ability to consult with his lawyer with a reasonable degree of rational understanding, or if he does not have a rational and factual understanding of the proceedings against him. Tex.Code Crim. Proc. Ann. art. 46B.003(a) (West 2006);
Pitonyak v. State,
. The parties do not dispute that Retake is still incompetent to stand trial and is not likely to regain competency in the near future. Thus, while they cite the available options as release or further commitment, neither cites the third potential option that could arise on different facts under the commitment statutes-putting the defendant to trial pursuant to the indictment.
. Federal cases interpreting language such as "maximum term authorized’’ or "maximum term of imprisonment” do not inform our decision either.
Cf. U.S. v. Rodriquez,
. Placement for the defendant’s civil commitment, when criminal charges remain pending, must be a maximum-security unit of a mental-health facility when-as here-the indictment alleges an affirmative finding that the defendant used a deadly weapon in the commission of a felony offense. Tex.Code Crim. Proc. Ann. arts. 46B. 104(2); 42.12 § 3g(a)(2) (West Supp.2010).
