
135 Cal.Rptr.2d 602 (2003)
30 Cal.4th 1145
70 P.3d 1023
The PEOPLE, Plaintiff and Respondent,
v.
Keith Robert MELONEY, Defendant and Appellant.
No. S103633.
Supreme Court of California.
June 19, 2003.
*605 Campbell & Demetrick, Terence Rayner and James Farragher Campbell, San Francisco, for Defendant and Appellant.
Matthew Zwerling and J. Bradley O'Connell, San Francisco, for First District Appellate Project as Amicus Curiae on behalf of Defendant and Appellant.
Bill Lockyer, Attorney General, Robert R. Anderson, Chief Assistant Attorney General, Ronald A. Bass, Assistant Attorney General, Gerald A. Engler, Acting Assistant Attorney General, Joan Killeen, Moona Nandi and George F. Hindall III, Deputy Attorneys General, for Plaintiff and Respondent.
GEORGE, C.J.
Penal Code section 12022.1[1] provides that when a defendant who is on bail pending adjudication of a "primary offense" felony is convicted of a "secondary offense" felony, he or she "shall be subject to a penalty enhancement of an additional two years in state prison ...." (§ 12022.1, subd. (b).) The statute provides that when, as here, the secondary offense is adjudicated first, the court that adjudicates the secondary offense shall "stay imposition of the enhancement"; and that upon the defendant's conviction of the primary felony offense (typically by another court), the court that adjudicates that offense "shall" lift the stay. (Id., subd. (d).)[2]*606 We granted review to consider (1) whether either trial courtthe court that adjudicates the primary offense or the court that adjudicates the secondary offense (or both)possesses discretion under section 1385 to strike the two-year "on-bail" enhancement; and (2) the role, if any, of the secondary-offense court, should the primary-offense court fail to lift the stay after the defendant has been convicted of the primary offense. In light of the language and purpose of the statutory provision, we reach the following conclusions:
First, we conclude that when, as here, the secondary felony offense is adjudicated first and an on-bail enhancement is proved, the secondary-offense court may proceed in one of two ways: (1) The secondary-offense court mayfollowing the express terms of section 12022.1, subdivision (d)stay "imposition of the enhancement." If the court follows that course, the enhancement is not imposed as a part of the defendant's sentence but is preserved until after the primary-offense court has rendered judgment on a felony conviction in that court, at which time the secondary-offense court, exercising its discretion, may either impose the enhancement or strike it pursuant to section 1385.(2) Alternatively, the secondary-offense court may immediately consider whether to strike the enhancement under section 1385, or to impose the enhancement as part of the defendant's sentence. If the court concludes it is appropriate to exercise discretion to strike the enhancement, it may do so. If the court determines to impose the enhancement, it may do so, but it also must stay execution of that aspect of the sentence, pending resolution of the prosecution of the primary offense. If the court imposes the enhancement and stays its execution, that aspect of the imposed sentence becomes effective immediately upon the primary-offense court's order lifting the stay after the defendant has been convicted of the primary felony offense.
Second, we conclude that the primary-offense court lacks discretion under section 1385 to strike an enhancement that was pleaded and proved, and whose imposition was stayed in the secondary-offense court. Whether the secondary-offense court has issued a stay of imposition of the enhancement, or imposed the enhancement as a part of the defendant's sentence but stayed execution of that aspect of the sentence, the primary-offense court, upon the defendant's felony conviction on the primary offense, has the authority only to lift the stayand, indeed, it must lift the stay. Upon the primary-offense court's lifting a stay of imposition of the enhancement, the defendant must be returned to the secondary-offense *607 court, at which time that court must exercise its discretion under section 1385 and decide whether to strike the enhancement or impose sentence on the enhancement. Upon the primary-offense court's lifting of the stay of the execution of a previously imposed enhancement of the defendant's sentence, that enhanced sentence becomes effective immediately.
Third, with respect to an issue that arose in this case but should not often occur, we conclude that when the primary-offense court inadvertently fails to lift a stay following the defendant's conviction of the primary offense, that failure may be remedied either by a motion in the primary-offense court, by a motion in the secondary-offense court (which can take judicial notice of the conviction on the primary felony offense), or by a writ petition in the Court of Appeal. In the present case, we conclude that the Marin County Superior Court properly could take judicial notice of defendant's conviction of the primary offense in the Santa Clara County Superior Court and could lift its own previously imposed stay on the basis of that conviction, and then could proceed to determine whether to strike or to impose the on-bail enhancement as a part of the defendant's sentence.
Applying these rules to the present case, we conclude as follows. Contrary to the assumptions of the People, of amicus curiae on behalf of defendant, and of the Court of Appeal below, we do not read the record as demonstrating that the Marin County Superior Court (the secondary-offense court), at the sentencing hearing held after defendant's conviction of the secondary offenses, actually imposed the two-year enhancement as part of defendant's sentence, and then stayed execution of that aspect of the sentence. Instead, we find that the secondary-offense court at sentencing stayed imposition of the enhancement and hence merely preserved the enhancement by holding it in abeyance. Thereafter, the Santa Clara County Superior Court (the primary-offense court) erred by failing to lift that stay upon defendant's conviction of a felony in the primary-offense court. When the proceedings in the Santa Clara court were brought to the attention of the Marin court, the latter court was entitled to take judicial notice of defendant's felony conviction of the primary offense in the Santa Clara court and to lift its own previously issued stay. The Marin court also was entitled to determine whether to exercise its discretion under section 1385 to strike the enhancement, or to modify the sentence on the secondary offense by imposing the enhancement as part of defendant's sentence. Because the record demonstrates that at the time the matter was returned to the Marin court, that court operated under the erroneous belief that it lacked discretion to strike the enhancement, we shall reverse the Court of Appeal's judgment affirming the Marin court's imposition of the enhancement, and remand the matter to the Court of Appeal with directions to remand the case to the Marin court to permit that court to determine whether to exercise its discretion under section 1385 to strike the enhancement or instead impose the enhancement.
Finally, in light of the confusion demonstrated by the circumstances of this case, and the apparent ambiguity inherent in the statute, we observe that the Legislature may wish to consider whether section 12022.1, subdivision (d) should be clarified so that it expressly permits a secondary-offense court either to stay imposition of the enhancement or, alternatively, to impose the enhancement but stay its execution.

