
    Curtis WITT, Appellant, v. Martha WHITEHEAD, State Treasurer, and John Sharp, Comptroller, Appellees.
    No. 03-94-00286-CV.
    Court of Appeals of Texas, Austin.
    May 3, 1995.
    Rehearing Overruled July 12, 1995.
    Terral R. Smith, Austin, for appellant.
    Dan Morales, Atty. Gen., Harry G. Potter, III, Asst. Atty. Gen., General Litigation Div., Austin, for appellees.
    Before CARROLL, C.J., and ABOUSSIE and KIDD, JJ.
   CARROLL, Chief Justice.

Appellant Curtis Witt filed suit against State Treasurer Martha Whitehead and State Comptroller John Sharp, appellees, seeking a declaratory judgment construing House Bill 2619 (“H.B. 2619”) and requesting an order enjoining Whitehead from transferring certain duties of her office to Sharp. Witt appeals from the judgment of the trial court granting appellees’ plea to the jurisdiction and dismissing the cause. We will reverse the trial court’s judgment and remand the cause to the trial court.

BACKGROUND

On June 2,1989, H.B. 2619 was signed into law, amending Chapters 154 and 155 of the Texas Tax Code. Act of June 2, 1989, 71st Leg., R.S., ch. 240, 1989 Tex.Gen.Laws 1132. The legislation transferred all functions of cigarette tax regulation, collection, and administration from the Comptroller to the Treasurer. On June 6, 1993, Governor Ann Richards appointed Whitehead as Treasurer. Whitehead determined that certain activities taking place in the Treasurer’s office should be transferred to the Comptroller’s office and announced her intention of transferring to the Comptroller the duties of cigarette tax collection. In order to prevent this transfer, Witt filed suit in Travis County district court on January 10, 1994. Witt, a consumer and wholesaler of tobacco products, holds a state tobacco wholesale distributors permit and pays state cigarette taxes. Witt sought in-junctive relief and a declaratory judgment that all functions of cigarette tax regulation, collection, and enforcement are duties of the Treasurer that cannot be transferred to another state agency without legislative authority.

On January 11, 1994, Whitehead entered into an agreement with Sharp pursuant to the Interagency Cooperation Act, Tex.Gov’t Code Ann. §§ 771.001-.010 (West 1994), in which she agreed to pay the Comptroller $650,000 for providing the staff necessary to take over the auditing, collection, and enforcement of the cigarette tax. Witt contends that Whitehead and Sharp could not legally enter into such a contract. On January 31, 1994, the morning of the hearing on the temporary injunction, appellees filed a plea to the jurisdiction, which the trial court granted. In a single point of error, Witt appeals the trial court’s grant of appellees’ plea to the jurisdiction.

DISCUSSION

Appellees raised a single ground in their plea to the jurisdiction: only the supreme court has jurisdiction to compel an executive official to perform a duty. According to ap-pellees, Witt’s request for injunctive relief was really a suit for writ of mandamus against Whitehead to compel performance of her duties under H.B. 2619. Appellees argue that the supreme court alone has jurisdiction over such a case. See Tex.Gov’t Code Ann. § 22.002(c) (West 1988) (“Only the supreme court has the authority to issue a writ of mandamus or injunction ... against any of the officers of the executive departments ... to order or compel the performance of a ... duty that, by state law, the officer or officers are authorized to perform.”).

