
756 S.W.2d 34 (1988)
John E. HORNER, Relator,
v.
Honorable Susan D. REED, Judge, 144th District Court of Bexar County, Respondent.
No. 04-88-00325-CV.
Court of Appeals of Texas, San Antonio.
July 20, 1988.
*35 Roy R. Barrera, Sr., Nicholas & Barrera, San Antonio, for relator.
Edward Shaughnessy, III, Asst. Criminal Dist. Atty., San Antonio, for respondent.
Before the court en banc.
BUTTS, Justice.
Relator, John E. Horner, seeks this Court to issue a writ of mandamus directing respondent, the Honorable Susan D. Reed, Judge of the 144th District Court of Bexar County, Texas, to rescind or modify conditions of probation which she imposed on relator.
Relator is the Mayor of the City of Shavano Park, Texas. He was charged by the Bexar County Grand Jury in a two-count indictment with violating TEX.ELEC. CODE ANN. § 251.015 (Vernon 1986), a class A misdemeanor, by using the City's funds for political advertising in order to defeat a tax rollback measure. Relator pleaded nolo contendere and, pursuant to a plea agreement, the trial court deferred adjudication of guilt and placed him on probation. Among the conditions imposed for the probation are the two involved in this writ: that relator will, within ten days of the granting of the deferred adjudication, "resign any elective office with the City of Shavano Park or any other elective office" and "will neither seek nor accept any elective office during the term of Deferred Adjudication." The term of the probation was for one year.
Relator moved respondent to modify the terms of probation. Respondent denied the motion and relator filed for relief with this Court. We granted leave to file and entered *36 a temporary injunction prohibiting Judge Reed from revoking relator's probation, pending the outcome of this proceeding.
In cases in which this Court is called upon to issue a writ of mandamus concerning a criminal law matter, the relator must meet a two-pronged test. He must show that he has no other adequate remedy and that the act he demands the trial court to undertake is ministerial rather than discretionary. Dickens v. Court of Appeals for the Second Supreme Judicial District of Texas, 727 S.W.2d 542, 549 (Tex.Crim.App. 1987); State ex rel. Millsap v. Lozano, 692 S.W.2d 470, 481 (Tex.Crim.App.1985). The Court of Criminal Appeals has distinguished the tests to be used for mandamus in criminal law versus civil law matters. The civil law test of a clear abuse of discretion as a basis upon which to grant relief by mandamus is not presently available to the courts of appeals in criminal law matters. Dickens v. Court of Appeals for the Second Supreme Judicial District of Texas, 727 S.W.2d at 549. Thus, in order to grant relator relief we must find that he has no other adequate remedy and that the trial court's act is strictly a ministerial one.
Clearly, relator meets the first test concerning no other adequate remedy. Article 42.12, Texas Code of Criminal Procedure,[1] provides for deferred adjudication. However, there is no appeal from an order deferring adjudication and placing a defendant on probation. McDougal v. State, 610 S.W.2d 509, 509 (Tex.Crim.App.1981). Thus, the only review available to a defendant from the conditions imposed by the trial court in a deferred adjudication case is for the defendant to seek an adjudication of guilt and then to appeal it. We find this is not an adequate remedy for relief from illegal conditions placed on the probationer. To pursue this remedy, the defendant would have to subject himself to potential conviction, a subsequent criminal record, possible loss of any probation, and the risk of the imposition of a fine and jail term. The first prong of the test is met.
Next, we reach the question of whether relator's requested relief involves a ministerial act, rather than a discretionary one.
Article 42.12, section 3d(a), provides that "[t]he court may ... require any reasonable terms and conditions of probation, including any of the conditions enumerated in Sections 6 and 6a of this Article." Section 6 is a list including such terms as "[c]ommit no offense against the laws of this State or of any other State or of the United States"; "[a]void injurious or vicious habits"; report to a probation officer; "[w]ork faithfully at suitable employment as far as possible"; etc. Section 6a provides for payment of certain fees by the probationer.
Pursuant to subsection 3d(a) the trial court is under a plain duty to impose conditions of probation which are reasonable. Reasonable conditions are those which bear some "reasonable relationship to the treatment of the accused [i.e., the prior charges against him or his rehabilitation] and the protection of the public." Tamez v. State, 534 S.W.2d 686, 691 (Tex. Crim.App.1976). The conditions that relator resign all elective offices currently held and that he not run for any elective office during the next year are, as a matter of law, unreasonable restrictions in this instance. Neither condition is one which would tend to protect the public nor one which is reasonably related to the treatment of the accused. Since neither probationary condition is reasonable, the trial court violated the mandate of article 42.12, section 3d(a), and thus violated her plain legal duty to impose reasonable conditions.
Further, since this is a deferred adjudication there has been no finding of guilt. The trial court is depriving relator of his office, and the electorate of the City of Shavano Park of their representative, without a finding of culpability on the charges involving official misconduct. The *37 Local Government Code provides a specific procedure for removal of a mayor from his office in a General-Law Municipality, such as the City of Shavano Park. TEX.LOC. GOVT.CODE ANN. § 21.002 (Vernon Supp.1988). The causes for removal are enumerated as is the procedure. Pursuant to the Local Government Code, a court made up of a majority of the aldermen will determine whether the mayor is guilty of the charges and will declare the office vacant if they find him guilty. TEX.LOC. GOVT.CODE ANN. § 21.002(f)-(h) (Vernon Supp.1988). The trial court, in commanding relator to vacate his office, has acted beyond her authority and has violated the terms of section 21.002. The two conditions are thus unreasonable.
We find that the trial court was under a plain legal duty to impose only reasonable conditions. This aspect of her duty is not discretionary. Relator meets the second prong of the test for issuance of a writ of mandamus in a criminal law matter.
The conditions requiring relator to resign from and refrain from seeking elective office are invalid. We are confident that Judge Reed will rescind these conditions of probation. The writ of mandamus will issue only in the event that she fails to do so. The temporary injunction, entered by this Court on June 24, 1988, enjoining Judge Reed from revoking the probation of relator, is dissolved.
The petition for writ of mandamus is conditionally granted.
CANTU, J., concurs with opinion.
ESQUIVEL, J., dissents and concurs with opinion.
DIAL, J., dissents with opinion.
CANTU, Justice, concurring.
I agree with the majority but would add that in my opinion the conditions of deferred adjudication complained of were unreasonable as a matter of law because they were framed in such a manner that the only way to test their reasonableness required that the accused forego the very benefit of the bargain that the plea bargain agreement sought to confer, and then only if the trial court granted "regular" probation with the same conditions.
In the normal course of things, a plea bargain agreement is strictly an undertaking between the State and the accused, and the only function of the court is to accept or reject such an agreement. Bargaining for the granting of deferred adjudication is another matter because it requires the participation of the trial court in order to consummate the deal. That is, a trial court is required to forgo its right to exercise its statutory discretion as to whether or not to grant probation. Such an agreement makes the trial court a party to the deal as much as the other parties because as a condition of the agreement the trial court is required to agree to probation in advance as a contractual matter and not as a matter of discretion. Cf. Kincaid v. State, 500 S.W.2d 487, 490 (Tex.Crim.App.1973) [Footnote 2., "... the trial judge should not participate in plea discussions."] Thus, it can be said that the trial court is as much an influence on the extraction of a guilty plea as is the State.[1]
As a practical matter, the accused loses nothing by entering a nolo contendere plea or a guilty plea in exchange for a promise, guaranteed by the Court, that his plea will never result in an adjudication of guilt as long as he abides by the conditions of deferred adjudication to be imposed by the court, conditions which, of course, have not been a part of the agreement and which are left up to the court's discretion.[2]
*38 As recognized by the majority, such conditions cannot be the subject matter of complaint by the accused because he submits to the trial court's exercise of discretion as a natural consequence of applying for deferred adjudication.
But every applicant for deferred adjudication, including one where deferred adjudication has summarily been guaranteed by the trial court, has a right to expect that conditions to be imposed are reasonable ones. TEX.CODE CRIM.PROC.ANN. art. 42.12, § 3d(a) (Vernon Supp.1988). Obviously no one would agree to be placed on deferred adjudication voluntarily, under conditions which are unreasonable, knowing that such conditions cannot be met without the loss of liberty or a valuable right, in this case the very thing bargained for.
Such is the predicament in which the trial court placed relator. The State argues that the relator has an adequate remedy at law because relator may move for adjudication in order to test the reasonableness of the condition on direct appeal. See TEX. CODE CRIM.PROC.ANN. art. 42.12, § 3d(b).[3] What the State advocates and what the trial court attempted to do, in my opinion, is to extract a plea of nolo contendere from the relator, with whatever legal ramifications and collateral consequences it may carry, upon a promise of illusory deferred adjudication.
It is illusory at best because such a bargain was apparently never intended to be conferred free of unreasonable conditions. Such a deal smacks of "bait and switch," something which has no place in criminal jurisprudence.
I agree that the conditions were also unreasonable for the reasons stated in the majority opinion. But I would grant the writ solely on the fact that a condition which requires the surrendering of a benefit bargained for in order to test its reasonableness calls for intervention by this Court through the writ of mandamus. I concur.
ESQUIVEL, Justice, dissenting and concurring.
I agree with the majority that relator has no adequate remedy at law. However, I cannot agree with the majority when it states that the condition placed upon relator to resign his office as mayor of the City of Shavano Park within ten (10) days of the granting of the deferred adjudication is unreasonable. We do not have in the record before us any evidence that the City of Shavano Park is a General-Law Municipality, or any other type of municipality for that matter. Therefore, the majority's statement that "the trial court, in commanding relator to vacate his office, has acted beyond her authority and has violated the terms of § 21.002" and finding such command to be unreasonable is not based on the evidence before us. TEX.LOC. GOV'T CODE ANN. § 21.002(f)-(h) (Vernon Supp.1988) applies only to a General-Law Municipality.
Even if it had been proven that the City of Shavano Park is a General-Law Municipality governed by the provisions of § 21.002, I still would not consider the court's resignation command an unreasonable condition. The trial court had before it an accused charged with having committed a criminal offense while acting as an officeholder. The accused entered a plea of "nolo contendere" to the charge, which is tantamount to a plea of guilty and an admission that what he is charged with did in fact occur. TEX.CODE CRIM.PROC. ANN. art. 27.02 (Vernon Supp.1988). How *39 can the majority fault the trial court for seeking to remove the relator from the position that got him in trouble in the first place? One of the objects of probation, regardless of whether it is regular probation or deferred adjudication probation, is to assist the probationer in his promise to rehabilitate himself. This, in my opinion, is what the court was attempting to do for relator when, as one of the conditions of probation, it commanded the relator to resign his position as mayor. I consider this condition a reasonable one and respectfully dissent with the majority's result concerning this condition.
As to the other condition commanding relator not to seek any public office, I agree with the majority that it is unreasonable and concur in the majority's result concerning this condition.
DIAL, Justice, dissenting.
I believe the defendant had an adequate remedy at law and that mandamus was therefore improper.
NOTES
[1]  All statutory references are to TEX.CODE CRIM.PROC.ANN. (Vernon Supp.1988), unless indicated otherwise.
[1]  Although the plea actually entered by relator was a plea of nolo contendere, the effect of such a plea is the same as one of guilty.
[2]  Art. 42.12, § 3d(c) provides in pertinent part:

... A dismissal and discharge under this section may not be deemed a conviction for the purposes of disqualifications or disabilities imposed by law for conviction of an offense,
. . . .
TEX.CODE CRIM.PROC.ANN. art. 42.12, § 3d(c) (Vernon Supp.1988).
[3]  Obviously, once the deferred adjudication is gone and an adjudication of guilty is entered, the conditions complained of no longer exist and as a practical matter there is nothing to challenge on appeal. Moreover, there is no guarantee that relator will be bestowed the benefits of regular probation since the plea bargain has by now passed out of the picture. McDougal v. State, 610 S.W.2d 509, 509 (Tex.Crim.App. 1981) (en banc) and Hardy v. State, 610 S.W.2d 511, 512 (Tex.Crim.App.1981) (en banc) seem to imply that relator's remedy lies in moving for final adjudication if he is dissatisfied with the terms and conditions of the order. I would think that such terms and conditions are necessarily reasonable ones and not those contrived at the whim of a trial court. Moreover the decision to defer cannot be the point of dissatisfaction in the instant case because it was expressly bargained for.
