OPINION ON REHEARING
JOHN CAYCE, Chief Justice.On our own motion, we withdraw our memorandum opinion and judgment of November 3, 2005 and substitute the following.
Appellant Vanessa Kaye LaMar filed a pretrial application for writ of habeas corpus alleging a violation of her right to a speedy trial, and the trial court denied relief. In two issues, appellant asserts that the trial court erred by denying relief because the court’s failure to provide her a speedy trial violated the Sixth Amendment and article I, section 10 of the Texas Constitution. We affirm.
In November 2003, appellant pleaded no contest to a class B misdemeanor possession of marijuana charge and received one year of deferred adjudication community supervision. In January 2004, appellant was arrested on a second charge of marijuana possession, and the State filed a motion to proceed to adjudication on the first offense on February 2, 2004.
On February 22, 2005, appellant filed an application for writ of habeas corpus, complaining that her constitutional right to a speedy trial had been violated. The same day, the trial court stated it would set the case for trial and denied habeas corpus relief after taking notice of appellant’s evidence.1 Appellant then announced that she was going to appeal the trial court’s denial of relief and asked the court not to set the case for trial until the appeal had been decided. Appellant now argues, however, that the trial court erred when it denied her relief because she has not been afforded her constitutional right to a speedy trial.
The court of criminal appeals has held that a defendant may use a pretrial writ of habeas corpus in very limited circumstances.2 The court has further held that *324these circumstances do not include an attempt to seek dismissal of a proceeding on speedy trial grounds because the defendant has an adequate remedy at law and, therefore, has no need for the drastic remedy of habeas corpus.3 Instead, a defendant should file a motion to set aside the indictment in the trial court pursuant to article 27.08 of the Texas Code of Criminal Procedure, and, if the trial court erroneously denies the motion, the defendant may appeal from any conviction that resulted from the continued prosecution.4
The dissenting and concurring opinion contends that it “makes no sense” to require the State and appellant to endure the time and expense of a trial and appeal when appellant’s speedy trial complaint can be settled in a pretrial habeas proceeding.5 In addressing this concern, however, the United States Supreme Court has observed:
There perhaps is some superficial attraction in the argument that the right to a speedy trial ... must be vindicated before trial in order to insure that no nonspeedy trial is ever held. Both doctrinally and pragmatically, however, this argument fails. Unlike the protection afforded by the Double Jeopardy Clause, the Speedy Trial Clause does not, either on its face or according to the decisions of this Court, encompass a “right not to be tried” which must be upheld prior to trial if it is to be enjoyed at all. It is the delay before trial, not the trial itself, that offends the constitutional guarantee of a speedy trial. If ... an accused [is deprived] of his right to a speedy trial, that loss, by definition, occurs before trial. Proceeding with the trial does not cause or compound the deprivation already suffered.6
We hold that appellant has an adequate remedy at law; therefore, she is not entitled to habeas relief. We therefore overrule appellant’s issues and affirm the trial court’s judgment.
DAUPHINOT, J. filed a dissenting and concurring opinion.
WALKER, J. concurs without opinion.
. See Ex parte Hargett, 819 S.W.2d 866, 868 (Tex.Crim.App.1991).
. See e.g., Ex parte Smith, 178 S.W.3d 797, 801 (Tex.Crim.App.2005) (noting the limited circumstances in which a defendant may use a pretrial writ of habeas corpus: (1) to challenge the State’s power to restrain him; (2) to challenge the denial or conditions of bail; and (3) to raise certain issues, which, if meritorious, would bar prosecution or conviction); Smith v. Gohmert, 962 S.W.2d 590, 593 n. 7 (Tex.Crim.App.1998) (orig.proceeding) (hold*324ing that when relator sought writ of mandamus to compel trial court to either set his case for trial or dismiss the indictment pending against him, relator had no adequate remedy at law and was entitled to have his case set for trial (citing Chapman v. Evans, 744 S.W.2d 133, 135 (Tex.Crim.App.1988))).
.See Smith, 962 S.W.2d at 593 (holding that when appellant claimed his state and federal rights were violated, he had an adequate remedy at law and was not entitled to habeas corpus relief); see also Ex parte Weise, 55 S.W.3d 617, 620 (Tex.Crim.App.2001) (noting that the court of criminal appeals has held "that an applicant may not use a pretrial writ to assert his or her constitutional rights to a speedy trial"); Ex parte Williams, No. 04-05-00386-CV, 2005 WL 1458687, at *1 (Tex.App.-San Antonio June 22, 2005, no pet.) (mem.op.) (not designated for publication); In re Evans, No. 04-05-005 63-CV, 2005 WL 2012772, at *1 (Tex.App.-San Antonio Aug.24, 2005, no pet.) (mem.op.) (not designated for publication) (both holding that defendant may not use pretrial habeas corpus to obtain dismissal of criminal charges on speedy trial grounds).
. Smith, 962 S.W.2d at 592 (citing Pope v. Ferguson, 445 S.W.2d 950, 955-56 (Tex.1969)). Of course, a defendant who successfully establishes a speedy trial claim in a motion to dismiss will not be tried. United States v. MacDonald, 435 U.S. 850, 861 n. 8, 98 S.Ct. 1547, 1553 n. 8, 56 L.Ed.2d 18 (1978).
. Dissenting and concurring op. at 326.
. MacDonald, 435 U.S. at 860-61, 98 S.Ct. at 1552-53 (1978); accord Smith, 962 S.W.2d at 593.