
170 Cal.App.3d 967 (1985)
216 Cal. Rptr. 589
RONALD LEE ELLSWORTH, Petitioner,
v.
THE SUPERIOR COURT OF ORANGE COUNTY, Respondent; THE PEOPLE, Real Party in Interest.
Docket No. G002270.
Court of Appeals of California, Fourth District, Division Three.
July 31, 1985.
*970 COUNSEL
Ronald Y. Butler, Public Defender, Frank Scanlon, Assistant Public Defender, Richard Aronson and Richard Schwartzberg, Deputy Public Defenders, for Petitioner.
No appearance for Respondent.
Cecil Hicks, District Attorney, Michael R. Capizzi, Assistant District Attorney, William W. Bedsworth and Rick V. Curcio, Deputy District Attorneys, for Real Party in Interest.
OPINION
WALLIN, J.
Petitioner Ronald Lee Ellsworth seeks a writ of prohibition directing the superior court to vacate its order denying Ellsworth's motion to dismiss the felony charges against him based on his plea of former conviction of the offense charged. (Pen. Code, § 1016, subd. 4.)
On March 14, 1984, Ellsworth was charged by misdemeanor complaint with possession of a weapon concealed in a vehicle (Pen. Code, § 12025, subd. (a)) and possession of a weapon by a convicted felon (Pen. Code, § 12021).[1] The complaint was filed by Deputy District Attorney Case, a relatively new misdemeanor deputy. At the arraignment on March 19, she showed the file to a more experienced deputy, Deputy District Attorney Johnson. He saw that the charges should have been filed as a felony, discussed it with Case, and informed the court of his intention to upgrade the complaint. Johnson filed the felony complaint and Ellsworth was arraigned that day. Johnson asked the court to keep the two files together.
On April 5, Ellsworth entered a plea of not guilty to the misdemeanor complaint. Deputy District Attorney Johnson was present at this proceeding, and he prosecuted the preliminary hearing on the felony complaint against Ellsworth that afternoon. However, Johnson did not dismiss the misdemeanor or move to consolidate the two complaints because, according to his testimony, he forgot.
On April 16, Deputy Public Defender Thamer received Ellsworth's misdemeanor file and discussed the duplicate charges with Deputy Public Defender Anderson, the superior court deputy representing Ellsworth on the *971 felony. As a result of that conversation, Thamer calendared a pretrial conference in the misdemeanor action for April 20 with the intent to recommend a guilty plea, and Anderson continued the felony arraignment set for that day to April 30.
On April 20, Deputy District Attorney Case was working the misdemeanor pretrial calendar. She discussed Ellsworth's case with Deputy Public Defender Thamer and, although she was unable to locate her file, she agreed to dismiss one count (§ 12025, subd. (a)) of the complaint in exchange for a guilty plea on the other count (§ 12021). Later that day in chambers, Judge Carter read the court file and noted the pending felony. Thamer explained to the court that he recommended Ellsworth plead guilty and be sentenced on the misdemeanor immediately. Ellsworth entered his plea in open court without objection and was sentenced to 45 days in the Orange County jail, which he has served.
Deputy District Attorney Case testified she had had no contact with Ellsworth's file since Deputy District Attorney Johnson told her he was going to file the felony, and she did not remember it. She did not attempt to look at the court file or ask Thamer if Ellsworth had other cases pending. She expected the plea and sentence to take place that day, but she did not accompany Thamer to chambers.
Subsequent to the guilty plea, Ellsworth made a motion to dismiss the felony charges based on multiple prosecutions. (§ 654.) The motion was denied, and Ellsworth petitioned this court for a writ of review of that order. We denied that petition "since petitioner has an adequate legal remedy by way of entering a plea of once in jeopardy." Ellsworth entered a plea to the felony charges of former conviction of the offense charged (§ 1016, subd. 4) and made another motion to dismiss. When that motion was denied, Ellsworth filed the instant petition.
We hold the felony prosecution for section 12021 is barred by the constitutional prohibition of double jeopardy and must be dismissed. The felony prosecution for section 12025, subdivision (a), is also barred as the People are bound by their plea bargain which dismissed that charge as a misdemeanor.