I
In May 1999, police officers conducted a search of defendant Keith Robert Meloney's *608 home in San Jose, discovering methamphetamine and related paraphernalia such as ledgers, scales, and baggies. Defendant was arrested and charged with the felony of possessing methamphetamine for the purpose of sale. (Health & Saf.Code, § 11378.) Pending trial on that charge (the primary offense) in the Santa Clara Superior Court, defendant was released on bail, and he relocated to Marin County. In early February 2000, defendant was arrested in Marin after methamphetamine with a street value of $2,500 was found in his car during a traffic stop. Defendant was charged, this time in Marin County, with the felony of transporting a controlled substance for the purpose of sale (Health & Saf.Code, § 11379, subd. (a)) (the secondary offense), among other offenses. It also was alleged that defendant had sustained three prior drug-related convictions (Pen.Code, § 1203.07, subd. (a)(11); Health & Saf.Code, § 11370.2, subd. (c)), andof particular significance to the issue before usthat defendant committed the charged felony offenses while released from custody on a felony case pending in Santa Clara County. (Pen.Code, § 12022.1.)
Defendant's trial in the Marin proceeding occurred prior to his Santa Clara trial. In the Marin proceeding, outside the presence of the jury, defendant admitted the prior drug-related conviction enhancement allegations and the section 12022.1 on-bail enhancement allegation. On November 8, 2000, upon defendant's conviction of transporting a controlled substance for the purpose of sale (the secondary offense), the Marin court imposed a sentence of six years in prisonthree years for the conviction of transporting methamphetamine for sale, and three years for one of the prior drug-related conviction enhancements. Addressing the allegation "pursuant to section 12022.1 of the Penal Code for a two-year enhancement," the court did not impose the enhancement as part of defendant's sentence, but instead stated that the "enhancement ... is stayed pursuant to Penal Code, section 12022.1(d) pending any conviction in the Santa Clara County case." The court summarized: "The total aggregate sentence therefore imposed is six years in the state prison, and that doesn't include the Penal Code, section 12022.1 enhancement that has been stayed pending the outcome of the proceeding in Santa Clara County." The court's resulting report and judgment, filed that same day, memorialized its oral ruling, stating that the "imposition of sentence [relating to the enhancement] is stayed pending any conviction in [the] Santa Clara County case" and that the "total aggregate term imposed is 6 year(s) ... in state prison." (Italics added.) The abstract of judgment similarly showed that a six-year prison term was imposed, and that the section 12022.1 enhancement allegation was "stayed at this time...."
One week after entry of the Marin judgment and sentence on the secondary offense, defendant pleaded guilty pursuant to a negotiated disposition in the Santa Clara court to possessing methamphetamine for sale, in connection with the 1999 incident (the primary offense), and admitted three prior-conviction sentence enhancements under Health and Safety Code section 11370.2, subdivision (c).[3] The record *609 of the Santa Clara proceeding discloses that the court referred briefly to the prior Marin case, but apparently possessed no documentation concerning that case indeed, the court at one point secured the docket number of the Marin case from defense counsel. The Santa Clara court imposed a negotiated eight-month prison sentence on the conviction for possessing methamphetamine for sale, and advised defendant that the sentence would be served "consecutive to the sentence you will be serving out of Marin County."[4] The court concluded: "So that the record is clear, from this county the defendant is serving only eight months ... consecutive to the Marin case."
Although section 12022.1, subdivision (d), specifies that the stay imposed by the Marin court concerning the two-year on-bail enhancement "shall be lifted by the court hearing the primary offense [i.e., the Santa Clara court] at the time of sentencing for that offense," at sentencing the Santa Clara court did not mention or address the on-bail enhancement or the stay concerning that enhancement issued by the Marin court. Indeed, there is no indication on the record of the Santa Clara proceeding that the Santa Clara court was aware that the Marin court had issued a stay related to that enhancement.
Defendant was remanded to the custody of the Department of Corrections and filed a notice of appeal from the Marin judgment. Thereafter, the Marin County District Attorney became aware of the Santa Clara court's failure to lift the stay concerning the two-year on-bail enhancement. A subsequent hearing was held in the Marin court on February 15, 2001, at which time the prosecutor asked the court to "impose the additional two-year sentence" enhancement "consecutive to [the] sentence [defendant is] now serving in the Department of Corrections." (Italics added.) Defense counsel argued that the Marin court should exercise discretion to decline to lift the stay, and should "consider still not imposing" the two-year sentence enhancement "because I think that would be more punishment ... than is appropriate for the conduct in this case."[5] (Italics added.) Asked by the court for his response, the prosecutor argued that "[t]here are no changes in circumstances since November 8th," and that "under my reading of section 12022.1, ... the court is mandated to impose sentence [relating to the enhancement] at this time." (Italics added.) The court called a recess in order to review the case file and "the sentence that was originally imposed in this case on November 8th." After conducting that review, the court addressed defendant and stated: "When I sentenced you on November 8th, 2000, as to [the on-bail enhancement] allegation, imposition of sentence was stayed pending any conviction in the Santa Clara case." (Italics added.) The court observed that under the statute, the primary-offense courtthe Santa Clara court"shall" lift such a stay following conviction on the primary felony offense at the time of sentencing on that offense, but implicitly observed that the Santa Clara court had failed to do so. The Marin court continued: "You have now been convicted *610 and sentenced in Santa Clara County, therefore the stay that this court ordered on November 8th with respect to [the on-bail enhancement] allegation is lifted and that penalty, which is two years in state prison, is imposed. This court has no discretion to make any other order at this time." (Italics added.) The court ordered that the abstract of judgment be amended to provide for the additional two-year term, and the abstract was so amended to show imposition of an eight-year prison term.
On appeal from the Marin conviction and resulting eight-year sentence, defendant asserted, among other claims, that only the Santa Clara court had authority to lift the Marin court's stay, and that the Marin court's action, lifting its own stay, was void.
The Court of Appeal rejected defendant's contentions. The court reasoned that the Santa Clara court "acquired a very limited jurisdiction over the enhancement" stayed by the Marin court. The appellate court found that the Santa Clara court "had jurisdiction to lift the stay, nothing more." The Court of Appeal further reasoned that the Marin court "also retained jurisdiction over the enhancement it had imposed ... including the jurisdiction and mandatory duty to lift its own stay and sentence." The Court of Appeal concluded that "[e]ven if we were to find that the Marin County court erred in lifting the stay ... any error would obviously be harmless. [Citations.] The lifting of the stay was a mandatory act following [defendant's] conviction in Santa Clara County, and he does not suggest how he would have fared better if the court in Santa Clara County, rather than the Marin County court, had lifted the stay."
We granted defendant's petition for review to consider the proper application of section 12022.1 in these circumstances.

