
324 S.W.3d 501 (2010)
STATE of Missouri ex rel. Jeffrey THURMAN, Relator,
v.
Honorable Kenneth W. PRATTE, Judge of the Circuit Court, 24th Judicial Circuit, Division II, Farmington, Missouri, Respondent.
No. ED 95387.
Missouri Court of Appeals, Eastern District, Writ Division Six.
November 9, 2010.
*502 Thomas Marshall, Donald Catlett, Co-Counsel, Columbia, MO, for relator.
Kevin Zoellner, Jefferson City, MO, Wendy Horn, Co-Counsel, Farmington, MO, for respondent.
NANNETTE A. BAKER, Presiding Judge.

Introduction
Jeffrey Thurman ("Relator") filed a petition for a writ of prohibition or in the alternative, a writ of mandamus to prohibit the Honorable Kenneth W. Pratte ("Respondent") from ordering that Relator submit to a mental examination by the State. The issue before this court is whether Respondent has the authority to order a mental examination of Relator regarding his mental state at the time of the alleged criminal conduct after Relator disclosed an expert report concluding that he is mentally retarded. We issued a preliminary writ in prohibition. We now hold that Respondent exceeded his authority in ordering the mental examination and make the preliminary writ permanent.

Factual and Procedural Background
The State charged Relator with one count of murder in the first degree,[1] in violation of Section 565.020,[2] for the beating death of Ricky Haynes. The State also filed a "Notice of Intent to Seek the Death Penalty" pursuant to Section 565.005. Relator entered a plea of not guilty to the charge. Relator did not enter a plea of not guilty by reason of mental disease or defect excluding responsibility nor did he file any written notice that he intended to rely on such a defense.
Relator's counsel however did disclose to the State a report prepared by Dr. Stephen Greenspan, a licensed psychologist. In the report, Dr. Greenspan concluded that Relator is mentally retarded as defined by Section 565.030.6 RSMo. Supp. 2006.[3] In response, the State filed a motion *503 with Respondent seeking an order "directing that a mental examination of [Relator] be done by a psychologist or psychiatrist of the State's choosing pursuant to Section 552.030 ... and to have a written report filed...."
Respondent conducted a hearing on the State's motion. The State argued that it was entitled to a mental evaluation because Relator, through the disclosure of Dr. Greenspan's opinion, "called into question his mental status and whether he is criminally responsible for these actions...." In response, Relator contended that the State cannot obtain a mental evaluation of Relator without a plea of not guilty by reason of mental disease or defect excluding responsibility, written notice of intent to so plead, or a showing he was incompetent to stand trial. Relator asserted that Dr. Greenspan's finding that Relator is mentally retarded only affects his eligibility for the death penalty pursuant to Section 565.030.4. and is distinct from a plea of not guilty by reason of mental disease or defect, written notice of Relator's intent to enter such a plea, or a claim of incompetence to stand trial.
After the hearing, Respondent issued an "Order for Psychiatric Examination of Defendant." In the order, Respondent found, inter alia, that the "State has the right to have a mental examination conducted by a psychiatrist or psychologist of their own choosing upon notice that the accused may rely upon the defense of mental disease or defect excluding responsibility under both Chapter 552 and the Court's inherent authority." Respondent also ordered that Relator "submit and cooperate with an examination by doctors assigned by the Department of Mental Health" and that a "report of the findings of said examination shall be made to the Court." Respondent ordered that the report shall include:
An opinion as to whether at the time of the alleged criminal conduct the accused, as a result of mental disease or defect, did not know or appreciate the nature, quality, or wrongfulness of his conduct or as a result of mental disease or defect was incapable of conforming his conduct to the requirements of law[.]
Relator filed the instant petition seeking an order in prohibition or in the alternative, in mandamus "to prohibit Respondent from ordering that Relator submit to a psychiatric evaluation by the State, pursuant to § 552.020 or § 552.030, or, alternatively, to order that Respondent deny the State's motion for such an evaluation." Upon our request, the State filed suggestions in opposition to the petition on behalf of Respondent.

