
119 S.W.3d 814 (2003)
The STATE of Texas, Appellant,
v.
Jeremy MUNGIA, Appellee.
No. 0665-02.
Court of Criminal Appeals of Texas.
November 5, 2003.
*815 Linda J. Rhodes-Schauer, Corpus Christi, for Appellant.
Matthew Paul, State's Attorney, Austin, for State.

OPINION
PRICE, J., delivered the opinion of the Court, in which KELLER, P.J., and MEYERS, WOMACK, JOHNSON, HOLCOMB, and COCHRAN, J.J., joined.
This case comes before us on petition for discretionary review by the State of Texas to decide whether a trial court may dismiss an indictment, to protect a defendant from retaliation, without the consent of the State. We conclude that a trial court abuses its discretion by dismissing a charging instrument without the consent of the State to protect a defendant from retaliation in prison where no constitutional violation has occurred.
The appellee, Jeremy Mungia, was indicted on one count of murder and one count of engaging in organized criminal activity. Tex. Penal Code § 19.02; Tex. Penal Code § 71.02(a)(1). The appellee pled guilty pursuant to a plea agreement in which he agreed to testify at the trials of former gang members in return for the State's recommendation on punishment of ten years in prison. The trial court accepted *816 the appellee's plea but postponed sentencing until after he testified in the other cases. All parties agreed that the appellee more than fulfilled his obligations under the plea agreement. After finding that the appellee had "rendered a tremendous public service to the community," the trial court dismissed the indictment with prejudice stating:
The Court further finds that to follow the plea bargain agreement and sentencing the Defendant to prison, even for a reduced term, would place the Defendant in constant danger and risk his life daily. Under these circumstances, the Court cannot follow the plea agreement. Accordingly, in light of the foregoing, the Court concludes that it would be in the best interests of justice that the Indictment be dismissed and that the Defendant should be discharged and released from custody without further prosecution.
State v. Mungia, 76 S.W.3d 570, 571 (Tex. App.-Corpus Christi 2002).
The State appealed, arguing that the trial court erred in dismissing the indictment without the consent of the State. The Court of Appeals upheld the dismissal citing State v. Terrazas, 962 S.W.2d 38 (Tex.Crim.App.1998). Mungia, 76 S.W.3d at 571. Because the Court of Appeals incorrectly applied our decision in Terrazas, we reverse.
The issue in this case is whether a trial court has the authority to dismiss an indictment, to protect a defendant from retaliation, without the consent of the State. It is well established that there is no general authority that permits a trial court to dismiss a case without the prosecutor's consent. Terrazas, 962 S.W.2d at 40; State v. Frye, 897 S.W.2d 324, 331 (Tex.Crim.App.1995); State v. Johnson, 821 S.W.2d 609, 613 (Tex.Crim.App.1991); State v. Anderson, 119 Tex. 110, 26 S.W.2d 174 (Tex. Comm'n App.1930). However, a trial court may dismiss a charging instrument under certain circumstances.
In Frye, we stated: "Johnson stands for the proposition that a trial court's authority to act is limited to those actions authorized by constitution, statute or common law." 897 S.W.2d 324, 330 (Tex.Crim.App.1995). Therefore, with no inherent authority for a trial court to dismiss a charging instrument without the consent of the State, a court must gain its authority to do so from one of these sources.
In certain instances, dismissal may be the only means of adequately protecting an individual's rights against infringement by the State. Accordingly, we have recognized that a trial court has the power to dismiss a case without the State's consent "when a defendant has been denied a right to a speedy trial, when there is a defect in the charging instrument, or pursuant to Article 32.01, when a defendant is detained and no charging instrument is properly presented." Johnson, 821 S.W.2d at 612 n. 2. Additionally, a charging instrument may be dismissed to remedy a violation of the Sixth Amendment right to counsel. Frye, 897 S.W.2d at 331. In the context of a Sixth Amendment violation, a trial court may properly dismiss a charging instrument if "a defendant suffers demonstrable prejudice, or a substantial threat thereof, and where the trial court is unable to identify and neutralize the taint by other means." Frye, 897 S.W.2d at 330 (citing United States v. Morrison, 449 U.S. 361, 365, 101 S.Ct. 665, 66 L.Ed.2d 564 (1981); Terrazas, 962 S.W.2d at 41). However, a trial court's powers to dismiss a charging instrument are not limited to these four. Terrazas, 962 S.W.2d at 41.
The test we applied in Frye was a test specifically "tailored to the constitutional *817 violation identified in that particular situation and the taint of that particular constitutional violation to be neutralized." Terrazas, 962 S.W.2d at 42. This does not mean that the dismissal of an indictment as a remedy is only appropriate in circumstances already recognized by this Court. Rather, as we explained in Frye and Terrazas, although a particular constitutional violation has not yet been recognized as a basis for a trial court to dismiss a charging instrument, this does not preclude a trial court from having authority to dismiss on that ground. Frye, 897 S.W.2d at 330; Terrazas, 962 S.W.2d at 41.
While a trial court may dismiss a charging instrument to remedy a constitutional violation, the dismissal of an indictment is "a drastic measure only to be used in the most extraordinary circumstances." Frye, 897 S.W.2d at 330. Therefore, where there is no constitutional violation, or where the appellee's rights were violated but dismissal of the indictment was not necessary to neutralize the taint of the unconstitutional action, the trial court abuses its discretion in dismissing the charging instrument without the consent of the State. Terrazas, 962 S.W.2d at 42.
In this case, the trial court dismissed the indictment against the appellee to protect him from being killed in retaliation for his testimony against gang members. The Court of Appeals affirmed the ruling of the trial court citing the possibility that the appellee might be killed as a claim "of constitutional magnitude." Mungia, 76 S.W.3d at 572. The Court of Appeals reasoned that "if sent to prison Mungia will be killed by gang member inmates, and thus be subjected to cruel and unusual punishment contrary to the Eighth Amendment." Ibid. The Court of Appeals held that the trial court had no viable options other than to dismiss the indictment. Ibid.
In upholding the dismissal of the indictment, the Court of Appeals erred by applying a drastic remedy without first finding a constitutional violation. Following Frye and Terrazas, it is possible that a court could dismiss a charging instrument to remedy a constitutional violation. However, in this case, no constitutional violation has occurred. Rather, the Court of Appeals determined that the risk of the appellee being killed in prison is tantamount to cruel and unusual punishment and a violation of the Eighth Amendment.
The dismissal of an indictment is a drastic remedy that should only be used in the most extraordinary cases. According to the Court of Appeals, the trial court dismissed the indictment in anticipation of a future constitutional violation. While a trial court does have the authority to dismiss a charging instrument even when an unrecognized violation has occurred, we decline to extend this authority to constitutional violations that could possibly occur in the future.
In this case, the trial court was concerned that, during appellee's future sentence, the Texas Department of Criminal Justice would be unable to adequately protect him from his enemies. The constitutional violation that the Court of Appeals seeks to remedy through dismissing the indictment is purely speculative. Further, while the trial court's concern with the safety of the appellee is laudable, safety concerns alone do not give rise to a trial court's authority to dismiss an indictment without the consent of the State. Following our decision in Terrazas, where no constitutional violation has occurred, the trial court abused its discretion in dismissing the charging instrument. Because there was no constitutional violation in this case, the trial court erred in dismissing the indictment without the consent of the State.
*818 We recognize that after accepting the defendant's guilty plea, the trial court was left with few alternatives to protect the appellee from retaliation other than to dismiss the indictment. Had the court openly rejected the appellee's plea agreementan option still available to the trial judge and allowed him to withdraw his plea pursuant to Texas Code of Criminal Procedure, Article 26.13(a)(2), the court would have had other options available to protect the appellee from retaliation. For example, while a judge may not order community supervision to a defendant adjudged guilty of murder, Article 42.12 § 3g, under Article 42.12 § 5(a), a judge may order deferred adjudication before an adjudication of guilt "when in the judge's opinion the best interest of society and the defendant will be served...." Alternatively, the trial court in this case could have found the appellee guilty of a lesser-included offense, acquitting him of the greater offense in accordance with Article 37.08. If the appellee were convicted of a lesser-included offense, then the court could sentence the appellee to community supervision that would otherwise be unavailable to a defendant convicted of murder, see Tex.Code Crim. Proc. art. 42.12 § 3g, or to confinement equal to the time that the appellee already has been confined. In addition, if the trial court is concerned for a particular defendant's safety, the judge should consider a conviction for a lesser-included offense that would allow the defendant to be eligible for out-of-state probation or parole supervision. See generally Tex.Code Crim. Proc. art. 42.11. In sum, committing error through dismissal of the indictment, absent constitutional violation or consent of the State, was not the trial court's only viable option to protect the appellee from retaliation in this case.
The Court of Appeals's judgment is reversed. We remand the case to the trial court with orders to reinstate the indictment.
KEASLER and HERVEY, J.J., concurred in the judgment.
