
41 Cal.3d 554 (1986)
715 P.2d 585
224 Cal. Rptr. 626
THE PEOPLE, Plaintiff and Respondent,
v.
JOHN HENRY CRAFT, Defendant and Appellant.
Docket No. Crim. 23800.
Supreme Court of California.
March 31, 1986.
*558 COUNSEL
Quin Denvir and Frank O. Bell, Jr., State Public Defenders, under appointment by the Court of Appeal, David Y. Stanley and Harvey R. Zall, Deputy State Public Defenders, for Defendant and Appellant.
John K. Van de Kamp, Attorney General, Ramon M. de la Guardia, Anthony L. Dicce and Maureen A. Daly, Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
MOSK, J.
When a perpetrator commits sex offenses against the same victim on "separate occasions," Penal Code section 667.6, subdivision (d) (hereafter subdivision (d)),[1] requires the imposition of full, separate, and consecutive terms of imprisonment. We granted a hearing in this case to construe the foregoing crucial phrase.
Karen S. was driving alone one morning and stopped at a drive-in restaurant to use the restroom. As she returned to her car, defendant seized her from behind, threw her to the ground, and raped her. He then ordered her into the back seat of her car and drove away. While driving, he repeatedly struck her with his fist. After about an hour he stopped the car, climbed into the back seat, and raped her again. He resumed driving, but stopped after 20 minutes to lock her in the trunk of the car. Again he resumed driving. About an hour later he stopped and left the car for some five minutes. He returned, drove once more, stopped, opened the trunk, and there raped her for the third time. He then abandoned the car and the victim.
Defendant appeals from a judgment convicting him, inter alia, of three counts of rape (§ 261, subd. (2)), and sentencing him to full, separate, and consecutive terms on those counts. The court, however, failed to identify the authority under which it acted or to state its reasons for imposing such terms.
(1) The Legislature has established a special sentencing scheme for multiple sexual offenses. Section 667.6, subdivision (c) (hereafter subdivision (c)) provides that generally the court has discretion to impose full, separate, and consecutive terms "whether or not the crimes were committed during *559 a single transaction."[2] When the court sentences under subdivision (c), however, it must state its reasons not only for imposing consecutive sentences (People v. Smith (1984) 155 Cal. App.3d 539 at p. 543 [202 Cal. Rptr. 259]; People v. Wilson (1982) 135 Cal. App.3d 343, 352 [185 Cal. Rptr. 498]) but also for sentencing under this provision rather than under the principal/subordinate scheme of section 1170.1, subdivision (a). (People v. Belmontes (1983) 34 Cal.3d 335, 347 [193 Cal. Rptr. 882, 667 P.2d 686]; People v. Smith, supra, at p. 543.)
Subdivision (d), by contrast, provides that the court is without discretion in the matter, but must impose full, separate, and consecutive terms "if such crimes involve separate victims or involve the same victim on separate occasions."[3] When the court sentences under subdivision (d), it need not give a statement of reasons. (People v. Smith, supra, 155 Cal. App.3d at p. 543; see People v. Fleming (1983) 140 Cal. App.3d 540 at p. 545 [189 Cal. Rptr. 619].)
Defendant contends the sentence imposed on him cannot stand: if the court acted under subdivision (c), it erred by failing to state its reasons; if under subdivision (d), it erred because the offenses did not occur on separate occasions. The People assert that the rapes were committed on separate occasions, and hence defendant was properly sentenced under subdivision (d).
Central to this case is the meaning of "separate occasions" in subdivision (d). In construing the phrase we rely on well settled principles of statutory construction. (2) A court should "ascertain the intent of the Legislature so as to effectuate the purpose of the law." (Select Base Materials v. Board of Equal. (1959) 51 Cal.2d 640, 645 [335 P.2d 672]; accord, People v. Davis (1981) 29 Cal.3d 814, 828 [176 Cal. Rptr. 521, 633 P.2d 186].) In *560 determining such intent, the court "turns first to the words themselves for the answer" (People v. Knowles (1950) 35 Cal.2d 175, 182 [217 P.2d 1], cert. den., 340 U.S. 879 [95 L.Ed. 639, 71 S.Ct. 117]; accord, People v. Black (1982) 32 Cal.3d 1, 5 [184 Cal. Rptr. 454, 648 P.2d 104]), giving to them "their ordinary and generally accepted meaning" (People v. Castro (1985) 38 Cal.3d 301, 310 [211 Cal. Rptr. 719, 696 P.2d 111]). (3) Moreover, "the various parts of a statutory enactment must be harmonized by considering the particular clause or section in the context of the statutory framework as a whole." (People v. Black, supra, at p. 5.) Similarly, a statute should not be given a construction that results in rendering one of its provisions nugatory. (See Select Base Materials v. Board of Equal., supra, at p. 647; People v. Hawes (1982) 129 Cal. App.3d 930, 939 [181 Cal. Rptr. 456].) (4) Finally, we keep in mind that "`[t]he defendant is entitled to the benefit of every reasonable doubt, whether it arise out of a question of fact, or as to the true interpretation of words or the construction of language used in a statute.'" (People v. Davis, supra, at p. 828, quoting In re Tartar (1959) 52 Cal.2d 250, 256-257 [339 P.2d 553].)
(5) We look first to the language of the statute itself. The phrase "separate occasions" appears to be susceptible of several meanings in the context of subdivision (d). In ordinary language, an "occasion" may be defined as a particular, momentary point in time, or an event or episode of any duration. (Webster's New Internat. Dict. (3d ed. 1961) p. 1560 ["occasion" may mean, inter alia, "a particular time at which something takes place," a "special event" and an "episode"].) It may also be defined as a period of time in which an opportunity of some kind exists. (Ibid. ["occasion" may mean "opportunity"].) Thus, read broadly, the statutory phrase may simply denote distinct moments in time. Read narrowly, however, it may refer to criminal episodes of indefinite duration between which the perpetrator loses the opportunity to continue his attack or abandons that attack to engage in other, unrelated activities. Because "separate occasions" is thus ambiguous, we must look beyond the language of the statute.
Section 667.6, which deals with certain sex offenses and offenders, has the purpose and effect of permitting in some cases and mandating in others the imposition of more severe criminal penalties than would otherwise have been available. Subdivisions (a) and (b) apply to repeat offenders; subdivisions (c) and (d), as we have noted, apply to perpetrators who commit multiple offenses. Inasmuch as subdivision (c) merely permits full, separate, and consecutive terms, while subdivision (d) mandates them, we must presume that the Legislature regarded some multiple offenders as automatically deserving of the harsher punishment, and that it must have used the language it did to single out such persons.
*561 (6) In view of the purpose that we attribute to the Legislature, it is more reasonable to construe "separate occasions" in a narrow manner. Specifically, we hold that subdivision (d) only applies to offenses against the same victim between which the perpetrator temporarily lost or abandoned the opportunity to continue his attack: such opportunity is lost when the victim becomes free of any ongoing criminal activity; it is abandoned when the offender keeps the victim within his control but engages in some significant activity unrelated to continuing his attack. This interpretation effectively distinguishes multiple offenders who commit crimes against a single victim on separate occasions from those who merely assault a victim several times in one uninterrupted sequence of events.
As opposed to the person who commits several rapes on a single occasion, the one who rapes his victim on "separate occasions" seems to deserve the harsher punishment automatically. Common moral sense teaches that other things being equal he is both more culpable because he turns away from one attack and after an opportunity for reflection undertakes another, and more harmful because he inflicts distinct traumata on his victim. Moreover, similar reasoning seems to underlie the decision of the Legislature to subject to the provisions of subdivision (d) the person who commits offenses against "separate victims." This person has also abandoned one attack and turned his attention elsewhere  i.e., towards his next victim  before committing yet another offense. The construction of "separate occasions" as merely distinct moments in time, by contrast, does little if anything to distinguish the multiple offender who automatically deserves the harsher punishment from the multiple offender who does not. Indeed, because each offense committed by practically every multiple offender occurs at a distinct point in time, such a reading of the phrase would distinguish no significant subgroup from the whole, but rather would embrace them all.
The rule that a statute should not be given a construction that would result in rendering one of its provisions nugatory reinforces our conclusion. Such a result would follow if "separate occasions" were taken to refer merely to distinct points in time. That interpretation, as we have just observed, would lead to the inclusion of virtually all multiple offenders within subdivision (d)  and would thereby make subdivision (c) empty, since all cases would fall within the mandatory provisions of subdivision (d) and none within the discretionary provisions of subdivision (c).
Finally, to construe the statutory phrase in a narrow manner results in limiting the instances in which the court is without discretion but must impose full, separate, and consecutive terms. Because "separate occasions" is ambiguous, a construction giving guided discretion to the trial judge is to be preferred.
*562 Under the foregoing interpretation of the phrase, we conclude that the offenses of which defendant has been convicted were not committed on "separate occasions." All three rapes constitute a single episode. Although an hour, more or less, passed between each of the rapes, time alone does not distinguish separate occasions for the purposes of subdivision (d). Crimes have been committed on separate occasions only when they are separated by a period in which the defendant has lost or abandoned his opportunity to continue his attack. Here, defendant never lost this opportunity: Karen was falsely imprisoned and subject to his control during the entire period. Moreover, the record fails to show that defendant undertook any significant independent activities between the rapes that were unrelated to the rapes themselves and that would show that defendant temporarily abandoned his opportunity to assault Karen. Driving her to different locations and forcing her into the trunk were movements that facilitated and were clearly related to further sexual offenses.[4]
Thus, if defendant was sentenced to full, separate, and consecutive terms under subdivision (d), it was error: the rapes did not occur on separate occasions. If, on the other hand, he was sentenced under subdivision (c), it was also error: under that statute the court was required, but failed, to give a statement of reasons. (7) (See fn. 5.) As a result, the sentence cannot stand and the cause must be remanded for resentencing to determine whether the court acted under subdivision (c), and if so, for a statement of reasons.[5]
Hereafter, we suggest that when trial judges determine a sentence under subdivision (d) it would be helpful if they also state the sentence they would *563 have imposed if subdivision (d) did not apply, and the reasons for such sentence if a statement of reasons would normally be required. This will serve to prevent fruitless appeals in situations when the court arguably misapplies subdivision (d) but would have imposed the same sentence discretionarily under subdivision (c).
We have reviewed defendant's remaining contentions. They present no new and important issue of law, and were correctly resolved by the Court of Appeal when the case was before it. For the reasons stated by the Court of Appeal, we adopt its holdings on the issues not discussed here. (People v. Ford (1981) 30 Cal.3d 209, 215-216 [178 Cal. Rptr. 196, 635 P.2d 1176], cert. den. 455 U.S. 1003 [71 L.Ed.2d 871, 102 S.Ct. 1637].)
The judgment is reversed solely for resentencing in accordance with the views expressed herein; in all other respects the judgment is affirmed.
Bird, C.J., Broussard, J., Reynoso, J., Grodin, J., Lucas, J., and Tochterman (Ronald W.), J.,[*] concurred.
Respondent's petition for a rehearing was denied April 30, 1986.
NOTES
[1]  All further statutory references are to the Penal Code.
[2]  Subdivision (c) provides in pertinent part: "In lieu of the term provided in Section 1170.1, a full, separate, and consecutive term may be imposed for each violation of subdivision (2) or (3) of Section 261, Section 264.1, subdivision (b) of Section 288, Section 289, or of committing sodomy or oral copulation in violation of Section 286 or 288a by force, violence, duress, menace or threat of great bodily harm whether or not the crimes were committed during a single transaction."

Although subdivision (c) allows separate punishment for crimes "committed during a single transaction," it does not affect section 654, which prohibits multiple punishment under different code provisions for a single "act or omission." In this case each sexual offense was clearly a separate act within the meaning of section 654. (See People v. Perez (1979) 23 Cal.3d 545 [153 Cal. Rptr. 40, 591 P.2d 63].)
[3]  Subdivision (d) provides in pertinent part: "A full, separate, and consecutive term shall be served for each violation of subdivision (2) or (3) of Section 261, Section 264.1, subdivision (b) of Section 288, Section 289, or of committing sodomy or oral copulation in violation of Section 286 or 288a by force, violence, duress, menace or threat of great bodily harm if such crimes involve separate victims or involve the same victim on separate occasions."
[4]  The Attorney General argues that because the rapes were committed at different places they should be regarded as having been committed on "separate occasions." Where the offenses occurred, however, seems in the abstract to be immaterial both to the determination whether they were committed in discrete encounters and to the more fundamental assessment of their blameworthiness. Certainly the location of the offenses is immaterial on the facts of this case.

To the extent that People v. Fleming (1983) 140 Cal. App.3d 540, 545-546 [189 Cal. Rptr. 619], is inconsistent with this opinion, it is disapproved.
[5]  Because our holding relates only to sentencing and will not require any retrials, it will have full retroactive effect. As we stated in People v. Belmontes, supra, 34 Cal.3d 335, 348, footnote 8: "Defendants are entitled to sentencing decisions made in the exercise of the `informed discretion' of the sentencing court. [Citations.] A court which is unaware of the scope of its discretionary powers can no more exercise that `informed discretion' than one whose sentence is or may have been based on misinformation regarding a material aspect of a defendant's record. [Citation.] [¶] Where a court may have been influenced by an erroneous understanding of the scope of its sentencing powers, habeas corpus is a proper remedy to secure reconsideration of the sentence imposed."

Therefore, defendants who have been mistakenly sentenced under section 667.6, subdivision (d), instead of being properly sentenced under section 667.6, subdivision (c), or section 1170.1, whose judgments have become final, may seek relief by petition for habeas corpus alleging such sentencing and the failure of the sentencing court to exercise discretion in determining whether to sentence under section 667.6, subdivision (c), or section 1170.1. The petition should be filed in the sentencing court.
[*]   Judge, Sacramento County Superior Court, assigned by the Chairperson of the Judicial Council.
