The opinion of the Court was delivered by
*553CLIFFORD, J.We granted defendant’s petition for certification, 118 N.J. 229, 570 A.2d 981 (1989), to review the Appellate Division’s determination that a sex offender convicted and sentenced under Title 2A, the predecessor of Title 2C, the New Jersey Code of Criminal Justice (Code), and thereafter resentenced under the Code, may receive a custodial term that includes a period of parole ineligibility. The Resentencing Panel had concluded that N.J.S.A. 2C:1-1d foreclosed the imposition of a parole disqualifier. The Appellate Division, holding that the Resentencing Panel had erred, remanded to the Panel for entry of amended judgments that included an aggregate term of fifteen years parole ineligibility. State v. Cruz, 232 N.J.Super. 294, 300, 556 A.2d 1295 (1989). We reverse the judgment of the Appellate Division and reinstate the judgment of the Resentencing Panel.
I
-A-
In 1976 defendant, Eric Cruz, pleaded guilty to two counts of rape, N.J.S.A. 2A:138-1, and one count of lewdness, N.J.S.A. 2A:115-1. The court sentenced him under the pre-Code Sex Offender Act, N.J.S.A. 2A:164-3 to -28, on the rape convictions to two concurrent indeterminate terms, not to exceed thirty years, at the Adult Diagnostic and Treatment Center (ADTC), and imposed a five-year concurrent term on the lewdness count. Paroled in 1980, Cruz committed additional offenses in 1981 that resulted in revocation of parole, his return to ADTC, and his conviction and sentence on the new offenses. That same year the Commissioner of Corrections, acting under the authority of N.J.S.A. 2C:47-4b, transferred Cruz from ADTC to the New Jersey State Prison, apparently because defendant had refused treatment (he had escaped after his return to ADTC following his arrest on the 1981 offense) or was not amenable *554to treatment. See State v. Cruz, supra, 282 N.J.Super. at 297, 556 A.2d 1295.
Defendant’s removal from ADTC and transfer to State Prison required that the court resentence him under the Code. See Gerald v. Commissioner, N.J. Dep’t of Corrections, 102 N.J. 435, 508 A.2d 1113 (1986). (Although the Appellate Division opinion states, as do the parties’ briefs both below and in this Court, that defendant “moved to be resentenced” following his transfer, see 232 N.J.Super. at 297, 556 A.2d 1295, there is no record support for the assertion that the resentencing process originated with defendant. The point of this digression is that resentencing on transfer from ADTC is not a matter of choice. “[W]hether or not requested by the prisoner, he must, under the mandate of Gerald, be resentenced under the Code.” State v. Bowen, 224 N.J.Super. 263, 276, 540 A.2d 218 (App. Div.), certif. denied, 113 N.J. 323, 550 A.2d 442 (1988).) Accordingly, the Resentencing Panel, constrained by its understanding that the law prohibited the imposition of a Code sentence that would include a period of parole ineligibility (an understanding shared by the assistant prosecutor), resentenced defendant on the two rapes to the custody of the Commissioner of Corrections for consecutive fifteen-year custodial terms with no parole disqualifier. (The congruent or equivalent crime under the Code is aggravated sexual assault, N.J.S.A. 2C:14-2a, a first-degree offense.) The Panel reached that result despite the imbalance it perceived in favor of aggravating factors over mitigating (there were none) because it read N.J.S.A. 2C:1-1d to require that the resentence not result in any increase in defendant’s period of detention or supervision.
On the State’s appeal the Appellate Division held that a defendant who is resentenced under the Code “is eligible to receive a term of parole disqualification.” 232 N.J.Super. at 297, 556 A.2d 1295. That court, rejecting defendant’s argument that parole disqualifiers would represent sentence en*555hancement in violation of 2C:l-ld and of double-jeopardy principles, ibid., reasoned that
[a] determination of whether there has been an increase in the period of detention should be made by comparing defendant’s existing aggregate maximum sentence with the maximum base determinate sentence imposed at resentencing. It is the outer limit of the aggregate term of imprisonment or supervision imposed at the resentencing which determines whether the Code sentence exceeds the 2A sentence. This is so because in a Gerald resentencing, the prior (Title 2A) sentencing slate is wiped clean except for the outer limit fixed by the maximum range of the Title 2A sentence. [Id. at 299, 556 A. d 1295.]
The court thus held that “a determinate aggregate sentence of 30 years with as much as 15 years of parole ineligibility is not a longer sentence than an indeterminate 30 years.” Ibid.
The single question raised in defendant’s appeal is whether the imposition of a parole-ineligibility period impermissibly increases the aggregate term of defendant’s imprisonment. We hold that it does.
-B-
Hovering in the background of this appeal are the differing statutory frameworks for the detention and supervision of sex offenders under the former Sex Offender Act and under the Code.
Under the Sex Offender Act, when a court committed an offender to ADTC for treatment, it sentenced him or her to an indeterminate term. The pertinent statute, N.J.S.A. 2A:164-6, provided that “such order of commitment shall not specify a minimum period of detention, but in no event shall the person be confined or subject to parole supervision for a period of time greater than that provided by law for the crime of which such person was convicted.” Hence, the sentencing court could not fix a minimum term, and the indeterminate term was subject only to the maximum term imposable for the crime. Significantly, parole was governed by the psychiatrically-oriented treatment-success standard of N.J.S.A. 2A:164-8, which read:
Any person committed to confinement, as provided for in section 2A:164-6 of this title, may be released under parole supervision when it shall appear to the *556satisfaction of the state parole board, after recommendation by a special classification review board appointed by the state board of control of institutions and agencies, that such person is capable of making an acceptable social adjustment in the community.
Under the former sentencing scheme the treatment and rehabilitative purposes of the sex offender’s sentence remained unaltered and unaffected by the failure of ADTC to meet those purposes. So even when a defendant was transferred from the diagnostic facility to the general prison population pursuant to the Commissioner’s discretionary power under former N.J.S.A. 2A:164-7, ADTC nevertheless had to continue treatment for the offender’s psychiatric problems in whatever institution housed that offender. Gerald v. Commissioner, N.J. Dep’t of Corrections, 201 N.J.Super. 438, 445, 493 A.2d 556 (App.Div.1985), modified and aff'd, 102 N.J. 435, 508 A.2d 1113 (1986). As the Appellate Division put it in Gerald:
In short, a defendant sentenced as a sex offender remained confined as a sex offender and subject to the conditions of confinement as a sex offender during the entire period of his imprisonment irrespective of his actual amenability to treatment and the institution in which he was confined. One of these conditions was the continued exercise by the Special Classification Review Board of its parole recommendation authority in accordance with a psychiatrically oriented release standard. [201 N.J.Super. at 445-46, 493 A.2d 556.]
The Code wrought fundamental changes in the scheme for disposition of compulsive and repetitive sex offenders. Whereas the Sex Offender Act had focused exclusively on rehabilitative and treatment purposes of sentencing, the Code added a punitive component. Gerald v. Commissioner, supra, 201 N.J.Super. at 445, 493 A.2d 556 (citing State v. Chapman, 95 N.J. 582, 591-92, 472 A.2d 559 (1984)). The Code, unlike the Sex Offender Act, recognized that “not every sex offender sentenced for treatment can or will respond affirmatively to rehabilitative efforts.” State v. Bowen, supra, 224 N.J.Super. at 269, 540 A.2d 218. As the court pointed out in Bowen:
Succinctly stated, the Code does not retain the former Act’s insistence on the continuation of futile treatment until the maximum term expires. If treatment fails, the Commissioner is free to conclude that the sentencing predicate was wrong and the prisoner may be transferred to the general prison population. If *557so, the transfer converts the inmate’s status from that of a patient to that of an ordinary offender. [Id. at 270, 540 A.2d 218.]
As with other “ordinary” offenders, “the [transferred] prisoner’s parole eligibility is governed by N.J.S.A. 30:4-123.51a in the same manner as if he had originally been sentenced to a regular facility for the fixed term originally imposed.” Ibid. (citing McCray v. Dietz, 517 F.Supp. 787, 790 (D.N.J.1980)). Unlike the standard that controls parole eligibility for sex offenders — the treatment-success standard prescribed by N.J.S.A. 2C:47-5 and its predecessor provision, N.J.S.A. 2A:164-8, governing the decisional process of the Special Classification Review Board — the standard for release on parole of fixed-term prisoners is one of public safety, as prescribed by N.J.S.A. 30:4-123.53. The critical question for the parole authorities becomes whether the prisoner’s release will pose a danger to the community. See Gerald v. Commissioner, supra, 201 N.J.Super. at 452, 493 A.2d 556.
-C-
Our case law has set the guidelines for resentencing pre-Code sex offenders originally sentenced to ADTC but subsequently transferred to State Prison, beginning with the Appellate Division’s opinion in Gerald v. Commissioner, supra, 201 N.J.Super. 438, 493 A.2d 556. In that case the prisoner pleaded guilty in 1966 to the Title 2A offenses of sodomy and impairing the morals of a minor. The court sentenced him to an indeterminate term at ADTC, subject to a thirty-year maximum. Because he had not participated in ADTC’s therapeutic program, the Commissioner of Corrections transferred Gerald to State Prison in 1981. The Resentencing Panel denied the prisoner’s application for resentencing under the Code for lack of good cause, and the Appellate Division affirmed. See id. at 443-44, 493 A.2d 556 (citing State v. Gerald, A-636-80T4 (decided March 17, 1982)). The Special Classification Review Board continued to evaluate Gerald at six-month intervals after his transfer, always with the same result: a recommendation for *558continued confinement, based on the prisoner’s continued non-participation in therapy. Id. at 444, 493 A.2d 556.
Finally, in 1984, Gerald appealed from that recommendation, claiming that because he had been transferred from ADTC to State Prison, the Parole Board, not the Special Classification Review Board, had jurisdiction over the question of his continued confinement. The Appellate Division agreed with that contention, declaring that pre-Code and post-Code sex offenders who are transferred to the prison system must, as a matter of statutory compulsion and fundamental fairness, be accorded equal treatment. Id. at 447-48, 493 A.2d 556. It therefore ordered that on remand the trial court modify Gerald’s original sentence to substitute a fixed term for the originally-imposed indeterminate term. Id. at 451, 493 A.2d 556.
In modifying and affirming the Appellate Division’s judgment, this Court directed resentencing courts to be guided by the Code’s substantive standards applicable to sex offenders and to let the sentence reflect the changes in sentencing policy under the Code — this, in order to “effectuate the legislature’s intent and to achieve parity between pre-Code and post-Code sex offenders.” 102 N.J. at 437-38, 508 A.2d 1113. Specifically, we said that “[t]he sentencing judge is authorized to consider punitive aspects of the sentence, the sentencing term, parole ineligibility, and the overall restructuring of the sentence, including any consecutive feature.” Id. at 438, 508 A.2d 1113.
In State v. Bowen, supra, 224 N.J.Super. 263, 540 A.2d 218, the court had sentenced the defendant under the pre-Code Sex Offender Act to consecutive indeterminate terms with a thirty-six-year maximum at ADTC for two counts of impairing the morals of a minor, consecutive to the reinstated term remaining on the defendant’s 1963 sodomy conviction (a high misdemeanor under N.J.S.A. 2A:143-2 for which the court had sentenced him to an indeterminate term subject to the statutory thirty-year maximum). Because of the defendant’s obdurate refusal to participate in ADTC’s treatment and rehabilitative program, the *559Commissioner of Corrections transferred him to the general prison population. Id. at 265-67, 540 A.2d 218. As a precondition of the transfer the Resentencing Panel sentenced the defendant under the Code to a custodial term of twenty years for aggravated sexual assault (the equivalent Code offense for sodomy, of which defendant had originally been convicted under Title 2A), and to consecutive eight-year terms for attempted aggravated sexual assault (the congruent Code offense for Title 2A’s impairing the morals of a minor). Id. at 267, 540 A.2d 218. The aggregate custodial term, therefore, was thirty-six years, the same maximum as had been imposed under the pre-Code sentencing.
The Appellate Division considered whether N.J.S.A. 2C:1-1d(1) — the statutory provision that controls the outcome of this appeal — precluded the Resentencing Panel’s decision to increase the defendant’s original sentences imposed on the convictions for impairing the morals of a minor. The court held that the Resentencing Panel’s action “did not have the net effect of enhancing the quantum of the maximum set initially by the trial court” because the aggregate term of imprisonment had not been increased. Id. at 271-72, 540 A.2d 218. Bowen stands for the proposition that “N.J.S.A. 2C:1-1d(1) does not prevent a court from resentencing a defendant to a term greater than that which was originally imposable as long as the aggregate period of incarceration is not increased.” Id. at 272, 540 A.2d 218.
II
-A-
Unlike the cases discussed above, this appeal presents the question of whether a parole-ineligibility term is a feature of the post-Code resentencing-on-transfer scheme. We first must determine whether the legislature’s prohibition against increasing a pre-Code prisoner’s minimum period of detention applies *560to this defendant, and if so, whether that precludes the imposition of any period of parole ineligibility.
A threshold question is which section of N.J.S.A. 2C:1-1d applies. The general rules for construction of the Code’s resentencing provisions are found in N.J.S.A. 2C:1-1. Section d of that enactment reads in full as follows:
d. (1) The provisions of the code governing the treatment and the release or discharge of prisoners, probationers and parolees shall apply to persons under sentence for offenses committed prior to the effective date of the code, except that the minimum or maximum period of their detention or supervision shall in no case be increased.
(2) Any person who is under sentence of imprisonment on the effective date of the code for an offense committed prior to the effective date which has been eliminated by the code or who has been sentenced to a maximum term of imprisonment for an offense committed prior to the effective date which exceeds the maximum established by the code for such an offense and who, on said effective date, has not had his sentence suspended or been paroled or discharged, may move to have his sentence reviewed by the sentencing court and the court may impose a new sentence, for good cause shown as though the person had been convicted under the code, except that no period of detention or supervision shall be increased as a result of such resentencing.
Although the parties have demonstrated inexplicable ambivalence over which of the above subsections fits the facts of this case, it is unmistakably clear that only N.J.S.A. 2C:1-1d(1) applies.
Subsection (2) permits two classes of pre-Code offenders to move for resentencing under the Code. The first class includes offenders “under sentence of imprisonment on the effective date of the code for an offense committed prior to the effective date which has been eliminated by the code.” Cruz was convicted under the pre-Code Sex Offender Act of rape, an offense that has not been eliminated by the Code. Rather, it has been replaced by the equivalent or parallel crime of aggravated sexual assault, N.J.S.A. 2C:14-2a.
The second class encompasses offenders who have “been sentenced to a maximum term of imprisonment for an offense committed prior to the effective date which exceeds the maximum established by the code for such an offense.” Defen*561dant’s sentence for the rapes was an indeterminate thirty-year term of confinement at ADTC. Under the Code a court may impose an extended term for aggravated sexual assault, a first-degree crime. The maximum extended term for a first-degree offender is life imprisonment. Obviously, defendant’s thirty-year maximum term under the pre-Code rape statute does not exceed a sentence of life imprisonment.
Moreover, defendant could have drawn consecutive sentences, because the two rapes were independent and both were violent. See State v. Yarbough, 100 N.J. 627, 630, 498 A.2d 1239 (1985). The presumptive sentence for each rape would be fifteen years, N.J.S.A. 2C:44-1f(1)(b), yielding an aggregate sentence of thirty years. The thirty-year maximum of defendant’s original sentence does not exceed the maximum sentence under the Code. Thus, defendant does not fall within the second class of offenders covered by N.J.S.A. 2C:1-1d(2).
Defendant does, however, fall within the bounds of N.J.S.A. 2C:1-1d(1). He is a prisoner under sentence for an offense committed prior to the effective date of the Code. Although the Appellate Division asserted that only an increase in the outer maximum of a defendant’s sentence would constitute an increase in the period of detention, see 232 N.J.Super. at 299, 556 A.2d 1295, the foregoing subsection explicitly prohibits an increase in the minimum period of detention.
-B-
The question remains whether the imposition of parole ineligibility on defendant produces an increase in his minimum period of detention. We must first determine what the legislature meant by the term “minimum period of detention” as used in subsection (1). That intent can be gleaned from the legislature’s use of similar language in other sections of the Code. N.J.S.A. 2C:43-6b declares that a sentencing court, when convinced that the statutory aggravating factors substantially outweigh the mitigating factors, “may fix a minimum term not to exceed one-half of the term set pursuant to [the subsec*562tion specifying the ordinary terms of imprisonment for crimes of varying degrees], * * * during which the defendant shall not be eligible for parole." (Emphasis added.) Also significant is the language of N.J.S.A. 2C:43-6c, which fixes mandatory minimum terms for certain crimes involving the use of firearms. One who commits one of the enumerated crimes of that section while using or possessing a firearm
shall be sentenced to a term of imprisonment by the court. The term of imprisonment shall include the imposition of a minimum term. The minimum term shall be fixed at, or between, one-third and one-half of the sentence imposed by the court or 3 years, whichever is greater, or 18 months in the case of a fourth degree crime, during which the defendant shall be ineligible for parole. (Emphasis added.)
Those sections demonstrate that a “minimum term” as defined by the Code is the fixed period of parole ineligibility. The inescapable inference is that a “minimum period of detention” is the same.
Because defendant’s pre-Code sentence did not contain and, as we have pointed out, could not have contained any minimum term, Cruz was theoretically eligible for parole on the day he entered ADTC — that is, nothing prevented the Special Classification Review Board from reviewing his case at any time. Under his resentence, he must serve a minimum of fifteen years before eligibility for parole. We conclude that that increase in the minimum period of defendant’s detention violates N.J.S.A. 2C:1-1d(1).
The State contends that today’s holding undermines Gerald’s policy of creating parity in sentencing Title 2A and Code sex offenders. Our conclusion that parole ineligibility increases a minimum sentence may cause disparity, but the policy we expressed in Gerald does not supersede the sentencing provisions of the Code. To the extent that dictum in our opinion in Gerald, entirely unnecessary to the disposition of that appeal, permits the Resentencing Panel to consider parole ineligibility in connection with the punitive aspect of any sentence given an ADTC-transferee, see supra at 558, 593 A.2d at 1173, quoting 102 N.J. at 438, 508 A.2d 1113, that opinion is incorrect. *563Gerald authorizes a court to consider punitive measures in resentencing, but only to the extent that the Code permits. N.J.S.A. 2C:1-1d(1) limits the ability of the Resentencing Panel to impose a period of parole ineligibility when resentencing a defendant who committed a crime prior to the effective date of the Code. The Legislature made a basic policy judgment that defendants resentenced under the Code should not receive increases in the minimum period of detention. Perfect parity between pre-Code and post-Code offenders who are transferred from ADTC to the general prison population must bend to that legislative determination.
The State also contends that prisoners should not be rewarded for refusing treatment and subsequently gaining transfer from ADTC to the general prison population. A defendant so transferred hardly gains a reward: he loses his right to treatment and is no longer entitled to release on a favorable recommendation of the Special Classification Review Board. Instead, he must meet the parole standards applicable to the general prison population. The consequences of the resentencing may not be as punitive as they would be with the addition of a period of parole ineligibility, but the defendant certainly is not rewarded.
Ill
Defendant falls within N.J.S.A. 2C:1-1d(1), which states that “the minimum * * * period of [his] detention shall in no case be increased.” We hold that the imposition of a parole-ineligibility period on defendant increases the minimum period of his detention.
The judgment of the Appellate Division is reversed, and the sentence of the Resentencing Panel is reinstated.