OPINION
MEYERSON, Judge.This opinion concerns the relationship between A.R.S. § 13-604.01(B) and A.R.S.
§ 13-604(M). Appellant Edward Gerald Thompson pled guilty to attempted theft, a class 4 felony. Appellant committed the crime while on release status from the Department of Corrections for arson of an unoccupied structure, and while released on his own recognizance from a charge of possession of marijuana, a class 6 felony.1 Appellant was sentenced to a term of four years imprisonment. By virtue of A.R.S. § 13-604.01(B), appellant would be required to serve the entire sentence without eligibility for release on any basis. Under the authority of A.R.S. § 13-604(M), appellant was sentenced to an additional term of two years imprisonment. The trial court ordered that appellant not be eligible for release from confinement until the entire six-year period had been served. The issue on appeal is whether the trial court erred in applying the provisions of A.R.S. § 13-604.-01(B) to the additional two-year sentence.
A.R.S. § 13-604(M), enacted in 19.81, provides:
A person convicted of committing any felony offense, which felony offense is committed while the person is released on bail or on his own recognizance on a separate felony offense, shall be sentenced to a term of imprisonment two years longer than would otherwise be imposed for the felony offense committed while released on bond or on his own recognizance. The additional sentence imposed under this subsection is in addition to any enhanced punishment that may be applicable under any of the other subsections of this section.
(Emphasis added.) This statute repealed former A.R.S. § 13-3970. The latter statute created a separate prosecution and penalty for committing a felony while released on bail or on recognizance from another felony charge. Consequently, A.R.S. § 13-3970 violated the double jeopardy clause by subjecting a defendant to two separate trials and two separate punishments for committing one offense. Dixon v. Dupnik, *567688 F.2d 682, 686 (9th Cir.1982). It appears that A.R.S. § 13-604(M) was inserted into the penalty enhancement scheme to avoid that result.
Enacted in 1982, A.R.S. § 13-604.01(B) enhances punishment for offenses committed while a person is released from confinement. The statute is triggered when a person commits a felony while on probation or release from confinement for another felony offense. It provides among other things that the entire sentence must be served without the possibility of early release.
Appellant contends that the trial judge improperly applied A.R.S. § 13-604.01(B) to the two-year enhancement under A.R.S. § 13-604(M). Appellant argues that A.R.S. § 13-604.01(B) should apply only to the underlying four-year term. Appellant further argues that the additional sentence should be governed by A.R.S. § 41-1604.06(D) which provides that, unless stated otherwise, a prisoner is eligible for parole after serving one-half of the prescribed sentence. We do not agree.
We conclude that A.R.S. § 13-604(M) is ambiguous with respect to the two-year added sentence. At one point, the statute speaks of a “term of imprisonment two years longer than would otherwise be imposed.” Immediately thereafter the two-year term is described as an “additional sentence.” If the statute is viewed as simply expanding the underlying sentence by two years, we would have no difficulty in applying A.R.S. § 13-604.01(B) to the entire sentence. On the other hand, if the two-year term is treated as a discrete and separate sentence, the ordinary rules pertaining to parole eligibility would apply.
Because the statute is unclear, it is necessary to resort to judicial interpretation. The guiding principle in such an endeavor is to ascertain the intent of the legislature. State v. Barnard, 126 Ariz. 110, 112, 612 P.2d 1073, 1075 (App.1980). The purpose of recidivist legislation is to protect society from the habitual criminal. See State v. Norgard, 6 Ariz.App. 36, 40, 429 P.2d 670, 674 (1967); see generally State v. Sweet, 143 Ariz. 266, 693 P.2d 921 (1985); State v. Barnett, 142 Ariz. 592, 691 P.2d 683 (1984). That purpose is furthered by virtue of the complete ban on early release set forth in A.R.S. § 13-604.01(B). It is consistent with the legislature’s intent to extend the ban on early release to the added two years imposed by A.R.S. § 13-604(M). Therefore, we hold that the two-year sentence imposed by A.R.S. § 13-604(M) constitutes an expansion of the underlying sentence and is therefore subject to the conditions imposed by A.R.S. § 13-604.01(B). Accordingly, appellant will have to serve the entire sentence and will not be eligible for parole.
Affirmed.
CONTRERAS, P.J., and FROEB, C.J., concur.. Appellant subsequently pled guilty to the marijuana charge. He was sentenced to 1.5 years in prison, the sentence to run consecutive to the sentence which is the subject of this appeal.