CARR, J.
Petitioner Cynthia Ann Casey seeks prohibition restraining the Superior Court of Calaveras County from proceeding to trial on action No. 2311, People v. Cynthia Ann Casey. She contends such prosecution is barred by Penal Code section 1387 by reason of two prior dismissals on the same cause of action in the San Joaquin Municipal Court.
All further statutory references are to the Penal Code unless otherwise indicated.
Section 1387, as relevant herein, provides: "An order terminating an action pursuant to this chapter . . . is a bar to any other prosecution for the same offense if it is a felony . . . and the action has been previously terminated pursuant to this chapter. . . ."
The essential issue presented is whether a dismissal of a complaint in one county for lack of jurisdiction because the crime charged occurred in another county is a dismissal within the parameters of section 1387.
FACTUAL AND PROCEDURAL BACKGROUND
As disclosed by a declaration in support of an arrest warrant filed in San Joaquin County, on April 6, 1984, an undercover agent met several individuals at the intersection of Highway 26 and Hogan Dam Road to buy methamphetamine. Petitioner was alleged to be one of the drug sellers. She and two other people were arrested and charged in San Joaquin County with the sale of methamphetamine (Health Saf. Code. § 11379) and conspiracy to sell methamphetamine (§ 182). The overt acts in furtherance of the conspiracy were alleged to have occurred in San Joaquin and Calaveras Counties. The first overt act was a meeting in Stockton on April 4, 1984, between petitioner's two codefendants and an undercover agent. The second overt act alleged one of these codefendants and petitioner met the same agent "on Highway 26 at Hogan Dam Road in Calaveras County on 4/6/84."
Petitioner pled not guilty. A preliminary examination was held July 16, 1984, but the felony docket sheet fails to indicate on what counts petitioner was held to answer. A transcript of that proceeding is not included in the record. Six weeks later, on July 30, 1984, the court ordered the case dismissed. Again, no reporter's transcript of this proceeding has been provided. The only information concerning the dismissal is contained in the pre-printed felony docket sheet. That document covers every part of the proceedings from the presence or nonpresence of defendant at arraignment to waiver by defendant of time for sentence, each statement preceeded by a little box to be checked or not depending on whether some affirmative action was or was not taken. It contains a section relating to dismissals. This section is composed of the following recitals: " Upon motion DDA, Court ordered case/count(s) ____ DISMISSED in the interest of justice insufficient evidence in view of plea to ____ other: ____." The boxes checked indicated that on motion of the deputy district attorney, the case was dismissed "[x] in the interest of justice" and "[x] other: corpus delecti [ sic] problem." Presumably the court felt any dismissal other than for insufficient evidence or plea to another offense was a dismissal in the interest of justice and the "other" was simply a convenient line to put the reasons required by section 1385. Parenthetically we observe that a corpus delicti problem, facially at least, would appear to be a problem of the sufficiency of the evidence, either as to the commission of the crime or defendant's involvement.
Section 1385 provides: "The judge or magistrate 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 reasons for the dismissal must be set forth in an order entered upon the minutes. No dismissal shall be made for any cause which would be ground of demurrer to the accusatory pleading." Petitioner could not demur to the complaint because the error in question did not appear on its face.
On August 2, 1984, a second complaint was filed in San Joaquin County Municipal Court, charging petitioner with the same sale of methamphetamine on April 6, 1984. No conspiracy charges were alleged, nor did the complaint specify where this sale took place, other than to state the offense occurred in San Joaquin County. Petitioner again pled not guilty.
The two other individuals charged with petitioner in the first complaint were not named in this second complaint.
A preliminary hearing was scheduled for November 26, 1984. On our own motion, this court augmented the record to include the reporter's transcript from that proceeding. When the case was called, the following colloquy occurred:
"[DEPUTY DISTRICT ATTORNEY]: Your Honor, in this matter, after consultation with Special Agent Thompson and learning that the location of Highway 12 and Hogan Dam Road is not within this county, it appears that there's a failure to — there's a defect in the complaint and we therefore move to dismiss for lack of jurisdiction.
"[THE COURT]: The matter will be dismissed for lack of jurisdiction.
"[DEFENSE COUNSEL]: Thank you, Your Honor."
The preprinted docket sheet reflects this decision with checks in the boxes indicating a dismissal in the interest of justice, with a second check in the box marked "other" with the comment "lack of jurisdiction — not proper county."
A complaint charging petitioner with possession and possession for sale of methamphetamine had been filed in Cala- veras County the preceding month, October 1984. The offenses were alleged to have occurred in Calaveras County in August 1984 and were unrelated to the San Joaquin sale charge. After the second San Joaquin County complaint was dismissed, the Calaveras complaint was amended to add two counts, a misdemeanor violation of Business and Professions Code section 4143 (illegal possession of a hypodermic needle and syringe) and the April 6, 1984, sale of methamphetamine, the same transaction which formed the basis for the San Joaquin County complaints.
After a preliminary examination, the Calaveras Justice Court held petitioner to answer on only the last two charges which had been added by amendment and an information issued charging petitioner with the sale of methamphetamine on April 6, 1984 (count I) and a violation of Business and Professions Code section 4143 in August 1984 (count II). Petitioner pled not guilty and moved to set aside the information as to count I on the ground it was barred by the two previous dismissals of the same charge in San Joaquin County. The court denied the motion, finding inter alia that the earlier dismissals were not in the interest of justice within the meaning of section 1385. Petitioner sought a writ of prohibition and we issued an alternative writ.
DISCUSSION
(1a) Petitioner contends she was twice charged with the April 6, 1984, sale of methamphetamine and that on both occasions the San Joaquin County Municipal Court dismissed the charges "in the furtherance of justice," i.e., pursuant to section 1385. Ergo, she asserts, these dismissals are within the scope of section 1387 and the People are precluded from prosecuting her for this crime in Calaveras County. We reject petitioner's claim and conclude a dismissal for lack of jurisdiction is not a dismissal in the interest of justice within the meaning of section 1385.
As previously noted, section 1387 provides in relevant part: "An order terminating an action pursuant to this chapter . . . is a bar to any other prosecution for the same offense if it is a felony . . . and the action has been previously terminated pursuant to this chapter. . . ." This "two-dismissal rule" was enacted to prevent forum shopping and prosecutional harassment of defendants with successive prosecutions. ( Landrum v. Superior Court (1981) 30 Cal.3d 1, 14 [ 177 Cal.Rptr. 325, 634 P.2d 352]; People v. Cossio (1977) 76 Cal.App.3d 369, 371-372 [ 142 Cal.Rptr. 781].) It does not distinguish between types of dismissals: all dismissals made pursuant to specified code sections are included, whether the dismissal was on the merits or for procedural deficiencies. ( Lee v. Superior Court (1983) 142 Cal.App.3d 637, 640 [ 191 Cal.Rptr. 361].)
The two-dismissal rule does not apply if substantial new evidence is discovered subsequent to the dismissal or the termination was the result of intimidation of a material witness. (§ 1387.) Further exceptions are established by the statute. In 1984, the time relevant to petitioner, section 1387 provided: "However, if the previous termination was pursuant to Section 859b, 861, 871, or 995, the subsequent order terminating an action is not a bar to prosecution if either: [¶] (a) Good cause is shown why the preliminary examination was not held within 60 days from the date of arraignment or plea. [¶] (b) The motion pursuant to Section 995 was granted because of (1) present insanity of the defendant or (2) a lack of counsel after the defendant elected to represent himself or herself rather than being represented by appointed counsel." (Stats. 1982, ch. 637, § 1, pp. 2646-2647.) None of these exceptions is applicable to the present case.
We agree with petitioner that the same offense is at issue in each prosecution. This is not a situation in which only the "essence" of the charged offense is the same (see, e.g., Dunn v. Superior Court (1984) 159 Cal.App.3d 1110, 1118 [ 206 Cal.Rptr. 242]; Wallace v. Municipal Court (1983) 140 Cal.App.3d 100, 106-107 [ 189 Cal.Rptr. 886]). Here the identical transaction forms the basis for each case: the alleged sale of methamphetamines on April 6, 1984, at the intersection of Highway 26 and Hogan Dam Road. The Calaveras County District Attorney so stipulated.
The People urge the offense is not the "same offense" because the San Joaquin complaint alleged the transaction occurred in San Joaquin County while the Calaveras information charged the sale occurred in Calaveras County. However, the parties have acknowledged the same facts form the basis for each charge and that the place in question is located in Calaveras County. Moreover, venue is not part of the corpus delicti of the crime. ( People v. Garcia (1970) 4 Cal.App.3d 904, 911 [ 84 Cal.Rptr. 624].)
We turn to the question of whether the two previous dismissals by the San Joaquin County Municipal Court were dismissals terminating an action "pursuant to this chapter," as required by section 1387. "This chapter" refers to chapter 8 of title 10 of part 2 of the Penal Code, entitled "Dismissal of the Action for Want of Prosecution or Otherwise." The specific statute at issue here is section 1385 which permits a court to dismiss an action "in furtherance of justice." (See fn. 2, ante.)
The record yields no explanation of the court's first dismissal of the complaint for corpus delicti problems, nor do the parties consider whether such a dismissal is one in the furtherance of justice. For purposes of this appeal, we assume it is.
The docket sheet indicates the second dismissal was made in the interest of justice, specifically noting the court lacked jurisdiction because the crime occurred in another county. Counsel have cited us to no case nor has our independent research uncovered any case considering the issue before us, whether a dismissal for lack of venue jurisdiction is a dismissal in furtherance of justice.
As we explain, we do not view a dismissal for lack of territorial jurisdiction as a dismissal in the furtherance of justice within the meaning of section 1385, notwithstanding the clerk's notation labelling it as such. (2) We observe initially that in the absence of contrary statutory provisions, jurisdiction to prosecute a criminal charge lies in the county in which the criminal act was committed. (§ 777; Jackson v. Superior Court (1970) 13 Cal.App.3d 440, 443-444 [ 91 Cal.Rptr. 565, 46 A.L.R.3d 290].) (3) The trial court has broad discretion to dismiss an action under section 1385, but this discretion is not absolute. ( People v. Orin (1975) 13 Cal.3d 937, 945 [ 120 Cal.Rptr. 65, 533 P.2d 193].) The court must weigh the constitutional rights of the defendant and the interests of society in determining whether dismissal is appropriate. ( Ibid.) When a dismissal occurs after trial, the court must consider "the evidence indicative of guilt or innocence, the nature of the crime involved, the fact that the defendant has or has not been incarcerated in prison awaiting trial and the length of such incarceration, the possible harassment and burdens imposed upon the defendant by a retrial, and the likelihood, if any, that additional evidence will be presented upon a retrial." ( People v. Superior Court ( Howard) (1968) 69 Cal.2d 491, 505 [ 72 Cal.Rptr. 330, 446 P.2d 138].) Many of these factors have been held to be equally applicable to dismissals before trial ( People v. Curtiss (1970) 4 Cal.App.3d 123, 126 [ 84 Cal.Rptr. 106] ) but have little, if any, relevance to a dismissal made for lack of jurisdiction.
There are a number of situations in which concurrent or dual jurisdiction may exist for the prosecution of criminal offenses. For example, section 781 provides for dual jurisdiction when an offense is committed in part in one jurisdiction and in part in another (see People v. Megladdery (1940) 40 Cal.App.2d 748, 774-780 [ 106 P.2d 84]); section 782 provides dual jurisdiction when an offense is committed within 500 yards of a jurisdictional boundary; and section 184, relating to conspiracy, provides trial may be held in any county where any overt act was done.
Both the People and petitioner have assumed the usual jurisdiction provisions of section 777 apply here; neither party has suggested San Joaquin and Calaveras Counties might have had concurrent jurisdiction over the charged offense. We shall operate on the same assumption, namely, once conspiracy charges against petitioner were dropped, Calaveras County was the only place in which trial could properly be held. We therefore offer no opinion as to possible theories under which dual jurisdiction might have been asserted, nor do we resolve the potential problems created if San Joaquin County dismissed the complaint against petitioner for lack of jurisdiction when it in fact had jurisdiction to hear the matter.
In Orin, supra, 13 Cal.3d 937, the court enumerated situations in which pretrial dismissals are appropriate in the furtherance of justice. Such dismissals are proper, the court stated: whether "designed to enable the prosecution `to obtain further witnesses, to add additional defendants, to plead new facts, or to plead new offenses. . . .'" (13 Cal.3d at p. 946.) Other reasons have been held to be improper, including sympathy of the court ( People v. Sanders (1983) 145 Cal.App.3d 218, 226 [ 193 Cal.Rptr. 331]), judicial convenience ( People v. Johnson (1984) 157 Cal.App.3d Supp. 1, 8 [204 Cal.Rptr. 563]) or court congestion ( People v. Andrade (1978) 86 Cal.App.3d 963, 976 [ 150 Cal.Rptr. 662]; People v. Mack (1975) 52 Cal.App.3d 680, 684 [ 125 Cal.Rptr. 188]).
(1b) A dismissal for lack of territorial jurisdiction is qualitatively different from those situations in which dismissals in the furtherance of justice have been approved. In the former situation, the court is not empowered to hear the case; in the latter it chooses to dismiss the case because other factors outweigh its authority to act.
This conclusion finds further support in the fact a number of methods exist to challenge a court's power to hear a case, all of which are outside the scope of section 1387. Should a court act in excess of its territorial jurisdiction, a defendant may seek relief through extraordinary measures such as habeas corpus to prevent a court from proceeding. (§ 1487; In re Huber (1930) 103 Cal.App. 315 [ 284 P. 509].) Similarly, the lack of territorial jurisdiction may be raised in a motion for new trial or on appeal. (See, e.g., People v. Gerundo (1952) 112 Cal.App.2d 863, 865-869 [ 247 P.2d 398]; see generally Witkin, Cal. Criminal Procedure (1963) §§ 64-65, pp. 62-64.)
More importantly, section 1385 explicitly limits the types of dismissals which can be considered to have been made in the furtherance of justice by providing: "No dismissal shall be made for any cause which would be ground of demurrer to the accusatory pleading." Lack of jurisdiction is a basis for demurrer. (§ 1004.) As this defect cannot be cured by amendment, an action in excess of jurisdiction must be dismissed pursuant to section 1008 after the demurrer is sustained. Significantly, dismissals made in accordance with this section are not included within the two-dismissal rule of section 1387.
Petitioner asserts she could not have demurred to the San Joaquin County complaint because the defect — lack of jurisdiction — did not appear on the face of the complaint. Petitioner is technically correct. However, once the prosecutor informed the court the alleged offense occurred in Calaveras and not San Joaquin County, the complaint was essentially "amended," and the defect became apparent.
Moreover, even if petitioner was not able to actually demur to the complaint, it remains that section 1385 views grounds for demurrer, such as lack of jurisdiction, as something other than a dismissal in the furtherance of justice. In short, a dismissal for lack of territorial jurisdiction is precisely that; it is not a dismissal in the furtherance of justice.
This determination finds support in the peculiar facts of this case. First, we note neither the parties nor the court referred to this dismissal as one made in furtherance of justice; rather, the case was simply dismissed "for lack of jurisdiction." Only through the clerk's checking of a box on the felony docket sheet do the magic words "in the interest of justice" appear. We believe the statements of the prosecutor and court are entitled to greater credence than the notations of the court clerk. (See People v. Smith (1983) 33 Cal.3d 596, 599 [ 189 Cal.Rptr. 862, 659 P.2d 1152].)
Secondly, the instant case does not disclose either harassment of petitioner or prosecutorial forum-shopping, the evils section 1387 was designed to prevent. This is not a situation in which a prosecutor has refiled charges with the hope that a different magistrate will view a case more favorably (see People v. Peters (1978) 21 Cal.3d 749, 759 [ 147 Cal.Rptr. 646, 581 P.2d 651], dis. opn. by Mosk, J). While we do not condone the sloppy filing of the complaint in this case, we also do not equate this carelessness with harassment or forum shopping.
We note in passing that errors of this type may be eliminated if the complaint and arrest warrant are transferred to the proper county pursuant to section 827.
Given our conclusion that the court's dismissal for lack of jurisdiction was not a dismissal within the meanings of sections 1385 and 1387, we have no occasion to consider the People's arguments regarding the independence of each county's prosecutors.
Petitioner asserts denying her the relief sought may result in further prosecution of her codefendants, who pled guilty and have presumably been sentenced. Her concern is unwarranted. (4) Unlike personal or subject matter jurisdiction, territorial jurisdiction is not fundamental and may be conferred upon a court through a plea of guilty which admits all charged allegations, including jurisdiction. ( People v. Tabucchi (1976) 64 Cal.App.3d 133, 141 [ 134 Cal.Rptr. 245].) No further prosecution for these acts could be instituted against petitioner's codefendants.
DISPOSITION
(1c) Charges against petitioner have not been twice dismissed within the meaning of section 1387. The petition for writ of prohibition is denied. The alternative writ, having served its purpose, is discharged.
Evans, Acting P.J., concurred.