
14 Cal.App.4th 376 (1993)
18 Cal. Rptr.2d 29
In re GEORGE M., a Person Coming Under the Juvenile Court Law.
THE PEOPLE, Plaintiff and Respondent,
v.
GEORGE M., Defendant and Appellant.
Docket No. A057311.
Court of Appeals of California, First District, Division One.
March 22, 1993.
*378 COUNSEL
Wende Lariviere, under appointment by the Court of Appeal, for Defendant and Appellant.
Daniel E. Lungren, Attorney General, George Williamson, Chief Assistant Attorney General, Ronald A. Bass, Assistant Attorney General, Aileen Bunney and Sharon Rosen Leib, Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
DOSSEE, J.
The minor George M. contends the juvenile court considered an improper factor when deciding to commit him to the California Youth Authority. He also contends the court improperly applied two enhancement statutes.
George M.'s point with respect to one of the enhancement statutes is well taken. We therefore modify the judgment to reduce the maximum term of commitment by three years and, as modified, affirm.

FACTUAL AND PROCEDURAL BACKGROUND
The juvenile court found true an allegation that George M. had committed the crime of assault with a firearm (Pen. Code, § 245, subd. (a)(2)). The allegation was based upon an incident in which George M. fired a sawed-off shotgun at a group of people. The shotgun blast struck Omar Cruz, leaving him in a vegetative state.
The court committed George M. to the California Youth Authority (CYA) for the maximum period of 12 years. The court calculated the twelve-year *379 sentence by using a four-year term for the assault, adding five years for use of a firearm (Pen. Code, § 12022.5), and adding three more years for the infliction of great bodily injury (Pen. Code, § 12022.7).

DISCUSSION

I. Commitment to CYA  Alien Status

(1a) George M. contends the juvenile court improperly considered his status as an "undocumented alien from Mexico" as a factor in deciding to commit him to the CYA. (See In re Teofilio A. (1989) 210 Cal. App.3d 571, 576 [258 Cal. Rptr. 540].)[1]
(2) The juvenile court's decision to commit a minor to the CYA will be reversed only when an abuse of discretion has been shown. (In re Michael D. (1987) 188 Cal. App.3d 1392, 1395 [234 Cal. Rptr. 103].) The evidence, however, must demonstrate probable benefit to the minor from commitment to the CYA and that less restrictive alternatives would be ineffective or inappropriate. (In re Teofilio A., supra, 210 Cal. App.3d at p. 576.)
(1b) The dispositional report noted that the offense in this case was "deadly serious," that George M. had already spent time in the Los Angeles County jail as an adult, that he had three felony drug convictions, that he was returned to Mexico but he immediately returned to this country, that in addition to this offense he recently had been involved in another shooting incident in which he had been wounded, that he was involved in gang activity, and that he was a threat to the community and himself. The report concluded that George M. was a "very high runaway risk" and that foster care or nonsecure county camp was "out of the question." The report recommended CYA placement.
The juvenile court found that George M.'s mental and physical condition were such that it was probable that he would benefit from the discipline and treatment provided by the CYA. The court specifically noted that the "Vision Quest" program would not be satisfactory because of the "open nature of the placement." The court explained: "The minor has no roots or ties and has come across the border at least twice by his own indication. So *380 being in the south of the country I think that would make it very possible for him to leave, and other placements are inappropriate because of the criminal nature of his activities."
The circumstances and seriousness of the instant offense and George M.'s past criminal conduct overwhelmingly support a commitment to the CYA, regardless of his alien status. In any event, we think the juvenile court's statement indicates it was considering flight risk, and not that it was relying on the mere fact that George M. was an alien.
The record supports the juvenile court's placement decision, and no abuse of discretion has been shown.

II. Firearm Enhancement