Discussion
The extraordinary remedy of a writ of prohibition[4] is appropriate to "remedy an excess of authority ... where the lower court lacks the power to act as intended...." State ex rel. Mo. Pub. Defender Comm'n v. Pratte, 298 S.W.3d 870, 880 (Mo. banc 2009). Whether a trial court exceeded its authority is a question of law, which we review independently. Id. at 881. When a trial court exceeds its authority in ordering that a defendant should undergo a mental examination, a writ of prohibition should issue to prohibit enforcement of the trial court's order. State ex rel. Proctor v. Bryson, 100 S.W.3d 775, 777-78 (Mo. banc 2003).
*504 Relator contends that a writ of prohibition is necessary because Respondent exceeded his authority by ordering Relator to submit to a mental examination. Relator specifically argues that because he has neither pled nor given written notice of his intent to plead not guilty by reason of mental disease or defect excluding responsibility, Respondent did not have any authority to order an examination as to Relator's mental state at the time of the alleged criminal conduct.
Rule 25.06(B)[5] generally allows a trial court to order a mental examination of a defendant upon good cause being shown.[6]State ex rel. Westfall v. Crandall, 610 S.W.2d 45, 47 (Mo.App. E.D.1980); see also State v. Boyd, 143 S.W.3d 36, 44 (Mo.App. W.D.2004). However, Sections 552.020 and 552.030 mandate specific prerequisites before a trial court may order a mental evaluation regarding a defendant's mental state at the time of the alleged criminal conduct. See State ex rel. Proctor, 100 S.W.3d at 777-78.
Section 552.030 provides that a trial court, after notice and upon motion of either the State or the defendant, has the authority to order a mental examination of a defendant whenever he or she pleads "not guilty by reason of mental disease or defect excluding responsibility" or files "a written notice of such [defendant's] purpose to rely on such defense [.]" Section 552.030.2-.3. The report of this examination shall include:
an opinion as to whether at the time of the alleged criminal conduct the [defendant], as a result of mental disease or defect, did not know or appreciate the nature, quality, or wrongfulness of his conduct or as a result of mental disease or defect was incapable of conforming his conduct to the requirements of law.
Section 552.020.4. The trial court may order an "evaluation as to the defendant's mental state at the time of the alleged criminal act" only if the defendant entered a plea of not guilty by reason of mental disease or defect or filed the written notice provided in Section 552.030.2. See State ex rel. Proctor, 100 S.W.3d at 777-78.
Here, Respondent ordered an examination regarding Relator's mental state at the time of the alleged criminal conduct. As Respondent concedes, Relator did not plead not guilty by reason of mental disease or defect excluding responsibility nor file written notice of his purpose to rely on that defense. Relator merely disclosed a report concluding that he is mentally retarded as defined by Section 565.030. Therefore, Respondent exceeded his authority because a trial court may not order an evaluation as to the defendant's mental state at the time of the alleged crime without the required plea or written notice. State ex rel. Proctor, 100 S.W.3d at 777-78.
Respondent argues that the report's finding that Relator is mentally retarded is the "functional equivalent" of the required plea or notice. Respondent's argument is incorrect because Section 565.030, the statutory section on which Dr. Greenspan based his report, does not allow a defendant to plead that he or she is not guilty by reason of mental disease or defect excluding responsibility. Instead, *505 Section 565.030 eliminates the death penalty as a potential sentence "[i]f the trier finds by a preponderance of the evidence that the defendant is mentally retarded [.]"[7] Section 565.030.4(1).[8] A finding that a defendant is mentally retarded for the purposes of Section 565.030 "relates solely to the punishment and not to [a defendant's] guilt for first-degree murder." State v. Johnson, 244 S.W.3d 144, 152 (Mo. banc 2008).
Because Respondent did not have the authority to compel Relator to submit to a mental examination regarding his mental state at the time of his alleged criminal conduct, a writ of prohibition is appropriate to prevent Respondent from enforcing the order. State ex rel. Proctor, 100 S.W.3d at 777-78. We therefore need not address Relator's argument that Respondent exceeded his authority by ordering an examination regarding Relator's competence to stand trial.

Conclusion
For the foregoing reasons, we make permanent our preliminary writ of prohibition ordering Respondent not to enforce the order directing Relator to submit to a mental examination.
ROY L. RICHTER, C.J., and PATRICIA L. COHEN, J., concur.
NOTES
[1]  The State also charged Movant with two counts of stealing, but these counts are not relevant to Relator's instant petition.
[2]  All statutory references are to RSMo.2000, unless otherwise indicated.
[3]  Dr. Greenspan's report states "Section 564.030." However, "Section 564.030" does not exist, and the statutory language quoted in the report is taken from Section 565.030.6. We will therefore assume Dr. Greenspan made a typographical error.
[4]  Although Relator's petition sought a writ of mandamus in the alternative, this court may choose which type of writ to apply. State ex rel. Unnerstall v. Berkemeyer, 298 S.W.3d 513, 516 (Mo. banc 2009). Because we believe a writ of prohibition is the appropriate writ to prohibit enforcement of the order, we will not discuss the applicability of a writ of mandamus.
[5]  All rule references are to Mo. Sup.Ct. R. (2010), unless otherwise indicated.
[6]  Because Relator disclosed Dr. Greenspan's report concluding that Relator is mentally retarded and such a finding affects Relator's eligibility for the death penalty, the trial court could find that good cause exists under Rule 25.06(B) to order a pretrial mental examination of Relator regarding his claim of mental retardation for the purposes of Section 565.030.
[7]  Contrary to Respondent's order, it is a defendant's burden to prove that he or she is mentally retarded for the purpose of avoiding the death penalty. State v. Johnson, 244 S.W.3d 144, 150-51 (Mo. banc 2008).
[8]  In State v. Whitfield, the Missouri Supreme Court found Section 565.0304 RSMo.1994 to be unconstitutional. 107 S.W.3d 253, 261-62 (Mo. banc 2003) However, the legislature amended Section 565.030.4(1) in 2001 to prohibit the execution of a mentally retarded defendant. Id. at 259 n. 5. Section 565.030.4(1) RSMo. Supp.2006, the version of the law on which we rely, has not been found to be unconstitutional.
