
207 Cal.App.3d 232 (1989)
255 Cal. Rptr. 172
THE PEOPLE, Plaintiff and Respondent,
v.
RONNIE EARL BAYLOR, Defendant and Appellant.
Docket No. E005117.
Court of Appeals of California, Fourth District, Division Two.
January 18, 1989.
*233 COUNSEL
Corinne S. Shulman, under appointment by the Court of Appeal, for Defendant and Appellant.
John K. Van de Kamp, Attorney General, Steve White, Chief Assistant Attorney General, and Steven H. Zeigen, Deputy Attorney General, for Plaintiff and Respondent.
[Opinion certified for partial publication.[]]
*234 OPINION
DABNEY, J.
Ronnie Earl Baylor was charged in an information in counts I and V with residential burglary (Pen. Code, § 459); in count II with theft of a firearm (Pen. Code, § 487); in count III with forcible rape (Pen. Code, § 261, subd. (2)); in count IV with forcible sodomy (Pen. Code, § 286, subd. (c)); in count VI with assault with intent to commit rape (Pen. Code, § 220); and in count VII with robbery (Pen. Code, § 211). The information specially alleged as to counts III and IV that Baylor personally used a firearm (Pen. Code, § 12022.3, subd. (a)). The jury found Baylor guilty on all counts and found the enhancing allegations to be true. The jury fixed the convictions for both burglary counts and the robbery count at first degree.
The court sentenced Baylor to the upper term of eight years plus a three-year enhancement for firearm use for count III and a consecutive sentence of one-third the middle term, or two years, plus a three-year enhancement for firearm use for count IV. The court imposed a middle term for each of the other counts, but then stayed all of the terms except those for counts III and IV. On appeal, Baylor claims that the court relied on improper and inapplicable factors to impose the upper term for rape and to impose consecutive sentences.

FACTS
Because Baylor claims sentencing error only, a detailed exposition of the facts is unnecessary. Baylor entered Brenda S.'s house in the middle of the night and raped and sodomized her while holding a gun to her head. Brenda S.'s gun was missing after Baylor left. This incident formed the basis for counts I through IV.
A month later, Baylor forced his way into Cheryl W.'s hotel room, forced her to the floor, pulled down her pants, and ejaculated while rubbing his penis against her buttocks. Cheryl's wallet was missing after Baylor left. This incident formed the basis for counts V through VII.
The Sentencing Hearing. At the sentencing hearing, the court stated: "[The prosecutor] argues that  and I think properly so  that you should be given the aggravated term of full and consecutive under 667.6 of the Penal Code, should be given a sentence of 24 years, 8 months. And that's probably what the Court should do. [¶] On the other hand, the Court has to balance,... the fact that you have no record, no prior record, you had good conduct while in the military. And the Court has to take that into consideration."
*235 After explaining that Baylor was statutorily ineligible for probation, the court stated: "Under Rule 421, the circumstances in aggravation are that the crimes involved a threat of great bodily harm and disclosed a high degree of cruelty, viciousness and callousness. Further, another circumstance in aggravation is that the defendant was armed with a weapon during the commission of the offense. Further, the victims were particularly vulnerable, they were in their own homes in the late evening or early morning hours. Further, the crime did involve multiple victims. There was some planning and sophistication and professionalism shown, especially in the last three counts ... in that, a mask was used, and it showed some premeditation and professionalism in the way the offense was carried out.
"Under Rule 423, a circumstance in mitigation is the fact that Mr. Baylor has no prior criminal record." The court concluded, "Weighing the circumstances in aggravation versus the circumstance in mitigation, the Court will make a finding that the circumstances in aggravation outweigh the circumstance in mitigation."
The court then explained its decision to impose consecutive sentences: "With respect to concurrent or consecutive sentences under Rule 425, one circumstance that is persuasive in giving consecutive sentences is the fact that the crimes and their objectives were predominantly independent of each other. Further, the crimes did involve separate acts of violence and threats of violence. The crimes were also committed at different times and separate places. The crimes did involve multiple victims."

DISCUSSION

I