(3a) George M. asserts the juvenile court failed to exercise its discretion to consider a shorter term when it imposed the upper term of five years for the Penal Code section 12022.5 firearm enhancement.[2]
Welfare and Institutions Code section 726 requires the juvenile court to specify in its commitment order the "maximum term of imprisonment which could be imposed upon an adult convicted of the offense or offenses which brought or continued the minor under the jurisdiction of the juvenile court." Section 726 is directive, and it requires the court to use the upper term for the proven offense or offenses. (In re James A. (1980) 101 Cal. App.3d 332, 337 [161 Cal. Rptr. 588].)
With respect to enhancements, however, Welfare and Institutions Code section 726 directs only that the court should add the proven enhancements to the upper term for the offense.[3] As George M. points out, section 726 has not been amended since several sections of the Penal Code, including section *381 12022.5, were amended in 1989 to institute the familiar lower, middle, upper term scheme for certain enhancements. (See Stats. 1989, ch. 1167, § 5, p. 4529.) Before 1989, section 12022.5, subdivision (a) simply required the addition of two years for the personal-use-firearm enhancement.
George M. argues that because Welfare and Institutions Code section 726 does not suggest which term to select for an enhancement, the juvenile court is free to exercise its discretion and choose from the range of terms specified in Penal Code section 12022.5, subdivision (a).[4] He notes that section 726 allows the court to exercise discretion when there are multiple counts, by choosing whether to aggregate terms concurrently or consecutively. (In re Jesse F. (1982) 137 Cal. App.3d 164, 167-168 [186 Cal. Rptr. 841].)
After reviewing the operation of the juvenile commitment process, we must disagree with George M. A commitment to the CYA under Welfare and Institutions Code section 726 is for an indeterminate term. (In re James A., supra, 101 Cal. App.3d at p. 337.) (4) "Whatever term of commitment to CYA is chosen by the juvenile court, the minor's ultimate period of commitment is regulated by the state juvenile authorities, not by the juvenile court itself. The juvenile court merely states the outer maximum term of commitment." (In re Ismael A. (1989) 207 Cal. App.3d 911, 919 [255 Cal. Rptr. 126].)
(3b) The Legislature, in Welfare and Institutions Code section 726, has specified that the outer maximum term of commitment be calculated by using the upper term for the offense or offenses which brought the minor under the jurisdiction of the juvenile court. While it appears that the Legislature overlooked the effect of the 1989 amendment of the enhancement statutes on the juvenile commitment process, we think it logical that the method for selecting the term for the underlying offense should apply in selecting the term for an enhancement. The sentiment expressed in section 726 leads us to believe the Legislature intended the term of confinement to be maximized, not minimized, when a range of terms is available.
"The juvenile court's disposition setting a maximum term may or may not have a bearing upon [the minor's] ultimate term of confinement." (In re *382 Ismael A., supra, 207 Cal. App.3d at p. 919.) Nevertheless, the outer maximum term of commitment is important as it represents a constraint on the CYA's discretion. In calculating the outer maximum in the instant case the juvenile court properly selected the upper term of five years for the firearm enhancement.

III. Great Bodily Injury Enhancement

The People agree with George M. that the juvenile court improperly added three years to the maximum term of commitment for the great bodily injury enhancement (Pen. Code, § 12022.7). Penal Code section 1170.1, subdivision (e) provides in pertinent part: "When two or more enhancements under Sections 12022, 12022.4, 12022.5, 12022.55, 12022.7, and 12022.9 may be imposed for any single offense, only the greatest enhancement shall apply...."
Under Penal Code section 1170.1, subdivision (e), only the five-year enhancement for firearm use (Pen. Code, § 12022.5, subd. (a)) applies, and the three-year enhancement for great bodily injury (Pen Code, § 12022.7) must be stricken. (See People v. Ferrell (1990) 218 Cal. App.3d 828, 836 [267 Cal. Rptr. 283].)
The judgment is modified to reduce the maximum term of commitment to nine years. As modified, the judgment is affirmed.
Newsom, Acting P.J., and Stein, J., concurred.
Appellant's petition for review by the Supreme Court was denied June 23, 1993.
NOTES
[1]  The opinion in In re Teofilio A., supra, 210 Cal. App.3d 571, states without discussion or analysis that consideration of alien status is unauthorized. (Id. at p. 579.) The Teofilio A. opinion cites In re Jose P. (1980) 101 Cal. App.3d 52 [161 Cal. Rptr. 400], but that decision holds only that the circumstances in that case, including the minor's alien status, did not justify a CYA commitment. (Id. at pp. 58-60.) Here, George M. states without discussion or analysis that consideration of his alien status would violate the equal protection clause of the federal Constitution.
[2]  Penal Code section 12022.5, subdivision (a) provides: "Except as provided in subdivisions (b) and (c), any person who personally uses a firearm in the commission or attempted commission of a felony shall, upon conviction of such felony or attempted felony, in addition and consecutive to the punishment prescribed for the felony or attempted felony of which he or she has been convicted, be punished by an additional term of imprisonment in the state prison for three, four, or five years, unless use of a firearm is an element of the offense of which he or she was convicted. The court shall order imposition of the middle term unless there are circumstances in aggravation or mitigation. The court shall state its reasons for its enhancement choice on the record at the time of sentencing."
[3]  The pertinent part of Welfare and Institutions Code section 726 provides: "... As used in this section and in Section 731, `maximum term of imprisonment' means the longest of the three time periods set forth in paragraph (2) of subdivision (a) of Section 1170 of the Penal Code, but without the need to follow the provisions of subdivision (b) of Section 1170 of the Penal Code ... plus enhancements which must be proven if pled...."
[4]  The People suggest the juvenile court imposed the enhancement found in subdivision (b)(1) of Penal Code section 12022.5, which provides for an additional five-year term when a felony conviction involves the discharge of a firearm at an occupied motor vehicle and results in great bodily injury or death.

References to the firearm enhancement in the record refer to section 12022.5 without stating the relevant subdivision. While there is sufficient evidence to support a finding that George M. fired into an occupied vehicle, such an enhancement was not alleged in the petition nor proposed by the prosecutor at any hearing, and the court's comments at the disposition hearing indicate it was applying subdivision (a) of section 12022.5. Therefore, we think it inappropriate to rely on subdivision (b)(1) to uphold the five-year enhancement.