Although the supreme court has exclusive jurisdiction over suits for writ of mandamus, a district court has jurisdiction to issue an injunction against a state executive officer. Terrell v. Middleton, 187 S.W. 367, 368 (Tex.Civ.App.—San Antonio 1916, writ ref'd). Based upon our review of the pleadings, we conclude that Witt did not ask the court to order the Treasurer to engage in the regulation, collection, and enforcement of the cigarette tax; rather, he requested that the court enjoin any actions transferring those functions from the Treasurer to the Comptroller “until such time as th[e] [trial] court construes the meaning of H.B. 2619.” Witt’s case involves a three-step process: (1) a petition to the district court for a declaratory judgment construing H.B. 2619 to prohibit Whitehead from transferring the functions of cigarette tax collection to another state agency and for temporary injunctive relief pending the court’s declaratory judgment; and (2) upon the issuance of the declaratory judgment, a request for permanent injunctive relief to enjoin Whitehead from transferring her legislatively prescribed duties to another state agency. Only if Whitehead then refused to perform her legislatively prescribed duties would the third step come into play: (3) a petition to the supreme court for a writ of mandamus.

Appellees argue that because Witt was attempting to enjoin an act that had already taken place — the transfer of responsibilities from the Treasurer to the Comptroller— Witt’s request is actually a request for writ of mandamus. Appellees cite American National Bank v. Sheppard, 175 S.W.2d 626 (Tex.Civ.App.—Austin 1943, writ ref'd w.o.m.), for the proposition that “to undo what has already been done necessarily requires an affirmative action.” Id. at 627. In Sheppard, a bank sought to enjoin the Treasurer from stopping payment on a warrant that had already been issued, in effect attempting to compel the Treasurer to pay the warrant. The court observed that all of the acts sought to be enjoined had already been performed and therefore could not be enjoined:

[T]he only relief which would promote the Bank’s interest is mandatory and not restraining. The warrant has been issued and the only impediment to its payment is the refusal of the Treasurer to pay.... Neither the payment nor any of these acts can be compelled except by the Supreme Court.

Id. Accordingly, the court held that jurisdiction was vested exclusively in the supreme court. Appellees claim that the transfer Witt wants to prohibit has already taken place, and that he is therefore asking a district court to undo what has already been done in violation of Sheppard. We disagree.

Witt’s petition requested a declaratory judgment declaring that the Treasurer’s cigarette tax collection duties cannot be transferred to another state agency without legislative approval and injunctive relief enjoining compliance with the illegal contract. This is the only means by which he can proceed. Witt could not have gone directly to the supreme court and requested a writ of mandamus because a writ of mandamus issues only to compel a public official to perform a nondiscretionary duty when the relator’s rights to have that duty performed are clear. Wolters v. Wright, 623 S.W.2d 301, 304 (Tex.1981). Witt must first prove his right to have Whitehead perform her duties under H.B. 2619, which can only be established through an evidentiary hearing at which the court can construe H.B. 2619 and then decide whether the interagency agreement is illegal. If the court declares the contract illegal, it can grant permanent in-junctive relief to prohibit enforcement of the contract. If the Treasurer refuses to comply, only then can Witt petition the supreme court for a writ of mandamus.

Appellant does not seem to recognize the distinction between compelling an officer to perform a legal duty and restraining him from carrying into effect an illegal act.... The Supreme Court has never attempted ... to restrain the infraction of a law or the Constitution upon the part of any one. Our view of the matter is fully sustained in a clear and exhaustive opinion of the Court of Appeals of the Third District. ...
“In this suit it is not sought to compel either of the defendants to do any act or perform any duty which they are authorized to perform; but, on the contrary, the gist of the plaintiff’s ease lies in the averment that the acts complained of have been, or will be, committed without and in excess of lawful authority.... The defendants, by excepting to the court’s jurisdiction, deny its power to determine whether or not the acts are within the scope of lawful authority.... This contention involves the proposition that if such officers choose to exceed their powers, however much the excess or great the injury, the courts cannot interpose to prevent them.”
That court held, as we do, that the district court had jurisdiction.

Terrell, 187 S.W. at 370 (quoting Kaufman County v. McGaughey, 21 S.W. 261, 262-63 (Tex.Civ.App.—Austin 1893, writ ref'd)). We hold that the district court has jurisdiction to determine whether Whitehead can lawfully transfer certain duties of her office to another state agency and to enjoin enforcement of the interagency agreement if it determines the agreement is illegal. Therefore, we sustain Witt’s sole point of error.

In its order, the trial court both denied Witt’s request for injunctive relief and granted appellees’ plea to the jurisdiction, thereby dismissing Witt’s cause of action for declaratory judgment for want of jurisdiction. Although the order “denies” Witt’s request for injunctive relief, the court actually dismissed Witt’s entire cause of action for want of jurisdiction. Since we have determined that the district court has jurisdiction over Witt’s cause of action for declaratory judgment and injunctive relief, we reverse the trial court’s judgment and remand the cause to the trial court for adjudication of both claims.

CONCLUSION

The trial court erred when it granted ap-pellees’ plea to the jurisdiction. The trial court had jurisdiction to grant or deny a declaratory judgment regarding the legality of the interagency agreement between Whitehead and Sharp as well as jurisdiction to enjoin either or both of them from performing any illegal portions of the agreement. The judgment of the trial court dismissing the cause for want of jurisdiction is reversed, and this cause is remanded to the trial court.  