Trial Court's Authority to Stay Sentence
(1a) On our own motion, we requested the parties to provide supplemental briefing on the issue whether the entire sentence was invalid because the trial court improperly stayed the sentence on counts V, VI and VII. The abstract of judgment reflects that the court stayed the sentences for these counts under Penal Code section 654; however, those counts stemmed from an incident entirely separate from counts III and IV. (2) (See fn. 1.) As a matter of law, therefore, section 654 cannot apply to all of these counts. (People v. Glaude (1983) 141 Cal. App.3d 633, 644 [190 Cal. Rptr. 479].)[1]*236 (3) "Errors in the applicability of section 654 are corrected on appeal regardless of whether the point was raised by objection in the trial court or assigned as error on appeal. [Citations.]" (People v. Perez, supra, 23 Cal.3d at p. 550, fn. 3.)
(1b) The Attorney General suggests that the trial court stayed the sentences for these counts "under the court's discretionary power." However, the Attorney General does not cite to any authority supporting a trial court's general power to stay a sentence. (4) Rather, "It is well settled that, subject to constitutional limitations, the Legislature possesses the exclusive power to define criminal offenses and prescribe punishment. [Citations.] [Pen. Code, § 12] imposes a duty upon a sentencing court `... to pass sentence, to determine and impose the punishment prescribed.' A sentencing court has no discretion to deviate from constitutionally permissible punishment prescribed by statute. [Citations.]" (People v. Superior Court (Himmelsbach) (1986) 186 Cal. App.3d 524, 537 [230 Cal. Rptr. 890].)
In People v. Floyd P. (1988) 198 Cal. App.3d 608 [244 Cal. Rptr. 269], the court reversed a sentence which was inconsistent with the terms of a plea bargain which specified that the sentence on one count would be stayed. The Floyd P. court held that such a plea bargain was invalid because it purported to authorize the trial court to exercise a power it did not have. The court explained, "When a defendant is convicted of a crime by either plea or verdict, it is the duty of the court to pass sentence and impose the punishment prescribed. (Pen. Code, § 12.) Pursuant to this duty, the court must either impose the prescribed punishment or grant probation in a lawful manner. [Citations.] We know of no general authority for the court to impose sentence and then to simply stay execution permanently. A court has authority to stay execution to avoid the restrictions of Penal Code section 654, prohibiting double punishment for the same act, or to avoid statutory restrictions on the duration of consecutive sentences under Penal Code section 1170.1, or for the purpose of granting probation under Penal Code section 1203. But the sentence here does not fall within any of those categories and there is no authority otherwise to simply stay permanently an imposed sentence." (Id., at p. 612.) Although the Floyd P. court dealt with an invalid plea bargain, its analysis applies equally well to stay of a sentence imposed after a verdict. (1c) We hold that the court acted without authority when it stayed portions of Baylor's sentence to which section 654 did not apply.
*237 Courts view an aggregate prison term as one term made up of interdependent components. Thus, we cannot retain portions of the prior judgment; the invalidity of some of the components of Baylor's sentence requires us to remand for resentencing. (People v. Savala (1983) 147 Cal. App.3d 63, 68-69 [195 Cal. Rptr. 193], overruled on other grounds in People v. Foley (1985) 170 Cal. App.3d 1039, 1044 [216 Cal. Rptr. 865].)

II, III[*]
.... .... .... .... .... .

DISPOSITION
Judgment affirmed; remanded for resentencing.
Campbell, P.J., and Hollenhorst, J., concurred.
NOTES
[]   Pursuant to California Rules of Court, rule 976.(b), this opinion is certified for publication with the exception of parts II and III.
[1]  We do not determine whether section 654 may apply to one or more of these counts in that counts V, VI and VII all arose from one incident. "[W]hether the facts and circumstances reveal a single intent and objective within the meaning of section 654 is generally a factual matter." (People v. Perez (1979) 23 Cal.3d 545, 552, fn. 4 [153 Cal. Rptr. 40, 591 P.2d 63].) Thus, we leave it to the trial court on remand to determine whether "there was a course of conduct which violated more than one statute but nevertheless constituted an indivisible transaction." (Id., at p. 551.) We merely hold that the court had no authority to stay sentence for all of these counts.
[*]   See footnote, ante, page 232.