I
The Constitution of the State of California guarantees that "Persons may not twice be put in jeopardy for the same offense...." (Cal. Const., art. I, § 15.) This constitutional guarantee has been codified by section 1023, which provides: "When the defendant is convicted or acquitted or has been *972 once placed in jeopardy upon an accusatory pleading, the conviction, acquittal, or jeopardy is a bar to another prosecution for the offense charged in such accusatory pleading...." (1) A guilty plea is equivalent to a conviction and bars a subsequent prosecution for the same offense. (Gonzalez v. Municipal Court (1973) 32 Cal. App.3d 706, 714 [108 Cal. Rptr. 612]; People v. Mims (1955) 136 Cal. App.2d 828 [289 P.2d 539].)
(2a) This case is a classic example of double jeopardy. After the entry of Ellsworth's guilty plea to the misdemeanor violation of section 12021 and the pronouncement of sentence, the People seek to prosecute him a second time for the same violation of the same penal code section. Thus, a fortiori, the bar of double jeopardy is raised.
(3) The People first argue double jeopardy only applies to "successive" prosecutions. They assert the felony charges here were not "successive" because they were already pending when petitioner entered the plea on the misdemeanor charges. They cite no cases for this interpretation but argue their position from a strict construction of the wording of section 1023 and isolated language in cases. (In re Dennis B. (1976) 18 Cal.3d 687, 691 [135 Cal. Rptr. 82, 557 P.2d 514]; Gonzalez v. Municipal Court, supra, 32 Cal. App.3d at p. 714.) Although there are no cases directly construing this point, logic militates against limiting the bar of double jeopardy to prosecutions which are instituted only after the first prosecution is concluded. Such a rule would allow the People to file multiple complaints charging the same offense and prosecute each one, thus avoiding a double jeopardy bar. This directly contradicts the constitutional prohibition.
(2b) The People next argue Ellsworth's maneuvering of the system to enter his misdemeanor plea at the earliest possible time should prevent him from claiming the bar of double jeopardy. (4) They claim the policy underlying section 1023 is identical to the policy underlying section 654, which prohibits multiple prosecutions for related offenses arising out of the same act.[2] They seek to rely on a line of cases under section 654 holding a defendant may not raise the bar of multiple prosecutions if that bar is created by his connivance and concealment or his fraud. (In re Hayes (1969) 70 Cal.2d 604 [75 Cal. Rptr. 790, 451 P.2d 430]; Burris v. Superior Court (1974) 43 Cal. App.3d 530 [117 Cal. Rptr. 898]; People v. Hartfield (1970) 11 Cal. App.3d 1073 [90 Cal. Rptr. 274].)
The People's analysis is incorrect. The prohibition against double jeopardy is deeply rooted in the Anglo-American system of jurisprudence. *973 (Green v. United States (1957) 355 U.S. 184, 187-188 [2 L.Ed.2d 199, 204-205, 78 S.Ct. 221, 61 A.L.R.2d 1119].) "The pleas of once in jeopardy, former acquittal and former conviction are favored pleas, and the right not to be put in jeopardy the second time is as sacred as the right to trial by jury." (Gonzalez v. Municipal Court, supra, 32 Cal. App.3d at p. 714.) On the other hand, "the rule against multiple prosecution has no fundamental or constitutional roots; it is but `a procedural safeguard against harassment.' [Citations.]" (In re Troglin (1975) 51 Cal. App.3d 434, 439 [124 Cal. Rptr. 234].)
(2c) Here, the People are attempting to prosecute Ellsworth again for the identical offense after jeopardy has attached.[3] This squarely presents the constitutionally insurmountable bar of double jeopardy. This bar exists and will protect a defendant against further prosecution by the state, notwithstanding the circumstances of its origin, until removed on constitutionally permissible grounds. (Larios v. Superior Court (1979) 24 Cal.3d 324 [155 Cal. Rptr. 374, 594 P.2d 491]; People v. Valenti (1957) 49 Cal.2d 199 [316 P.2d 633]; In re Krieger (1969) 272 Cal. App.2d 886 [77 Cal. Rptr. 822].) If Ellsworth's guilty plea to the misdemeanor violation of section 12021 was entered fraudulently, the People should have attacked that judgment by way of a timely attack on the judgment in the trial court.

II
(5a) The People's attempt to prosecute Ellsworth for a felony violation of section 12025, subdivision (a) is barred because they are bound by the terms of their bargain, which dismissed the section 12025 count in exchange for a guilty plea to the section 12021 count.
(6) It is well settled that the People are strictly held to the terms of a plea bargain made with a criminal defendant. (In re Troglin, supra, 51 Cal. App.3d at p. 438.) "Plea bargaining is an accepted practice in American criminal procedure [citation] ... [and] has been characterized as an essential and desirable component of the administration of justice. [Citation.] Concomitant with recognition of the necessity and desirability of the process is the notion that the integrity of the process be maintained by insuring that the state keep its word when it offers inducements in exchange for a plea of guilty." (People v. Mancheno (1982) 32 Cal.3d 855, 859-860 [187 Cal. Rptr. 441, 654 P.2d 211].)[4]
*974 In People v. Yu (1983) 143 Cal. App.3d 358 [191 Cal. Rptr. 859], the People were not estopped from rescinding their plea bargain with the defendant where his guilty plea had been withdrawn and he had been afforded a trial by jury. The court stressed the crucial factor in determining the People's right to rescind a plea bargain "is whether the defendant has given up a valuable constitutional right or otherwise detrimentally relied on the promises made in the plea bargain." (Id., at p. 372.)
(5b) Unlike the defendant in Yu, Ellsworth relied heavily on the plea bargain. He entered his guilty plea to the remaining charge, was sentenced and served jail time. These facts compel us to find the People estopped from rescinding their bargain so as to proceed with the felony prosecution for the same offense. (7) "[I]n the context of a broken plea agreement, there is more at stake than the liberty of the defendant or the length of his term. `At stake is the honor of the government[,] public confidence in the fair administration of justice, and the efficient administration of justice....' [Citations.]" (People v. Mancheno, supra, 32 Cal.3d at p. 866.)
(5c) As discussed above, the People's remedy for Ellsworth's allegedly fraudulent conduct in procuring the plea bargain is to attack the plea, not to refile the charge as a felony. Our observation mirrors that of another division of this court: "If the People had their pockets picked in [this] criminal case, it was because they neglected to button down the flaps." (People v. Municipal Court (1971) 14 Cal. App.3d 362, 366 [92 Cal. Rptr. 248].)
Let a peremptory writ of prohibition issue directing the superior court to grant Ellsworth's motion to dismiss the felony charges against him.
The alternative writ is discharged.
Trotter, P.J., and Crosby, J., concurred.
The petition of real party in interest for review by the Supreme Court was denied October 17, 1985.
NOTES
[1]  All subsequent statutory references are to the California Penal Code.
[2]  Section 654 provides: "... [A]n acquittal or conviction and sentence under [a provision of this Code] bars a prosecution for the same act or omission under any other...."
[3]  The identity of the offense is not changed by filing it as a felony the second time.
[4]  Although section 1192.7, added by Proposition 8 on June 8, 1982, limits the use of plea bargaining in cases involving serious felonies, it continues to be appropriate for lesser offenses.
