
114 Cal.Rptr.2d 349 (2001)
94 Cal.App.4th 442
The PEOPLE, Plaintiff and Respondent,
v.
Keith Robert MELONEY, Defendant and Appellant.
No. A093589.
Court of Appeal, First District, Division Five.
December 11, 2001.
Review Granted March 13, 2002.
*351 Terence Rayner, James Farragher Campbell, Campbell & Demetrick, for Appellant.
Bill Lockyer, Attorney General, Robert R. Anderson, Chief Assistant Attorney General, Ronald A. Bass, Senior Assistant Attorney General, Gerald A. Engler, Supervising Deputy Attorney General, Joan Killeen, Deputy Attorney General, for Respondent.
Certified for Partial Publication.[*]
*350 STEVENS, J.
Appellant Keith Robert Meloney was convicted after a jury trial of transportation of methamphetamine and possession of methamphetamine for purposes of sale, as well as the misdemeanor offense of driving on a suspended driver's license. (Health & Saf.Code, §§ 11379, subd. (a), 11378; Veh.Code, § 14601.1, subd. (a).) Appellant contends the trial court abused its discretion in three evidentiary rulings, and should not have lifted a stay of a mandatory two-year sentence enhancement charging that appellant was released on bail in Santa Clara County when he committed the present offenses. We reject these contentions and affirm the judgment.

I. FACTS AND PROCEDURAL HISTORY

On the evening of February 2, 2000, at around 11:15 p.m., appellant was driving the car of his passenger and eventual codefendant, Jason Gadoury, at a high rate of speed near the west end of the Richmond-San Rafael Bridge. Two San Rafael police officers in a marked patrol vehicle, Ray Fernandez and Jean Ahuncain, followed and made a traffic stop of the speeding vehicle. Just before the car came to a stop, Fernandez noticed the driver (appellant) lean over toward his passenger, Gadoury, so that appellant's shoulder was no longer visible to the officer. Upon approaching the vehicle, Fernandez noticed on the right rear floorboard a "torch," i.e., a small propane canister with a tip, commonly used for smoking drugs.
Appellant had no driver's license or other identification in his possession. The officers soon determined that his license had been suspended, and appellant was arrested for driving on a suspended license. He was then searched, and the officers found currency in the amount of $284 and some cigarettes. Around this time another police officer, Wanda Spaletta, arrived at the scene.
Gadoury was questioned, and he told the officers there might be drugs hidden in his sock. As Gadoury was about to be searched, appellant made a statement, not in response to any questioning, to Officer Spaletta: "that kid [meaning Gadoury] is going to get in trouble for something that I did." From Gadoury's sock the officers then retrieved a glass pipe and packages containing what appeared to be a large quantity of methamphetamine. Gadoury told the officers that the drugs were appellant's, and that appellant gave him the drugs to hide just before the car was pulled over for speeding.
An information was filed in which appellant and Gadoury were both charged with various crimes arising from their arrests of February 2, 2000. Each was charged with transportation of methamphetamine, count 1, (Health & Saf.Code, § 11379, subd. (a)), and possession of methamphetamine for sale, count 2 (Health & Saf.Code, § 11378). The information also alleged in count 3 that Gadoury was an accessory after the fact to the crimes of transportation of controlled *352 substances and possession for sale of methamphetamine. (Pen.Code, § 32.)[1] Appellant was additionally charged in count 4 with the misdemeanor offense of driving on a suspended license. (Veh. Code, § 14601.1, subd. (a).)
The information also contained various special allegations relative to appellant Meloney. These included three charged prior convictions pursuant to sections 1203.07, subdivision (a)(11) and Health and Safety Code 11370.2, subdivision (c): a Santa Clara County conviction of Health and Safety Code section 11351 in 1991, and two Health and Safety Code section 11352 convictions in Santa Clara County in year 1986.[2] It was further charged that appellant had committed the present offenses while on bail and awaiting trial on another Santa Clara County charge (Health & Saf. Code, § 11378), and therefore appellant was subject to a two-year on-bail sentence enhancement under section 12022.1.
The matter proceeded to jury trial as to both defendants. It was stipulated that the packages recovered from Gadoury's sock contained methamphetamine. San Rafael Police Sergeant Erik Masterson testified that the methamphetamine recovered from Gadoury's sock was possessed for sale, given its quantity and street value of $2,500. Eldon McComb, employed by the Department of Justice as a latent print analyst, testified that he found no usable latent fingerprints on the baggies containing the drugs, the propane torch, or the glass pipe.
The jury also heard evidence relating to a search on May 26, 1999, at appellant's home in San Jose. Officer Chris Powell of the Sunnyvale Department of Public Safety had executed a search warrant at a condominium-style residence occupied by appellant and three others. At the time the search warrant was executed, appellant was in the den of the residence with another person, and two others were present in other rooms. In the den, under or near appellant's desk were found a quantity of methamphetamine, ledgers or pay/ owe sheets, a scale, baggies, a glass pipe, and other items evidencing the sale and use of methamphetamine. In appellant's bedroom closet was a safe containing plastic bags with a white residue, a scale, and more plastic bags. Powell concluded that the methamphetamine in the residence was possessed for sale. Appellant stipulated that the substances found in his home had been tested and were found to contain a usable amount of methamphetamine, and a urine test provided by appellant at that time tested positive for the presence of methamphetamine. When the present offense proceeded to trial, appellant was on bail awaiting prosecution of the Health and Safety Code section 11378 charge arising from the 1999 search of his San Jose residence.
Appellant was not a witness at trial, but he called his friend Cecilia Goce as a defense witness, who testified that she had paid appellant two hundred dollars in cash for repairing her computer on the evening of February 2,2000.
*353 Gadoury, appellant's codefendant, testified the drugs were appellant's, and that appellant had given them to him to hold just before the car in which Gadoury was a passenger was pulled over by the police. Gadoury was acquitted on all charges.
Appellant was convicted of all of the charged offenses. He waived jury trial as to the special allegations in the information, admitting the prior convictions. Appellant also admitted the section 12022.1 special allegation, which charged that appellant was released on bail at the time of the present offense. A six-year prison sentence was imposed, plus an additional two-year term for the on-bail enhancement under section 12022.1, which the trial court stayed pending the outcome of the Santa Clara County prosecution. After appellant was convicted in Santa Clara County, the Marin County court lifted its stay of the two-year enhancement.