II

A
Section 12022.1, subdivision (b) provides: "Any person arrested for a secondary [felony] offense which was alleged to have been committed while that person was released from custody on a primary [felony] offense shall be subject to a penalty enhancement of an additional two years in state prison which shall be served consecutive to any other term imposed by the court." (Italics added.)[6] In the present case, the Santa Clara offense was the primary offense, and the Marin offense was the secondary offense.
We first address the question whether a court has discretion to strike an on-bail enhancement. As defendant and amicus curiae argueand as the People concede in their answer briefwe conclude that a court may strike such an enhancement.
It is well established that, as a general matter, a court has discretion under section 1385, subdivision (c),[7] to dismiss *611 or strike an enhancement, or to "strike the additional punishment for that enhancement in the furtherance of justice." As we held in People v. Thomas (1992) 4 Cal.4th 206, 14 Cal.Rptr.2d 174, 841 P.2d 159, "absent a clear legislative direction to the contrary, a trial court retains its authority under section 1385 to strike an enhancement." (Id., at p. 210, 14 Cal. Rptr.2d 174, 841 P.2d 159; see also People v. Fritz (1985) 40 Cal.3d 227, 229-230, 219 Cal.Rptr. 460, 707 P.2d 833 [a trial court's authority to "`dismiss' an action `in furtherance of justice' under section 1385 includes the power to `strike' a prior conviction for purposes of sentencing ...." (fn.omitted) ].) Moreover, although section 12022.1, subdivision (b), provides that a person in defendant's situation "shall be subject to a penalty enhancement of an additional two years in state prison" (italics added), as the Court of Appeal observed in People v. Wilson (2002) 95 Cal. App.4th 198, 202, 115 Cal.Rptr.2d 355, "[g]eneral mandatory language, such as `shall' ... is insufficient to support a finding of Legislative intent to divest trial courts of discretion under Penal Code section 1385 to strike enhancements."[8]
Indeed, the Legislature not only has failed to evince a clear intent that section 1385 should not apply to enhancements imposed under section 12022.1, it clearly has demonstrated the opposite intent. Until 1998, Penal Code section 1170.1, subdivision (h), provided: "Notwithstanding any other law, the court may strike the additional punishment for the enhancements provided in subdivision (c) of Section 186.10 and Sections 667.15, 667.5, 667.8, 667.83, 667.85, 12022, 12022.1, 12022.2,12022.4,12022.6,12022.7,12022.75, and 12022.9 of this code, or the enhancements provided in Section 11370.2, 11370.4, or 11379.8 of the Health and Safety Code, if it determines that there are circumstances in mitigation of the additional punishment and states on the record its reasons for striking the additional punishment." (Stats.1993, ch. 661, § 17.98, pp. 3544-3545, italics added.)
The Legislature repealed this subdivision of the Penal Code effective January 1, 1998, stating at the time: "In repealing subdivision (h) of Section 1170.1, which permitted a court to strike punishment for certain listed enhancements, it is not the intent of the Legislature to alter the existing authority and discretion of the court to strike those enhancements or to strike the additional punishment for those enhancements pursuant to Section 1385, except insofar as that authority is limited by other provisions of the law." (Stats. 1997, ch. 750, § 9.) From this history it is apparent that the Legislature views sentence enhancements under section 12022.1 as being subject to a trial court's discretion to strike pursuant to section 1385.

B
Subdivision (d) of section 12022.1 addresses procedures applicable when, as here, the secondary offense is tried and the proceedings result in a conviction and sentence prior to trial of, and conviction on, the primary felony offense. The subdivision provides that in such a circumstance, "the imposition of the enhancement shall be stayed pending imposition of *612 the sentence for the primary offense. The stay shall be lifted by the court hearing the primary offense at the time of sentencing for that offense and shall be recorded in the abstract of judgment. If the person is acquitted of the primary offense the stay shall be permanent." (Ibid., italics added.)[9]
As we explain, the statute's italicized language poses potential procedural problems, and may have contributed to the apparent confusion in the Marin court. The statute advises the secondary-offense court that "imposition of the enhancement shall be stayed." (§ 12022.1, subd. (d).) There is a substantiveand substantial difference between, on the one hand, staying the imposition of an enhancement, and, on the other, imposing sentence on an enhancement, but staying the execution of that part of the sentence. In the first instance, the question whether to strike the enhancement or impose sentence on the enhancement is put in abeyance; in the second, sentence on the enhancement is imposed as part of the sentence but execution of that aspect of the sentence is stayed. This distinction is well established in the probation statutes (see § 1203.1 ["The court or judge thereof, in the order granting probation, may suspend the imposing, or the execution, of the sentence ...."]; see 3 Witkin & Epstein, Cal.Criminal Law (3d ed.2000) Punishment, §§ 538-540, pp. 724-726), and it has been recognized in other sentencing contexts. (See, e.g., People v. Bell (1984) 159 Cal.App.3d 323, 329, 205 Cal.Rptr. 568 [enhancements imposed, but execution of sentence stayed to comply with double-the-base-term limitation]; People v. Whigam (1984) 158 Cal. App.3d 1161, 1169, 205 Cal.Rptr. 227 [same]; People v. Niles (1964) 227 Cal. App.2d 749, 755-756, 39 Cal.Rptr. 11 [ban on double punishment under 654 can be avoided by staying execution of sentence for a lesser offense pending appeal (with a proviso that the stay will become permanent when the sentence on the greater offense is completed) ].)
Although at first reading the express terms of the statute seem to contemplate only a stay of the imposition of the enhancement, viewing the statute as a whole, and considering its basis and rationale, an alternative interpretation is justified: The statute additionally permitsand in most instances the efficient administration of justice would favorthat a secondary-offense court at the initial sentencing hearing make the determination whether to strike the on-bail enhancement or to impose the enhancement as a part of the defendant's sentence, and, if it determines to impose the enhancement, to stay only the execution of that aspect of the sentence. The basis for this more expansive reading of the statute was well explicated in Justice Thaxter's opinion for the Fifth Appellate District Court of Appeal in People v. Rodriguez Alaniz (1993) 14 Cal. App.4th 1841, 18 Cal.Rptr.2d 597 (Rodriguez Alaniz).
In Rodriguez Alaniz, supra, 14 Cal. App.4th 1841, 18 Cal.Rptr.2d 597, a defendant who was on bail pending felony charges in Fresno County (the primary-offense court) was arrested for another felony in Merced County (the secondary-offense court), and an on-bail sentence enhancement was alleged as to the Merced charges. As in the present case, the secondary-offense *613 charges were prosecuted first, the defendant admitted the truth of the on-bail enhancement allegation, and pursuant to section 12022.1 the trial court issued a stay regarding the enhancement. (Rodriguez Alaniz, at pp. 1843-1845, 18 Cal.Rptr.2d 597.) Subsequently, upon the defendant's conviction of a felony in the primary-offense court, that court lifted the secondary-offense court's stay. The People argued on appeal that the secondary-offense court actually had imposed the enhancement as a part of the defendant's sentence but stayed execution of that aspect of the sentence, and that when the primary-offense court lifted the stay, the two-year enhancement related to the secondary offense became operative. The defendant asserted, in response, that the secondary-offense court merely had stayed imposition of the enhancement, and that when the primary-offense court lifted the stay the defendant remained free from any imposed sentence enhancement absent further action by the secondary-offense court. (Id., at pp. 1846-1847, 18 Cal. Rptr.2d 597.) The appellate court in Rodriguez Alaniz agreed with the defendant, and held that if the enhancement were to be imposed, the matter would have to be returned to the secondary-offense court in order to enable that court to do so. (Id., at p. 1850,18 Cal.Rptr.2d 597.)
In so concluding, the court in Rodriguez Alaniz, supra, 14 Cal.App.4th 1841, 18 Cal. Rptr.2d 597, thoroughly reviewed section 12022.1 and its history. The court explained that, despite the statutory language, the Legislature did not intend to "distinguish between a stay of imposition and a stay of execution for an `on-bail' enhancement attaching to a secondary offense conviction when the primary offense is still pending" (14 Cal.App.4th at p. 1847, 18 Cal.Rptr.2d 597), but instead intended to permit a trial court actually to impose an on-bail enhancement and yet stay its execution. In light of the clarity of its explanation, we set forth the reasoning of the court in Rodriguez Alaniz at some length.
"The procedural provisions of section 12022.1 dealing with cases in which sentencing on the secondary offense precedes sentencing on the primary offense were added by amendment in 1985. (Stats.1985, ch. 533, § 1, p.1905.) The amendment's legislative history shows that its purpose was to overrule certain appellate court decisions, specifically including Patios v. Superior Court (1984) 156 Cal.App.3d 626, 203 Cal.Rptr. 115. (People v. Baries (1989) 209 Cal.App.3d 313, 321, 256 Cal. Rptr. 920.) In Panos, the issue was the propriety of imposing an on-bail enhancement under section 12022.1 when, at the time of sentencing on the second offense, there had been no conviction on the offense leading to the defendant's on-bail status. In other words, the setting in Panos was the same presented to the Merced court here. The difference was that when Panos was decided, section 12022.1 did not provide a mechanism for imposing the enhancement if sentencing on the secondary offense took place prior to conviction on the primary offense. The appellate court issued a writ of prohibition barring further proceedings on the enhancement. Notable in the [Panos] opinion is the following language:
"`The trial court determined and the People urge us to find that conviction on the earlier ... felony is a necessary predicate only for execution of the enhanced penalty and is not an essential element of the enhancement charge itself. Thus, the argument goes, if the court in [the later case] finds the section 12022.1 enhancement to be true as alleged even without proof the earlier felony resulted in a conviction, the enhanced penalty can be imposed but its execution must be stayed *614 pending factual resolution of the [earlier felony] charge.
"`We decline to adopt the People's interpretation because it would add to the statute a dimension which is neither expressly included in nor suggested by its plain language. Penal Code section 12022.1 addresses various sentencing possibilities after a conviction on the earlier felony offense has been established, but it significantly fails to provide a mechanism for imposing and then staying service of the penalty enhancement pending a conviction on the earlier felony charge.' ([Panos v. Superior Court, supra,] 156 Cal. App.3d at pp. 629-630 [203 Cal.Rptr. 115].)" (Rodriguez Alaniz, supra, 14 Cal. App.4th 1841, 1847-1848, 18 Cal.Rptr.2d 597, first italics added.)
The court in Rodriguez Alaniz, supra, 14 Cal.App.4th 1841, 18 Cal.Rptr.2d 597, continued: "As noted, the Legislature responded to Panos by amending section 12022.1 in 1985. The amendment was embodied in Senate Bill No. 343 which, in its final form, passed both houses of the Legislature without a dissenting vote. We have examined the legislative history of the bill. Nothing in that history indicates an intent to preclude the court sentencing for the secondary offense from imposing [sentence on] the enhancement and then staying its execution. On the contrary, several `Senate Floor Analyses' and committee analyses of the bill explicitly indicate the intent was to `allow the court to impose the two-year enhancement, once there was a conviction for the secondary offense, but the enhancement would be stayed pending conviction for the primary offense.' (See Rep. of Sen. Com. on Judiciary, Sen. Bill No. 343 (1985-1986 Reg. Sess.) Apr. 16, 1985; Sen. Floor Analysis of Sen. Bill No. 343 (1985-1986 Reg. Sess.) May 1, 1985 and July 16, 1985.) These statements evidence an intent to provide what the Panos court noted was previously lacking (`a mechanism for imposing and then staying service of the penalty enhancement pending a conviction on the earlier felony charge'). ([Panos v. Superior Court, supra,] 156 Cal.App.3d at p. 630, 203 Cal.Rptr. 115.)
"Moreover, several analyses of the bill indicate that there would be no `local' fiscal effect. However, if the court hearing the secondary offense may not stay execution of the enhancement but only its imposition, that court must, after the court hearing the primary offense has lifted the stay, hold another sentencing hearing to impose the enhancement. Under those circumstances there would obviously be some local fiscal impact.
"The legislative history, in the light of Panos, clearly indicates that the intent of that portion of the 1985 amendment in question here was to preserve the enhancement until there had been convictions on both the primary and secondary offenses. That purpose is as well served by an order staying execution [of sentence relating to] the enhancement as it is by an order staying imposition [of the enhancement] at the first sentencing. And the failure of the Legislature to provide that the court hearing the primary offense should order transfer of the defendant to the other court after lifting the stay is some indication that the Legislature contemplated that the stay would be of the enhancement's execution so that further judicial action was unnecessary.
"Even though the statute's language (`the imposition of the enhancement shall be stayed') appears unambiguous, `"`[t]he literal meaning of the words ... may be disregarded to give effect to manifest purposes that, in the light of the statute's legislative history, appear from its provisions considered as a whole.'" [Citations.]' (Leffel v. Municipal Court (1976) 54 Cal.App.3d 569, 572 [126 Cal.Rptr. 773].)" (Rodriguez Alaniz, supra, 14 Cal. *615 App.4th at pp. 1848-1849, 18 Cal.Rptr.2d 597.)
Applying its understanding of the statute to the facts before it, the court in Rodriguez Alaniz, supra, 14 Cal.App.4th 1841, 18 Cal.Rptr.2d 597, stated:
"We conclude that the Merced court could have imposed but stayed execution of the enhancement. Unfortunately, the record does not support respondent's contention that the Merced court did so. Before sentence was pronounced, the prosecutor advised the Merced court that `imposition of the enhancement shall be stayed pending the imposition of sentence for the primary offense.' Defense counsel agreed with that statement. The court then imposed sentence on certain counts, but ordered that `[other counts] are stayed as is the enhancement. ...' (Italics added.) The court never advised appellant his sentence was being enhanced, but that execution of the enhancement was stayed. [¶] ... [¶]
"When the judgment in the instant action, including the order lifting stay, becomes final, the Merced court will be free to impose the enhancement.... [W]e believe the proper procedure would then be for this court to remand that case to the Merced Superior Court to deal with the enhancement.
"The statute does not confer power on the Fresno court to do anything with respect to the enhancement other than lift the stay. We see no basis upon which the Fresno court can impose an enhancement to the Merced court's sentence when the enhancement was pleaded and proved in the Merced action." (Rodriguez Alaniz, supra, 14 Cal.App.4th at pp. 1849-1850, 18 Cal.Rptr.2d 597.)

C
We agree with the interpretation of the statute set out in Rodriguez Alaniz, supra, 14 Cal.App.4th 1841, 18 Cal.Rptr.2d 597. In addition to the points set forth in that decision concerning (i) the case law that led to the amendment of section 12022.1, subdivision (d), (ii) the legislative history of that amendment,[10] and (iii) the absence of any procedure in an otherwise detailed statutory scheme for returning a case to the secondary-offense court once the primary-offense court has entered a felony conviction, we find that the Legislature's actions subsequent to the opinion in Rodriguez Alaniz, supra, 14 Cal.App.4th 1841, 18 Cal.Rptr.2d 597, demonstrate its endorsement of the interpretation set out in that opinion.
At the time Rodriguez Alaniz, supra, 14 Cal.App.4th 1841, 18 Cal.Rptr.2d 597, was filed in April 1993, section 1170.1, subdivision (d), read as follows: "When the court imposes a prison sentence for a felony pursuant to Section 1170 [the Determinate Sentencing Act] the court shall also impose the additional terms provided in sections 667, 667.5, 667.8, 667.85, 12022, 12022.2, 12022.4, 12022.5, 12022.55, 12022.6, 12022.7, 12022.75, and 12022.9 ..., unless the additional punishment therefor is stricken pursuant to subdivision (h)." (Italics added.) Five months after Rodriguez Alaniz was filed, the Legislature amended section 1170.1, subdivisions (d) and (h), to add to those respective lists the provision that concerns us nowsection 12022.1. (See Stats.1993, ch. 611, § 17.98, pp. 3543, 3544.) By this amendment of section 1170.1, the Legislature appears to have expressly endorsed the construction of section 12022.1, subdivision (d) set out in Rodriguez Alaniz.[11]
*616 Furthermore, although the Legislature has amended section 12022.1 in unrelated respects in the intervening 10 years since the opinion in Rodriguez Alaniz was filed (see Stats.1998, ch. 119, § 1), the Legislature has not amended subdivision (d) of that statute. We have observed that when as here "`a statute has been construed by judicial decision, and that construction is not altered by subsequent legislation, it must be presumed that the Legislature is aware of the judicial construction and approves of it.' [Citations.] 'There is a strong presumption that when the Legislature reenacts a statute which has been judicially construed it adopts the construction placed on the statute by the courts.'" (Wilkoff v. Superior Court (1985) 38 Cal.3d 345, 353, 211 Cal.Rptr. 742, 696 P.2d 134.) As in Cel-Tech Communications, Inc. v. Los Angeles Cellular Telephone Co. (1999) 20 Cal.4th 163, 83 Cal.Rptr.2d 548, 973 P.2d 527a decision in which we relied upon the maxim of legislative acquiescencewe find that although "[legislative inaction is often not a convincing reason for refusing to change a [prior] statutory interpretation" (id., at p. 178, 83 Cal.Rptr.2d 548, 973 P.2d 527), under the circumstances described above the maxim has persuasive force.

D
Accordingly, we conclude that section 12022.1, subdivision (d) permits the secondary-offense court to impose a two-year on-bail enhancement as part of a defendant's sentence, and to stay execution of that aspect of the sentence, pending disposition of the primary-offense felony case. Indeed, in some respects this procedure appears preferable to the statutorily permissible alternative of staying imposition of the enhancement. As illustrated by Rodriguez Alaniz, supra, 14 Cal.App.4th 1841, 18 Cal.Rptr.2d 597, in at least some circumstances the action of a court in staying imposition of the enhancement (rather than imposing the enhancement as part of a defendant's sentence and then staying execution of that aspect of the sentence) may not fully implement the Legislature's intent in adding subdivision (d) to section 12022.1 in 1985, in response to Panos v. Superior Court, supra, 156 Cal.App.3d 626, 203 Cal.Rptr. 115. Whenever the secondary-offense court follows the literal statutory language and stays imposition of the enhancement, instead of imposing the enhancement and staying execution of that aspect of the sentence, at least some of the efficiencies that are contemplated by subdivision (d) may be lost. The action of the primary-offense court in lifting the stay does not result in the automatic execution of an imposed but stayed sentence, but instead may lead to the physical transfer of the incarcerated defendant back to the secondary-offense court for a further sentencing hearing to determine whether to strike or impose the enhancement.
On the other hand, however, the Legislature may have reasons to prefer that, in at least some circumstances, a secondary-offense trial court have the option of postponing actual imposition of sentence on the enhancementin order, for example, to obtain additional information concerning the sentence imposed by the primary-offense court.
*617 In any event, we believe it prudent to highlight this ambiguity and tension in the statute, and encourage the Legislature to consider whether section 12022.1, subdivision (d) should be clarified so that a trial judge will be able to discern immediately, from the face of the statute, that it permits a secondary-offense court either to stay imposition of the enhancement, or, alternatively, to impose the enhancement but stay its execution.
We also conclude that under section 12022.1, subdivision (d), when the secondary offense is tried and resolved first, the secondary-offense court, and only that court, has the authority to either strike the enhancement under section 1385, or to impose the enhancement as part of the defendant's sentence.
Finally, we further conclude that once there has been a conviction on the primary felony offense, the sole role of the court in which that conviction occurred and the full extent of its authoritysimply is to lift the stay issued by the secondary-offense court.[12]

E
Applying these principles to the case before us, we first conclude that at the sentencing hearing held on November 8, 2000, the Marin court, following the express terms of the statute, stayed imposition of the enhancement; it did not impose the enhancement as part of defendant's sentence and then stay execution of that aspect of the sentence. Although the People point to passages in the reporter's transcript of a later hearing that suggest a contrary view,[13] we find that the record is clear. The trial court's statements at the November 8 sentencing hearing, and its filed report and judgment of that date, demonstrate that the court stayed imposition of sentence on the enhancement. Any doubt on that point is dispelled by the Marin court's own assessment made on February 15, 2001, at which time that court was asked to lift its own stay and *618 impose the two-year enhancement. After reviewing the file in order to determine what it actually had done on November 8, 2000, the court confirmed that at that sentencing hearing it had stayed imposition of sentence on the enhancement.[14] It follows that, prior to the hearing held by the Marin court on February 15, 2001, the two-year on-bail enhancement had not been imposed.
Defendant and amicus curiae on his behalf assert that the Santa Clara court, by failing to lift the Marin court's stay, and by accepting a plea agreement on the Santa Clara felony charges under which defendant would serve only eight months in prison (in addition to the Marin sentence), implicitly exercised its discretion to decline either to revive or to impose the two-year on-bail enhancement. We reject this view for three reasons. First, the Santa Clara court had no authority to decline to lift the stay. Second, there was nothing for the Santa Clara court to decline to revive; as explained above, the enhancement never had been imposed and made part of defendant's sentence by the Marin court in the first place. Third, the Santa Clara court would have lacked authority to impose sentence on an enhancement related to another crime and sentence rendered by another court, and hence it could not exercise any authority to decline to impose such an enhancement. In other words, even had the enhancement been imposed and been made part of the sentence imposed upon defendant by the Marin court on November 8, the Santa Clara court, in imposing a felony sentence, lacked any discretion to strike or decline to enforce that aspect of the Marin sentence.
We turn finally to the claim of defendant and amicus curiae on his behalf, that the Marin court erred by lifting its own stay.
The stay of imposition of the enhancement served the purpose for which it was intended by the Legislature"to preserve the enhancement until there had been convictions on both the primary and secondary offenses." (Rodriguez Alaniz, supra, 14 Cal.App.4th 1841, 1849, 18 Cal.Rptr.2d 597.) But that objective having been achieved, there is no reason to insist that the primary-offense court, rather than the secondary-offense court, lift that stay. On the facts presented, the Marin court could, and properly did, lift its own stay of imposition of sentence on the enhancement.
As noted above, immediately after the Marin court lifted that stay on February 15, 2001, it thenfor the first time actually imposed the term provided for the enhancement, thereby modifying defendant's sentence. The court informed defendant: "You have now been convicted and sentenced in Santa Clara County, therefore the stay that this court ordered on November 8th with respect to [the on-bail enhancement] allegation is lifted and that penalty, which is two years in state prison, is imposed. This court has no discretion to make any other order at this time." (Italics added.)
In so ruling, the Marin court erred. As noted ante, pail II. A., it did have discretion *619 to do otherwiseand to do so at that time. As we have observed, prior to the February 15, 2001, hearing the Marin court had not imposed the enhancement as part of defendant's sentence. Defendant had a right to have that court exercise the discretion it possessed under section 1385, prior to actually imposing sentence on the enhancement. Although defendant does not now explicitly press the point, the Marin court never clearly declined to exercise that discretion, and on the record before us it appears that the court was unaware of its authority to do so. Therefore, the matter must be remanded to the Marin court so that it may exercise its sentencing discretion.

III
We reverse the judgment of the Court of Appeal, and direct the court to remand the matter to the Marin County Superior Court for a new sentencing hearing at which that court shall exercise its discretion under section 1385 in deciding whether to strike the two-year enhancement provided by section 12022.1 or impose the term provided for that enhancement.
WE CONCUR: KENNARD, BAXTER, WERDEGAR, CHIN, BROWN and MORENO, JJ.
NOTES
[1]  Subsequent statutory references are to the Penal Code unless otherwise indicated.
[2]  The statute reads in relevant part:

(a) For the purposes of this section only: [¶] (1) `Primary offense' means a felony offense for which a person has been released from custody on bail or on his or her own recognizance prior to the judgment becoming final, including the disposition of any appeal, or for which release on bail or his or her own recognizance has been revoked.... [¶] (2) 'Secondary offense' means a felony offense alleged to have been committed while the person is released from custody for a primary offense.
"(b) Any person arrested for a secondary offense which was alleged to have been committed while that person was released from custody on a primary offense shall be subject to a penalty enhancement of an additional two years in state prison which shall be served consecutive to any other term imposed by the court.
"(c) The enhancement allegation provided in subdivision (b) shall be pleaded in the information or indictment which alleges the secondary offense, or in the information or indictment of the primary offense if a conviction has already occurred in the secondary offense, and shall be proved as provided by law. The enhancement allegation may be pleaded in a complaint but need not be proved at the preliminary hearing or grand jury hearing.
"(d) Whenever there is a conviction for the secondary offense and the enhancement is proved, and the person is sentenced on the secondary offense prior to the conviction of the primary offense, the imposition of the enhancement shall be stayed pending imposition of the sentence for the primary offense. The stay shall be lifted by the court hearing the primary offense at the time of sentencing for that offense and shall be recorded in the abstract of judgment. If the person is acquitted of the primary offense the stay shall be permanent.
"(e) If the person is convicted of a felony for the primary offense, is sentenced to state prison for the primary offense, and is convicted of a felony for the secondary offense, any state prison sentence for the secondary offense shall be consecutive to the primary sentence.
"(f) If the person is convicted of a felony for the primary offense, is granted probation for the primary offense, and is convicted of a felony for the secondary offense, any state prison sentence for the secondary offense shall be enhanced as provided in subdivision (b).
"(g) If the primary offense conviction is reversed on appeal, the enhancement shall be suspended pending retrial of that felony. Upon retrial and reconviction, the enhancement shall be reimposed. If the person is no longer in custody for the secondary offense upon reconviction of the primary offense, the court may, at its discretion, reimpose the enhancement and order him or her recommitted to custody."
[3]  Health and Safety Code section 11370.2, subdivision (c), establishes a three-year sentence enhancement for a defendant who is convicted of violating Health and Safety Code section 11378, and who has a qualifying prior conviction.

In an order issued prior to oral argument, we granted defendant's request that we take judicial notice of the reporter's transcript of the proceedings of November 22, 2000, in People v. Meloney, Santa Clara Superior Court No. E9910958, and the minute order pertaining to the sentencing in that matter, dated November 22, 2000.
[4]  The Santa Clara court also imposed a restitution fine and ordered defendant to reimburse the county for various laboratory fees. Finally, the Santa Clara court exercised discretion under section 1385 to strike the Health and Safety Code section 11370.2, subdivision (c) enhancements that were applicable to the primary offense, "as a result of the negotiated disposition."
[5]  Counsel also asserted that because a notice of appeal had been filed relating to the Marin judgment, the Marin court lacked jurisdiction to act on the district attorney's request. (But see § 1170, subd. (d) [trial court has authority to recall a sentence and impose a new sentence within 120 days of the date of commitment to prison]; see also Portillo v. Superior Court (1992) 10 Cal.App.4th 1829, 1834-1836, 13 Cal.Rptr.2d 709.)
[6]  Section 12022.1, subdivision (a) requires that, for purposes of the statute, both the primary and secondary offenses be felonies.
[7]  That statute provides in full: "(a) The judge or magistrate may, either of his or her 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. [¶] (b) This section does not authorize a judge to strike any prior conviction of a serious felony for purposes of enhancement of a sentence under Section 667.[¶] (c)(1) If the court has the authority pursuant to subdivision (a) to strike or dismiss an enhancement, the court may instead strike the additional punishment for that enhancement in the furtherance of justice in compliance with subdivision (a).

(2) This subdivision does not authorize the court to strike the additional punishment for any enhancement that cannot be stricken or dismissed pursuant to subdivision (a)."
[8]  Indeed, the statutory language employed in section 12022.1, subdivision (b)providing that a defendant "shall be subject to" an enhancementsuggests even more strongly that the enhancement is not to be viewed as mandatory. (Cf. People v. One 1986 Cadillac Deville (1999) 70 Cal.App.4th 157, 160, 82 Cal.Rptr.2d 509 ["[T]o say that property is `subject to' forfeiture admits the possibility that it may not be forfeited even though the conditions necessary to `subject' the property to forfeiture are met."].)
[9]  Plainly, the statute contemplates that sentence on an on-bail enhancement will not be executed unless the defendant ultimately is convicted of both the primary and secondary felony offenses. (See generally People v. Walker (2002) 29 Cal.4th 577, 586, 128 Cal. Rptr.2d 75, 59 P.3d 150; In re Jovan B. (1993) 6 Cal.4th 801, 809, 25 Cal.Rptr.2d 428, 863 P.2d 673; People v. McClanahan (1992) 3 Cal.4th 860, 869-870, 12 Cal.Rptr.2d 719, 838 P.2d 241.)
[10]  Prior to oral argument we issued an order granting the People's request that we take judicial notice of the cited legislative history.
[11]  The current version of section 1170.1, subdivision (d) omits all references to specific sentencing enhancement statutes, and instead provides simply: "When the court imposes a prison sentence for a felony pursuant to Section 1170 [the Determinate Sentencing Act] . . . the court shall also impose, in addition and consecutive to the offense of which the person has been convicted, the additional terms provided for any applicable enhancements." (Stats. 1997, ch. 750, § 3, italics added.) As observed ante, part II.A., former section 1170.1, subdivision (h)which, as noted, was referred to in the original version of section 1170.1, subdivision (d)has since been repealed, with no substantive change intended.
[12]  Having reached these conclusions, we need not address the arguments of amicus curiae on behalf of defendant that the People forfeited any right to have the Marin court modify its own judgment, because the People (i) failed to object in Santa Clara when that court failed to lift the Marin court's stay; (ii) consented to the plea agreement concerning the Santa Clara judgment; and (iii) failed to timely appeal from the Santa Clara judgment. As explained above, the underlying premise upon which these arguments are founded that the Santa Clara court had discretion to strike or to decline to impose the two-year on-bail enhancement related to the Marin offenseis incorrect.
[13]  The People rely upon a comment by the court, made five days after the November 8, 2000, sentencing hearing, at a subsequent proceeding concerning whether the court should issue a bench warrant requiring defendant's return to the Marin court following disposition of the then pending Santa Clara charges. In the course of discussing that issue, the prosecutor at one point interjected: "With respect to the 12022.1, your Honor" The court replied, "Yes?" The prosecutor continued: "you imposed that but stayed it." The court responded, "That's right." The prosecutor proceeded to point out (correctly) that if that were true, and assuming defendant were convicted of a felony in the Santa Clara case, defendant would not need to return to the Marin court because the Santa Clara court presumably would "lift the stay"at which time the enhancement would become effective. The court did not indicate whether it agreed with that assertion, but merely replied, "Thank you." At that point defense counsel stated, "Judge, if that's the case, do we need a bench warrant?" The court replied, "I don't know." Contrary to the People's suggestion, we decline to read the court's fleeting response to the prosecutor's bare assertion as calling into doubt the court's clear statement, made at the actual sentencing hearing and memorialized in the resulting report and judgment, that the court in fact had stayed imposition of the enhancement.
[14]  At the February 15, 2001, hearing, immediately after the prosecutor asked the court to "impose the additional two-year sentence," the prosecutor contradicted himself and stated that "[o]n November 8th, 2000, the Court did in fact impose those two years, stayed it pending ... the determination as to whether or not [defendant] was going to be convicted in Santa Clara County...." Defense counsel quickly agreed with the prosecutor's mischaracterization and proceeded to argue that the Santa Clara court's failure to lift the stay should be honored by the Marin court. Once again, we decline to read these comments as calling into doubt the court's clear statement, made at the actual sentencing hearing and memorialized in the resulting report and judgment, that the court in fact had stayed imposition of the enhancement.
