
925 S.W.2d 338 (1996)
Robert C. HILLIARD and Andrew C. Schirrmeister, III, Relators,
v.
The Honorable Max BENNETT, Judge of the 319th District Court of Nueces County, Texas, Respondent.
No. 13-96-042-CV.
Court of Appeals of Texas, Corpus Christi.
June 13, 1996.
*339 Eric Brown, Linda C. Breck, Corpus Christi, for appellant.
Before DORSEY, FEDERICO G. HINOJOSA, Jr., and RODRIGUEZ, JJ.

OPINION
DORSEY, Justice.
This mandamus proceeding challenges the authority of a trial court sua sponte to sanction an attorney who has filed and then nonsuited an action that was assigned to the respondent's court. We hold the respondent lost jurisdiction over the cause before the motion for sanctions was filed, and thus the order sanctioning relators is void. We conditionally grant a writ of mandamus.
The respondent is Max Bennett, Judge of the 319th District Court of Nueces County. Relators, Robert C. Hilliard and Andrew Schirrmeister, III, are Texas attorneys representing multiple plaintiffs who claim to have been injured by toxic gases and chemicals released by the Southern Peru Copper Corporation. On August 30, 1995, and August 31, 1995, relators filed some sixteen separate lawsuits with the Nueces County District Clerk, each on behalf of separate plaintiffs but arising out of the same occurrence, alleging the same causes of action, and against the same defendants. The lawsuits were, in accordance with local rules of Nueces County, each randomly assigned to one of the eight district courts of the county. The first lawsuit filed by relators was assigned to the respondent's 319th District *340 Court. The other actions were assigned when filed to other district courts, until one was assigned to the 105th District Court. On September 5, 1995, the relators filed notices of nonsuit in all the lawsuits except the one in the 105th.
Although the defendants had neither been served nor had answered in any of the nonsuited actions, including the one in the 319th District Court, Judge Bennett refused to dismiss it and on October 2, 1995, signed a Sua Sponte Order Abating Dismissal and Setting Hearing on Transfer, Consolidation and Sanctions. By that order, the respondent required the relators to appear before him on November 10, 1995, and show cause, among other things, why they should not be sanctioned for violating the rules concerning random assignment of cases in Nueces County.
The sanctions hearing was held as scheduled in the 319th District Court, with Judge Max Bennett presiding. At that hearing, the judge called and questioned witnesses, overruled pleas to his jurisdiction, and overruled assertions of Fifth Amendment rights by the respondents when the judge called them to testify. The judge called as a witness a representative from the Nueces County District Clerk's Office and the relators themselves, concerning the relators' conduct in filing multiple lawsuits with the district clerk. Relators admitted to the multiple filings, but denied any intent to violate any of the rules of court and stated that they acted in good faith and intended to diligently prosecute the case remaining in the 105th District Court. The relators did not present any evidence but argued against the respondent's jurisdiction to sanction them, as well as fundamental due process concerns.
The respondent then announced his determination that relators be sanctioned for their conduct.
On January 4, 1996, Judge Bennett signed an "Order on Sanction of Attorneys," finding that the relators knowingly and intentionally violated the local rules that provide for the random assignment of cases, violated Rule 13 by filing the lawsuit in bad faith, and violated Rule 1's requirements of a just, fair, equitable and impartial adjudication of the rights of litigants. The respondent then ordered relators "as a sanction, each to pay unto the clerk of the court the sum of $10,000 on or before February 5, 1996." This Court has stayed the sanctions order pending our determination of this mandamus proceeding.
The attorneys, Hilliard and Schirrmeister, sought leave to file a petition for writ of mandamus in this court, along with accompanying briefs and exhibits. Leave to file was granted, and the matter was set for argument. Respondent, the Honorable Max Bennett, Judge of the 319th District Court, did not file any response or brief, although invited to do so.[1] We are called on to decide this matter without the benefits conferred by the adversary system, where each side vigorously explores the law to aid the court in its analysis and decision.

