Opinion
MOSK, J.The People ask us to consider whether a magistrate abused his discretion in denying a motion to dismiss a criminal complaint under Penal Code section 1385 when the defendant opposed the motion, and the sole ground for the motion was that the prosecutor who filed the original complaint and thus invoked the magistrate’s jurisdiction had subsequently obtained an indictment charging the same defendant with the identical offense.
This situation arises in the context of the underlying controversy over the constitutionality of the grand jury’s indicting function as presently performed, an issue now resolved in Hawkins v. Superior Court (1978) ante, page 584 [150 Cal.Rptr. 435, 586 P.2d 916], and the interpretation of section 1385, an issue now resolved in People v. Peters (1978) 21 Cal.3d 749 [147 Cal.Rptr. 646, 581 P.2d 651].
On October 9, 1975, the District Attorney of Alameda County filed felony complaint No. 88508 against Reginald Harris, real party in interest here, in the Municipal Court for the Oakland-Piedmont Judicial District. The charge was violation of Health and Safety Code section 11352 (transport, sale, etc., of a controlled substance), a felony. On October 16, Harris was arraigned and entered a plea of “not guilty.” The matter was set for preliminary hearing on October 30. Before the preliminary hearing was held, however, the district attorney obtained an indictment, No. 60680, from the Alameda County Grand Jury, charging Harris with the identical felony offense alleged in the previously filed complaint. This second accusatory pleading was filed in superior court on October 24.
On October 30, the date scheduled for the preliminary hearing on the earlier complaint, the district attorney moved in municipal court for its dismissal, citing the supervening indictment. The magistrate, the Honorable William P. Levins, took the motion under submission.1 A hearing was held on November 3, at which defendant opposed the motion to dismiss, insisting that he was entitled to a preliminary hearing, and that “to so deprive him [of that hearing] by proceeding at the grand jury level is a denial of. . . equal protection.”
*623After brief argument, the magistrate stated that the district attorney had demonstrated a policy of “selective enforcement” in choosing to pursue indictments in some cases initially prosecuted by complaint, and that thereby “opportunity is not given to the defendant to present any exculpatory evidence.” He further noted that defense counsel had indicated “that he wishes to have the opportunity to examine and cross-examine and bring ... to the attention of the magistrate certain affirmative issues.” The magistrate concluded “I therefore find in this case that since the complaint was filed with me, since I had jurisdiction of the subject matter and the defendant. . . that the defendant is protected in this case, and he will receive a preliminary examination forthly [szc] unless I’m stayed by writ or appropriate action by the District Attorney.” The motion to dismiss was denied and the preliminary examination rescheduled for November 6.
When defendant Harris’ case was called on November 6, the district attorney announced that he was not ready to proceed, and renewed his motion to dismiss. He stated that it was his understanding that “jurisdiction now resides in the Superior Court,” that to deny his motion “would be in excess of the Court’s jurisdiction,” and would produce “a dual prosecution under [Penal Code section] 654.” Again the motion to dismiss was denied, the court repeating its intent to proceed with a preliminary hearing on the complaint, and threatening to hold the deputy district attorney in contempt if he failed to produce witnesses or in the alternative did not obtain a writ “to prevent me from acting.” '
The district attorney then sought a writ of prohibition or mandate in the superior court, the court to which the grand jury indictment had been returned. That court, treating the prosecutor’s motion to dismiss as one under section 1385, phrased the legal issue as “whether the Respondent exceeded his jurisdiction in refusing to grant the District Attorney’s motion . . . and in ordering the District Attorney to proceed with the presentation of a Preliminary Hearing.” The court concluded that neither excess of jurisdiction nor abuse of discretion had been shown, and entered judgment denying the People’s petition. The People appeal from this judgment.
The parties agree that the prosecutor’s motion before the magistrate to dismiss the complaint was an invocation of section 1385. That statute reads in relevant part: “The court may, either of its own motion or upon the application of the prosecuting attorney, and in furtherance of justice, order an action to be dismissed.” The statute does not require that *624a court dismiss a criminal action upon application of the district attorney; rather, the statutory language clearly indicates the creation of a discretionary power in the court. (Gyler v. Mission Ins. Co. (1973) 10 Cal.3d 216, 219 [110 Cal.Rptr. 139, 514 P.2d 1219].)
In People v. Peters, supra, at page 753, however, a majority of this court held that “Penal Code section 1385 authorizes dismissals by trial courts, not magistrates.” A contrary conclusion in Horner v. Superior Court (1976) 64 Cal.App.3d 638 [134 Cal.Rptr. 607], was disapproved.
Under compulsion of Peters, then, it is clear that the magistrate did not have the power to grant the prosecutor’s motion to dismiss, and thus the denial was entirely proper.
In the superior court, the People made no motion to dismiss under section 1385. Rather, they sought a writ of prohibition or mandate to prevent the magistrate from proceeding further with the prosecution against Harris. Issuance of an extraordinary writ against a judge depends upon lack of jurisdiction in the tribunal to hear or determine a case, “an absence of authority over the subject matter or the parties.” (Abelleira v. District Court of Appeal (1941) 17 Cal.2d 280, 288 [109 P.2d 942, 132 A.L.R. 715].)
Had the magistrate granted the motion of the People to dismiss, according to Peters, he would have acted in excess of his jurisdiction; thus the refusal to dismiss was consistent with his jurisdictional limits. Because a writ is not appropriate to compel a magistrate to dismiss a case, the superior court properly denied the writ.
The judgment of the superior court denying the writ is affirmed.
Manuel, J., and Newman, J., concurred.
On October 31, Harris appeared before the superior court in connection with the indictment.