
153 S.W.3d 690 (2005)
In re: Shellie Denise GOOCH, Relator
Honorable Charles Mitchell, Respondent.
No. 12-04-00363-CV.
Court of Appeals of Texas, Tyler.
January 12, 2005.
*691 William Todd Hughey, Dallas, for relator.
*692 John C. Fisher, Longview, Sue Korioth, Dallas, for real party in interest.
Panel consisted of WORTHEN, C.J., GRIFFITH, J., and DeVASTO, J.

OPINION
DIANE DeVASTO, Justice.
Relator, Shellie Denise Gooch, seeks a writ of mandamus directing the Honorable Charles Mitchell, Judge of the 273rd District Court of Sabine County, to enforce the deferred adjudication orders signed on June 16, 2004 in trial court cause numbers 6094 and 6076, respectively. For the reasons set forth below, we conditionally grant the writ.

BACKGROUND
Gooch was charged by indictment with theft of over $20,000.00 but less than $100,000.00 (cause number 6076) and tampering with government records (cause number 6094). At a hearing on June 16, 2004, Gooch pleaded guilty to each charge pursuant to a plea agreement. In each cause, the trial court advised Gooch of her rights and questioned her regarding the voluntariness of her plea.
The court found that the evidence was sufficient in each cause to support a finding of guilt. In accordance with the terms of the plea agreement, the court, in each cause, deferred a finding of guilt for five years, fined Gooch $1,500.00, and specified additional conditions of her community supervision. In the theft case, the court also ordered restitution of $24,842.25, which Gooch tendered at the plea hearing.
After the trial court pronounced sentence, the district attorney informed the court that Gooch had signed an open letter to the County Clerk's Office and the people of Sabine County. He read the letter into the record after Gooch declined to do so. Gooch stated that she signed the letter. She also stated that some of the information in the letter was false, but was interrupted by her trial counsel before she could explain her comment.
In each cause, the trial court signed the plea papers, which were entered in the record along with a "Deferred Adjudication Order" signed on June 16. Each order reflected the sentence pronounced at the plea hearing.
Gooch wrote the following letter to the editor of the local newspaper, which was published on June 23, 2004:
Many of you are aware of the accusations and charges made against me. I wanted to take this opportunity to express my appreciation to everyone who supported me and stood by me through this last year. Words cannot express how much all of you mean to me. Your faith in me was not in vain and I will remember it always. However, we have decided to bring this year of turmoil to an end in the only way that we saw possible. It may not have ended in the way that it should have, and I had to say I did something that I did not do, but to carry this any further would have strained our family both emotionally and financially. And I was not willing to let that happen. I know many of you will not understand why we chose this route, but our family is more important than any piece of paper or any gossip. The incredible support of my husband, parents, and friends has given me the faith that this will all be all right. I would like you all to know that the letter of apology offered in court was not written by me, is untrue and written in someone's [sic] else's words for their benefit. I stated in court that it is untrue and was not my words or feelings and I stand by that. In every day of my life I have made a conscious effort to treat *693 every person I meet with dignity, respect, and honesty. For that I owe no apology. I hope whoever felt the need to write that letter finds peace through that act. I know that this was meant to embarrass me, but it failed entirely. I have nothing to be embarrassed about; I am only disappointed that untruths can be carried so far. As for my family and me, we have emerged stronger than ever. I pray many blessings on all of you and thank you greatly for your support and faith.
On July 9, 2004, the trial court, on its own motion, held a hearing in both cause numbers. The purpose of the hearing was to determine (1) whether the letter showed that Gooch's pleas were not entered freely and voluntarily and (2) whether the pleas should be accepted or set aside. Counsel for the State asserted that the letter brought into question the voluntariness of Gooch's pleas, impugned the integrity of the process, and provided cause for setting aside Gooch's pleas and proceeding to trial.
At the hearing, Gooch testified that everything she told the court at the plea hearing was true as to her pleas. She testified that the purpose of the letter in the newspaper was "strictly thanking for support and I did state in court that there were things in that letter [that was read in open court at the plea hearing] that were untrue." Specifically, she stated that, contrary to the statements in the letter, she never made an accusation toward people she worked with in the County Clerk's Office and she was never questioned by the Texas Rangers. She was subjected to intensive direct and cross examination and was also questioned by the trial court. Throughout the hearing, she maintained that her guilty pleas were voluntary and that she did not want her pleas set aside.
On July 15, 2004, the trial court signed an order in each cause setting aside Gooch's guilty plea. In cause number 6094, the order required the clerk to retain the restitution monies in an interest bearing account pending final disposition of the case. A jury trial was set for November 29, 2004 in cause number 6094. We stayed those proceedings pending disposition of Gooch's mandamus petition.