II. DISCUSSION


A.-D.[**]

E. Sentence enhancement
Appellant claims the trial court erroneously lifted the stay it had previously imposed on a two-year "on-bail" sentence enhancement under section 12022.1, subdivision (b), for committing the present offense while he was released on bail for another crime of which he was later convicted. He maintains that following appellant's conviction in Santa Clara County, "only" the Santa Clara County court had jurisdiction to lift the stay ordered by the Marin County court, and therefore the Marin County court erred when it later lifted its own stay.
Section 12022.1, subdivision (b), reads: "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." Here, the Santa Clara County offense was the first in time or the "primary" offense; the Marin County offense which followed it was "secondary."
Subdivision (d) of section 12022.1 also states, "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." (Italics added.) "Thus, the [on-bail] enhancement cannot be imposed unless the defendant is ultimately `convicted' of both offenses." (In re Jovan B. (1993) 6 Cal.4th 801, 809, 25 Cal.Rptr.2d 428, 863 P.2d 673; accord, People v. McClanahan (1992) 3 Cal.4th 860, 869-871, 12 Cal.Rptr.2d 719, 838 P.2d 241.)
As mentioned, ante, the record shows the on-bail enhancement was properly imposed under section 12022.1, subdivision (b), which prescribes a mandatory two-year term whenever an offender is convicted of an offense occurring while he was out on bail for a previous offense, as to which he was also convicted. Appellant had been released on bail in Santa Clara County on the primary offense, when he later committed the present offense, which became *354 the secondary offense. The Marin County court therefore imposed the enhancement when it sentenced appellant on the secondary offense, but stayed the two-year term until appellant was tried and convicted in Santa Clara on the primary offense, which he later was.
Where as here the conviction on the secondary offense precedes conviction of the first or primary offense, subdivision (d) of section 12022.1 directs the court hearing the secondary offense to stay the enhancement, pending the outcome of the primary offense. If the defendant is convicted of the primary offense, then the statute directs: "The stay shall be lifted by the court hearing the primary offense at the time of sentencing for that offense...." The Marin County court correctly stayed the two-year enhancement pending disposition of the Santa Clara County offense. However, when appellant was convicted and sentenced to a consecutive eight-month prison term in Santa Clara County, that court failed to comply with its mandatory duty to lift the stay of the two-year enhancement earlier imposed in Marin County. When this failure was brought to its attention, the Marin County court calendared the matter and lifted its own stay, ordering that the mandatory two-year term be executed.
We do not read section 12022.1 as appellant does, to provide that "only" the court hearing the primary offense, here the Santa Clara County court, could lift the stay. The word "only" does not exist in the statute, and there is nothing in the statutory scheme or its legislative history indicating it was the Legislature's unexpressed intent that "only" the primary court could lift the stay. The general rule remains that the court which imposes a stay on punishment retains jurisdiction to lift that stay, and bring the punishment into effect. (See, e.g., People v. Niles (1964) 227 Cal.App.2d 749, 755-756, 39 Cal. Rptr. 11; People v. Santana (1986) 182 Cal.App.3d 185, 190 & fn. 5, 227 Cal.Rptr. 51; cf. also In re Lance W. (1985) 37 Cal.3d 873, 896-899, 210 Cal.Rptr. 631, 694 P.2d 744 (Lance W.); In re Domanic B. (1994) 23 Cal.App.4th 366, 372-374, 28 Cal. Rptr.2d 439 (Domanic B.).)
In fact, the Santa Clara County court acquired a very limited jurisdiction over the enhancement by virtue of section 12022.1. That court had jurisdiction to lift the stay, nothing more. The Marin County court, however, also retained jurisdiction over the enhancement it had imposed at sentencing, including the jurisdiction and mandatory duty to lift its own stay on the sentence. (See § 12 ["The several sections of this Code which declare certain crimes to be punishable as therein mentioned, devolve a duty upon the Court authorized to pass sentence, to determine and impose the punishment prescribed."]; see also Lance W., supra, 37 Cal.3d at pp. 896-899, 210 Cal.Rptr. 631, 694 P.2d 744; Domanic B., supra, 23 Cal.App.4th at pp. 372-374, 28 Cal.Rptr.2d 439.)
In arguing that "only" the Santa Clara superior court could lift the stay, appellant takes a literal and hypertechnical view of the language of section 12022.1, subdivision (d), "The stay shall be lifted by the court hearing the primary offense at the time of sentencing for that offense...." When the courts have interpreted the language of section 12022.1, they have uniformly held that "[t]he literal meaning of the words ... may be disregarded to give effect to manifest purposes that, in light of the statute's legislative history, appear from the provisions considered as a whole." (People v. Rodriguez Alaniz (1993) 14 Cal.App.4th 1841, 1849, 18 Cal. Rptr.2d 597, quoting from Leffel v. Municipal Court (1976) 54 Cal.App.3d 569, 572, 126 Cal.Rptr. 773, quoting from County of *355 Sacramento v. Hickman (1967) 66 Cal.2d 841, 849, fn. 6, 59 Cal.Rptr. 609, 428 P.2d 593, internal quotes omitted; accord, People v. Jackson (1987) 192 Cal.App.3d 209, 218, 237 Cal.Rptr. 373; People v. Baries (1989) 209 Cal.App.3d 313, 323, 256 Cal. Rptr. 920.)
The manifest purposes of section 12022.1 are to impose a mandatory two-year sentence enhancement upon offenders such as appellant, but also to preserve the enhancement by staying its enforcement, until the offender is convicted of both the primary and secondary offenses. (Rodriguez Alaniz, supra, 14 Cal.App.4th at pp. 1847-1849, 18 Cal.Rptr.2d 597.) Under a literal reading of subdivision (d) of section 12022.1, this stay should have been lifted by the Santa Clara County court. Such action would have saved the time and expense of transporting appellant back to the jurisdiction where the secondary offense was adjudicated, in Marin County. Appellant's reading of subdivision (d) of section 12022.1 as limiting jurisdiction to lift the stay to the Santa Clara County court, however, conflicts with subdivision (b) of section 12022.1, which states the manifest punitive purpose of section 12022.1 as a whole: the imposition of an additional two-year sentence enhancement, after conviction on both offenses.
In construing subdivision (d) of section 12022.1, we are guided by familiar rules of statutory interpretation. "The primary duty of a court when interpreting a statute is to give effect to the intent of the Legislature, so as to effectuate the purpose of the law. [Citation.] To determine intent, courts turn first to the words themselves, giving them their ordinary and generally accepted meaning. [Citation.] If the language permits more than one reasonable interpretation, the court then looks to extrinsic aids, such as the object to be achieved and the evil to be remedied by the statute, the legislative history, public policy, and the statutory scheme of which the statute is a part. [Citation.]" (In re Luke W. (2001) 88 Cal.App.4th 650, 655, 105 Cal.Rptr.2d 905 (Luke W.).) "Ultimately, the court must select the construction that comports most closely with the apparent intent of the Legislature, with a view to promoting rather than defeating the general purpose of the statute, and it must avoid an interpretation leading to absurd consequences. [Citation.]" (Luke W., supra, at p. 655, 105 Cal.Rptr.2d 905.)
"The legislative history ... clearly indicates that the intent of that portion of the 1985 amendment [to section 12022.1] in question here was to preserve the enhancement until there had been convictions on both the primary and secondary offenses." (Rodriguez Alaniz, supra, 14 Cal.App.4th at p. 1849, 18 Cal.Rptr.2d 597.) "That purpose is as well served" (ibid.) when the secondary-offense court lifts its own stay, following convictions on both offenses, if the primary court has failed to take such action. While subdivision (d) of section 12022.1 certainly empowers the primary-offense court with authority to lift the stay and execute the enhancement, the statute does not preclude the secondary-offense court from taking similar action. The sole requirement necessary for lifting of the stay is that appellant be convicted of both primary and secondary offenses, which occurred here before the Marin County court lifted its own stay.
We are also unable to discern in the legislative history of section 12022.1, or its 1985 amendment, any intent by the Legislature that an offender such as appellant should escape punishment, as a result of neglect by the primary-offense court in failing to lift the stay. In fact, the 1985 amendment to section 12022.1 was enacted *356 to overturn previous overly literal interpretations of the statute, and assure that offenders who committed new offenses while on bail should be punished with the two-year sentence enhancement. As the Report of the Senate Committee on the Judiciary on the 1985 amendment to section 12022.1 states, "[R]ecent court rulings have interpreted this statute literally and, in effect, rendered the section unworkable. [¶] This bill would provide a procedure for triggering the existing two-year penalty enhancement when the person was convicted of a second felony, ... [¶] The purpose of this bill is to clarify and strengthen the existing provision that imposes a penalty enhancement for persons who commit a felony while released on bail or on their own recognizance." (Sen. Com. on Judiciary, Analysis of Sen. Bill No. 343 (1985-1986 Reg. Sess.) as introduced, pp. 1-2.)
Given the choice between either interpreting the statute as a whole to effectuate its manifest purpose, or instead interpreting the statute hypertechnically, by strictly applying the literal language of one of its individual passages, we choose the former, and thereby seek to avoid absurd consequences which were clearly not intended by the Legislature. (People v. Jenkins (1995) 10 Cal.4th 234, 246, 40 Cal. Rptr.2d 903, 893 P.2d 1224; accord, Luke W., supra, 88 Cal.App.4th at p. 655, 105 Cal.Rptr.2d 905.) The People have observed, "The fact that the Legislature's desire to avoid unnecessary expense was thwarted in this case hardly justifies a windfall for appellant." We agree, and thus conclude that the language of section 12022.1, subdivision (d) does not preclude the secondary offense court (Marin County) from lifting its own stay on the mandatory enhancement, following appellant's conviction in the primary offense court in Santa Clara County, and that court's failure to lift the stay.
Even if we were to find that the Marin County court erred in lifting the stay, which we have not, any error would obviously be harmless. (See People v. Watson (1956) 46 Cal.2d 818, 836, 299 P.2d 243; § 1258; cf. also People v. Cheffen (1969) 2 Cal.App.3d 638, 642-643, 82 Cal. Rptr. 658 [sentencing court failed to properly impose and stay sentences; error held harmless].) The lifting of the stay was a mandatory act following appellant'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. (See ibid.)

F.[***]

III. DISPOSITION

The judgment of conviction is affirmed.
We concur, JONES, P.J., and SIMONS, J.
NOTES
[*]   Pursuant to California Rules of Court, rules 976(h) and 976.1, this opinion is certified for publication with the exception of parts II. A., B., C, D., and F.
[1]  Unless otherwise indicated, all further section references are to the Penal Code.
[2]  Section 1203.07, subdivision (a)(11), in pertinent part, forbids the granting of probation or the suspension of a prison sentence, where an offender has previously been convicted of the possession for purposes of sale of methamphetamine. Health and Safety Code section 11370.2, subdivision (c), in pertinent part, imposes an additional sentence of three years on offenders who have a prior conviction for violation of Health and Safety Code sections 11351 or 11352, relating to the possession for purposes of sale, or sale or transportation, of a controlled substance.
[**]   see footnote *, ante.
[***]   see footnote *, ante.
