
990 S.W.2d 455 (1999)
In re Paul Ray DAVIS.
No. 10-99-030-CR.
Court of Appeals of Texas, Waco.
April 8, 1999.
*456 Ted Redington, Waxahachie, for relator.
Joe F. Grubbs, County & Dist. Atty., Waxahachie, real party in interest.
Gene Knize, Waxahachie, for respondent.
Before Chief Justice DAVIS, Justice VANCE, and Justice GRAY.

OPINION
TOM GRAY, Justice.
Paul Ray Davis was convicted and sentenced in accordance with a plea agreement. Davis did not seek a new trial. Can the trial court order a new trial on its own motion? Because we find that a trial court does not have authority to grant a new trial in a criminal case unless it is requested by the defendant, we hold that the order granting a new trial on the court's motion is void and conditionally grant the writ of mandamus.

FACTUAL BACKGROUND
A grand jury indicted Davis for possession of one gram or more, but less than four grams of a controlled substance. See TEX. PEN.CODE ANN. § 481.115(c) (Vernon *457 Supp.1999). Davis filed a motion to suppress alleging a lack of probable cause to support the search warrant under which the police obtained evidence in his case. After a hearing, Respondent overruled the motion.
Davis then pleaded guilty to the charges. Pursuant to a plea agreement, Respondent sentenced Davis to eight years' imprisonment and a fine, suspended imposition of sentence, and placed him on community supervision for eight years. Davis gave notice of appeal seeking review of Respondent's ruling on the suppression motion. See TEX.R.App. P. 25.2(b)(3)(B). The day after the notice of appeal was filed, Respondent ordered a hearing to determine if a new trial should be granted. Respondent stated in this order that he would not have approved the plea bargain agreement had he known Davis intended to appeal the suppression ruling. The order directed Davis, his attorney, and the prosecutor to appear for a hearing "on whether a new trial should be granted."
At the conclusion of the hearing Respondent granted his own motion, setting aside the judgment and ordering a new trial. Davis filed an application with Respondent for habeas relief alleging Respondent's new trial order is void and that subjecting him to a second trial for the same offense constitutes double jeopardy. According to Davis, Respondent advised that he would not consider the habeas application until after the second trial. The State does not attempt to refute this allegation.
Davis commenced this mandamus proceeding seeking to prohibit the trial court from proceeding with the second trial. We granted his request for temporary relief, staying any further proceedings in the court below pending disposition of the mandamus petition.