PREREQUISITES TO MANDAMUS
To prevail on her petition, a relator must first demonstrate that under the relevant facts and law, the act sought to be compelled is purely ministerial. State ex rel. Hill v. Court of Appeals for the Fifth Dist., 67 S.W.3d 177, 180 (Tex.Crim.App.2001). An act is "ministerial" if it does not involve the exercise of any discretion. If there is any discretion or judicial determination attendant to the act, it is not ministerial, nor is it ministerial if the trial court must weigh conflicting claims or collateral matters that require legal resolution. The law must spell out the duty to be performed with such certainty that nothing is left to the exercise of discretion or judgment. Even a trial court's ruling on a pure question of law is not subject to writ review where that law is unsettled or uncertain. Id. at 180-81.
Generally, a relator must also demonstrate that she has no adequate remedy by appeal. See id. at 180. However, where a trial court has a ministerial duty to enforce a plea agreement, the sua sponte withdrawal of a guilty plea is a void act. Perkins v. Third Court of Appeals, 738 S.W.2d 276, 280-81 (Tex.Crim.App.1987). Mandamus is the appropriate remedy when a trial court enters a void order. State ex rel. Holmes v. Court of Appeals for the Third Dist., 885 S.W.2d 389, 396 (Tex.Crim.App.1994). Consequently, we need only address the first requirement: whether the trial court had a ministerial duty to enforce the plea agreement.


*694 DISCUSSION

The court of criminal appeals has held that after accepting a plea of guilty and approving a plea bargain agreement, a trial court is "without any authority or power to do other than specifically enforce the agreement...."[1]Perkins, 738 S.W.2d at 283. Moreover, when a defendant enters a plea of guilty or nolo contendere pursuant to a plea bargain agreement with the prosecutor, and the plea is accepted and the agreement is approved by the trial judge, the defendant is entitled to specific enforcement if the agreement can be enforced, or, if not enforceable, is entitled to withdraw his plea. Id. These rules apply, even where the trial court attempts to set aside the plea before its plenary power expires. See id. at 278-80 (trial court required to enforce plea agreement where plea accepted by trial court on September 16 and set aside on September 30).
Here, the record reflects that at the plea hearing, Gooch stated, and the trial court found, that her guilty pleas were knowingly, intelligently, and voluntarily made. The trial court then sentenced Gooch according to the terms of the plea agreement and entered corresponding orders. Under these facts, we are constrained to apply Perkins.

CONCLUSION
Having applied Perkins, as we must, to the facts of this case, we hold that the trial court had a ministerial duty to enforce Gooch's plea agreement with the State. Consequently, the court was without authority to set aside the guilty plea and disposition in either case. Mandamus is an appropriate remedy where the trial court has entered a void order. Therefore, we conditionally grant the writ. We are confident that within ten days of the date of our opinion and order, the trial court will (1) vacate the July 15 order entered in cause number 6076 and in cause number 6094 setting aside Gooch's guilty plea and the disposition of the cause and (2) reinstate its June 16 "Deferred Adjudication Order" in each cause. The writ will issue only if it fails to do so. Our stay of November 29, 2004 in cause number 6094 is lifted.
Writ of mandamus conditionally granted.
NOTES
[1]  The court points out, however, that evidence in the record of any fraud in the inducement on the part of a defendant or the defendant's attorney might estop the defendant from seeking specific performance of the agreement. Perkins, 738 S.W.2d at 283. In the present case, the State does not assert estoppel.