I. JURISDICTION
Relators first argue that the trial court had no jurisdiction to continue the lawsuit and impose sanctions after they filed notice of nonsuit disposing of all claims. We agree.
Plaintiff's right to nonsuit is absolute absent a pending claim for affirmative relief or motion for sanctions. BHP Petroleum Co. v. Millard, 800 S.W.2d 838, 840 (Tex. 1990); Hjalmarson v. Langley, 840 S.W.2d 153, 154 (Tex.App.Waco 1992, orig. proceeding). The granting of a nonsuit is merely a ministerial act which the trial court has no discretion to deny, unless the defendant has, prior to that time, filed pleadings seeking some form of affirmative relief. Greenberg v. Brookshire, 640 S.W.2d 870, 872 (Tex. 1982); Strawder v. Thomas, 846 S.W.2d 51, 59 (Tex.App.Corpus Christi 1992, no writ). Accordingly, the trial court has no discretion to refuse to dismiss, or to reinstate, a case to consider a claim for affirmative relief that is filed subsequent to the plaintiff's notice of nonsuit. Id. at 59; see also Quanto Intern. *341 Co. v. Lloyd, 897 S.W.2d 482, 486 (Tex. App.Houston [1st Dist.] 1995, orig. proceeding).
A court has no more power to act in sanction matters without jurisdiction than it does elsewhere. Hjalmarson, 840 S.W.2d at 155. Accordingly, the trial court's jurisdiction and discretion to impose sanctions after the filing of a nonsuit are generally measured in the same manner as its authority to grant other types of affirmative relief which had not been requested before the nonsuit. See Schexnider v. Scott & White Memorial Hosp., 906 S.W.2d 659, 663 (Tex. App.Austin 1995, no writ); Vera v. Perez, 884 S.W.2d 182, 184 (Tex.App.Corpus Christi 1994, no writ); Jobe v. Lapidus, 874 S.W.2d 764, 766 (Tex.App.Dallas 1994, writ requested); Warfield Electric of Texas, Inc. v. Harry Hines Property Venture, 871 S.W.2d 273, 275 (Tex.App.Eastland 1994, no writ); Hjalmarson, 840 S.W.2d at 154-56; but see Wolma v. Gonzalez, 822 S.W.2d 302 (Tex.App.San Antonio 1991, orig. proceeding) (holding that jurisdiction to grant Rule 13 sanctions remained after trial court's plenary power expired).
In the present case, no claim for affirmative relief or for sanctions had been filed at the time relators filed their notice of nonsuit. Nor had the trial court before that time announced its intentions sua sponte to consider or impose sanctions. Accordingly, the trial court had no discretion after the nonsuit to inject an affirmative claim for sanctions into the lawsuit, over which it maintained jurisdiction and discretion to perform merely the ministerial act of ordering dismissal. We hold the trial court lacked jurisdiction to impose sanctions and its order is void.

II. DUE PROCESS
If the jurisdictional shortcomings are overlooked, serious due process concerns are implicated. Even if the relators had not nonsuited the underlying lawsuit and the respondent could demonstrate that he was acting within his inherent power to sanction,[2] he did not have the authority to be both accuser and adversary to the relators on the one hand, while remaining the ultimate judge of their conduct on the other.
A trial court generally has no authority to impose sanctions sua sponte, in as much as it deprives the party against whom sanctions are to be imposed of notice and an opportunity to be heard. See Shockey v. A.F.P., Inc., 905 S.W.2d 629, 630 (Tex.App. Houston [14th Dist.] 1995, no writ); Zep Mfg. Co. v. Anthony, 752 S.W.2d 687, 689 (Tex. App.Houston [1st Dist.] 1988, orig. proceeding). In the present case, the trial court attempted to give notice and an opportunity for relators to be heard before imposing sanctions. However, the problems involved with the trial court sua sponte imposing sanctions against an attorney go beyond those involving notice and an opportunity to be heard.
One of the most fundamental components of a fair trial is "a neutral and detached judge." Metzger v. Sebek, 892 S.W.2d 20, 38 (Tex.App.Houston [1st Dist.] 1994, writ denied) (quoting Ward v. Village of Monroeville, 409 U.S. 57, 62, 93 S.Ct. 80, 84, 34 L.Ed.2d 267 (1972). A judge should be fair and impartial and should act neither as an advocate for any party nor as an adversary to any party. Metzger, 892 S.W.2d at 38; Ex parte Finn, 615 S.W.2d 293, 296 (Tex.Civ.App.Dallas 1981, no writ). Accordingly, it is generally improper *342 for the trial judge on his own initiative to bring proceedings against a party in his court. See Finn, 615 S.W.2d at 296.
In the present case, the relators' multiplefilings scheme somehow came to the attention of the respondent, who then took it upon himself to punish relators for their conduct by means of a sanction loosely connected to the one case that had been filed in his court. However, absent a defendant to complain of the relators' conduct, the trial judge himself had to become the prosecutorto file a complaint, gather information, and examine witnesseswhile retaining the power to determine guilt and to rule on objections. This is fundamentally inimical to our system of justice.
Because the respondent in the present case has imposed sanctions in a lawsuit that has already been nonsuited and in a manner inconsistent with his role as a judge, we cannot uphold the present sanctions order.
We conditionally grant a writ of mandamus ordering the trial court to vacate his sanctions order against the relators, and we trust that he will perform his ministerial duty of dismissing the underlying lawsuit. The writ will not issue unless the trial court fails to comply with the opinion of this court.
NOTES
[1]  Judge Bennett filed, prior to argument, an order signed by the district judges of Nueces County directing the district clerk to assign cases, both civil and criminal, randomly among the courts. Judge Bennett approved the order after leave to file had been granted but before argument in this court.
[2]  We need not determine whether under certain circumstances the trial court might have the inherent power to sanction conduct of the nature engaged in by the relators. It is clear that the present sanctions may not be based on a violation of Texas Rule of Civil Procedure 13, regarding groundless pleadings. There is no indication in the record or finding by the trial court that the claims made by relators in the underlying lawsuit are groundless. See Johnson v. Smith, 857 S.W.2d 612, 617 (Tex.App.Houston [1st Dist.] 1993, orig. proceeding). Nor do Texas Rule of Civil Procedure 1 or the Nueces County Local Rules concerning random assignment of cases provide an independent basis for the trial court to impose sanctions against the relators. Accordingly, the sanctions imposed in the present case could only have been authorized, if at all, under the inherent power of the trial court to sanction for abuses of the judicial process that may not be covered by rule or statute. See Kutch v. Del Mar College, 831 S.W.2d 506, 509-10 (Tex. App.Corpus Christi 1992, no writ).