APPLICABLE LAW
To be entitled to mandamus relief, a relator must establish that (1) he has no adequate remedy at law, and (2) the act sought to be compelled is purely ministerial. Alvarez v. Eighth Court of Appeals, 977 S.W.2d 590, 591 (Tex.Crim.App.1998).
The State contends that we cannot consider Davis' claim because he has an adequate remedy at law. When a judge refuses to issue a requested habeas writ or denies a hearing on the merits of the claim, an applicant may "present the application to another district judge having jurisdiction, or under proper circumstances,... pursue a writ of mandamus." Ex parte Hargett, 819 S.W.2d 866, 868 (Tex. Crim.App.1991).
A technically available legal remedy will not defeat a petitioner's entitlement to mandamus relief when the remedy is "so uncertain, tedious, burdensome, slow, inconvenient, inappropriate or ineffective as to be deemed inadequate." State ex rel Holmes v. Court of Appeals, 885 S.W.2d 389, 394 (Tex.Crim.App.1994) (quoting Smith v. Flack, 728 S.W.2d 784, 792 (Tex. Crim.App.1987)); Kozacki v. Knize, 883 S.W.2d 760, 762 (Tex.App.Waco 1994, orig. proceeding).
Given the short period of time before the date for the second trial as scheduled by the Respondent, in which Davis would have to seek the requested relief, and the difficulties inherent in locating another district judge to rule on the merits of his habeas application and to then obtain appellate review in the event of a denial of the application, we conclude the theoretical habeas remedy available to Davis is inadequate in these circumstances. See Thi Van Le v. Perkins, 700 S.W.2d 768, 776 (Tex.App.Austin 1985, orig. proceeding), mandamus denied sub nom. Perkins v. Court of Appeals, 738 S.W.2d 276 (Tex. Crim.App.1987).
The State also suggests Davis has an adequate legal remedy via his direct appeal after another trial. Davis responds he would be improperly subjected to a second trial for the same crime in violation of the prohibition against double jeopardy before the issue could be reviewed by this *458 Court. Mandamus is the proper remedy to prevent a second trial, if the order is void as alleged. Id. at 277. We must determine if the order is void to determine if mandamus is available to Davis.
The Court of Criminal Appeals held in Zaragosa that a trial court does not have the authority to grant a new trial unless the defendant requests it. Zaragosa v. State 588 S.W.2d 322 (Tex.Cr.App.1979). Zaragosa did not rely upon a double jeopardy claim. The court analyzed Articles 40.02 and 40.03 of the Code of Criminal Procedure authorizing the trial court to grant a new trial and concluded that the trial court had no authority to grant a new trial on its own motion because there was no provision made for a new trial other than upon the request of the defendant. The Court of Criminal Appeals reviewed numerous cases from other jurisdictions that had held similar provisions gave the right to request a new trial in a criminal case exclusively to the defendant. Id. The Fort Worth Court of Appeals has recently applied Zaragosa to the Texas Rules of Appellate Procedure. Harris v. State, 958 S.W.2d 292, 293 (Tex.App.Fort Worth 1997, pet. ref'd).
Articles 40.02 and 40.03 of the Code of Criminal Procedure have been replaced by Rule 21 of the Texas Rules of Appellate Procedure. Rule 21.1 of the Rules of Appellate Procedure contains the same type language that has previously been construed to give the exclusive right to request a new trial in a criminal case to the defendant. Rule 21.1 states: "New trial means the rehearing of a criminal action after the trial court has, on the defendant's motion, set aside a finding or verdict of guilt." Tex.R.App. P. 21.1 (emphasis added). This court has previously stated that a trial court cannot grant a new trial in a criminal case on its own motion or the motion of the State. Stone v. State, 931 S.W.2d 394, 396 (Tex.App. Waco 1996, pet. ref'd).
We have found only one exception to this general rule in our research. This exception occurs when a defendant receives an illegal sentence and challenges that sentence on appeal or in a post-conviction habeas proceeding. Hern v. State, 892 S.W.2d 894, 896 (Tex.Crim.App.1994). If this one exceptional circumstance does not apply, any attempt by a trial court to grant a new trial in a criminal case "is a void act." Perkins, 738 S.W.2d at 280. This exception does not apply.
The State charged Davis with a third-degree felony, and the plea bargain originally accepted by Respondent called for a lawful sentence within the range provided for such offenses. The record before us contains an order granting a new trial. There was no motion for new trial filed by Davis. Respondent's order granting a new trial on his own motion is a void act. Davis has no other adequate legal remedy in these unique circumstances. Accordingly, we conditionally grant the relief sought. We do not reach the claim of double jeopardy. See Zaragosa, 588 S.W.2d, at 327
When a defendant reaches a plea agreement with the State and the trial court expressly accepts that agreement but then refuses to enforce the agreement, "the proper relief is either specific enforcement of the agreement, if it can be enforced, or withdrawal of the plea if it cannot." Perkins, 738 S.W.2d at 283-84; accord Ortiz v. State, 933 S.W.2d 102, 104 n. 3 (Tex.Crim.App.1996). Davis' plea agreement is enforceable. If the plea agreement is enforceable, mandamus will issue directing the trial court to enter judgment in accordance with the agreement. Perkins, 738 S.W.2d at 285.

APPLICATION
Respondent is directed to vacate his January 21, 1999, order granting a new trial and reinstate the judgment of conviction rendered on January 8, 1999. Confident that he will do so, the writ will issue only upon Respondent's failure to comply with this opinion.
