
622 So.2d 447 (1993)
Donald Lee BROOKS
v.
STATE.
CR 91-2002.
Court of Criminal Appeals of Alabama.
March 5, 1993.
Rehearing Denied May 7, 1993.
Certiorari Denied August 6, 1993.
*448 Donald Lee Brooks, pro se.
Danny Ray Miles, Capshaw, for appellant.
James H. Evans, Atty. Gen., and Harry Lyles, Dept. of Corrections, for appellee.
Alabama Supreme Court 1921229.
BOWEN, Presiding Judge.
This is an appeal from the denial of a petition for writ of habeas corpus in which the appellant claims that he is entitled to retroactive good-time credit. The appellant alleges that Ala.Code § 14-9-41(h) (Supp. 1992), upon which the Department of Corrections relied to deny him retroactive good time benefits, violates the Equal Protection Clause of the Fourteenth Amendment.
On December 9, 1988, the appellant was convicted of sodomy in the second degree, a Class B felony, Ala.Code § 13A-6-64(b) (Supp. 1992), and sentenced to ten years' imprisonment. At that time, the appellant was not eligible to receive any good-time deductions from his sentence by virtue of Ala.Code § 14-9-41(e) (1982). That section provided that "no person may receive the benefits of correctional incentive time if he or she has been convicted of a Class A felony, or has been sentenced to life, or death, or who has received a sentence for 10 years or more...."
In 1991, the Alabama Correctional Incentive Time Act was amended to provide that "no person may receive the benefits of correctional incentive time if he or she has been convicted of a Class A felony, or has been sentenced to life, or death, or who has received a sentence for more than 15 years...." Act of July 31, 1991, No. 91-637, 1991 Ala. Acts 1201, § 1(e) (codified at Ala.Code § 14-9-41(e) (Supp.1992)) (effective October 29, 1991).
The 1991 amendment extended good-time benefits to all inmates, except Class A felons, who had been sentenced to 15 years or less after October 29, 1991. In addition, it granted eligibility for retroactive good time benefits to those prisoners who had not been earning good time under the prior statute but who would have been entitled to good time under the amended statute. Act No. 91-637, § 1(h), 1991 Ala. Acts at 1204 (codified at Ala.Code § 14-9-41(h) (Supp.1992)). The award of retroactive good time to those eligible was made subject to the discretion of the commissioner of the Department of Corrections. Id.
The appellant, who was convicted of a Class B felony, sentenced to 10 years, and not receiving any good time on the date of the 1991 amendment, would have been eligible for retroactive good-time credit under the 1991 amendment but for the following exception in § 14-9-41(h):
"Deductions for good behavior, work habits and cooperation, or good conduct shall be interpreted to give authorized good time retroactively, to those offenders convicted of crimes committed after May 19, 1980, except those convicted of crimes of the unlawful sale or distribution of controlled substances as enumerated *449 in Title 13A and in former chapter 2 of Title 20, and for any sexual offenses as enumerated in chapter 6, Title 13A...."
The above-emphasized exception rendered the appellant ineligible to be considered for retroactive benefits. It is this "sex offender" exception that the appellant challenges as an unconstitutional denial of equal protection of the laws.
Initially, we note that the law in effect at the time of the commission of the crime governs a prisoner's eligibility for good time. See Warren v. State, 598 So.2d 1058 (Ala.Cr.App.1992). A prisoner sentenced under an earlier, less favorable sentence reduction statute generally has no right to complain of the ameliorative provisions of a later good-time statute. Mitchell v. Rayl, 8 Kan.App.2d 690, 665 P.2d 1117 (1983); Bossie v. State, 488 A.2d 477 (Me.1985). Some courts have even held that a statutory provision for applying the terms of a new, more generous sentence reduction statute to prisoners sentenced before the effective date of that statute results in sentence commutation by the legislative branch, a power usually reserved under state constitutions to the governor. See, e.g., Stewart v. Clarke, 482 N.W.2d 248 (1992). The separation of powers problem can be resolved, however, by legislation making the grant of retroactive good-time benefits subject to the approval of the executive branch, such as the Pardon and Parole Board or the Department of Corrections. See Boston v. Black, 340 N.W.2d 401 (1983).
While it is clear, in the present case, that the legislature need not have granted retroactive good time to any prisoners, the fact that it granted those benefits to some but not to all prisoners similarly situated implicates the Equal Protection Clause.
"Constitutionally, the mere fact that a government is under no obligation to provide a benefit does not excuse its invidious discrimination among potential recipients after the decision has been reached to establish the benefit. To paraphrase one commentator [L. Tribe, American Constitutional Law 279 n. 20 (1978)]: Tolerance for discretion in the granting of benefits does not imply tolerance for their discretionary distribution."
J. Gobert & N. Cohen, Rights of Prisoners § 10.02 at 294-95 (1981) (footnotes omitted).
An equal protection challenge to a system awarding good time to some but not to all inmates requires that a court "inquire only whether the challenged distinction rationally furthers some legitimate, articulated state purpose." McGinnis v. Royster, 410 U.S. 263, 270, 93 S.Ct. 1055, 1059, 35 L.E.2d 282 (1973). In Hilsabeck v. State, 477 So.2d 465 (Ala.Cr.App.1984), affirmed, 477 So.2d 472 (Ala.1985), this Court stated that in analyzing equal protection challenges to the Alabama Correctional Incentive Time Act,
"we utilize the `rational basis' test prescribed by the United States Supreme Court. Under this test, we must determine (1) whether the classification furthers a proper governmental purpose and (2) whether the classification is rationally related to that purpose."
Hilsabeck, 477 So.2d at 471 (citations omitted). In Gaines v. Huntsvilie-Madison County Airport Authority, 581 So.2d 444 (Ala.1991), the Alabama Supreme Court observed that the "rational basis" test
"`"employs a relatively relaxed standard reflecting the Court's awareness that the drawing of lines that create distinctions is peculiarly a legislative task and an unavoidable one.... Dandridge v. Williams, [397 U.S. 471, 90 S.Ct. 1153, 25 L.Ed.2d 491 (1970) ]."
"`In applying this "relaxed" standard to the instant case, we look to see if, under any perceivable set of facts, the statutory discrimination ... is relevant to and justified by a permissible legislative purpose.'"
Gaines, 581 So.2d at 448 (quoting Chandler v. Hospital Authority of Huntsville, 500 So.2d 1012, 1016 (Ala.1986)).
In Hilsabeck, we held that because the state "has an interest in closely supervising and controlling the parole or early release of serious offenders," there was a rational *450 basis for "treat[ing] persons sentenced to ten years or longer ... differently [from] those sentenced to lesser terms." 477 So.2d at 471. See also Thornton v. Hunt, 852 F.2d 526, 527 (11th Cir.1988) (wherein the court held that denial of good time to prisoners sentenced to more than ten years "[wa]s rationally related to the legitimate purpose of preventing the early release of serious offenders").
In Thomas v. State, 552 So.2d 875, 877 (Ala.Cr.App.), affirmed, 552 So.2d 878 (Ala. 1989), this Court observed that it was rational to deny good-time benefits to both Class A felons and to inmates who had been sentenced to ten years or more because the latter group "received a sentence in the Class A felony range," and could therefore be considered serious offenders.
"The minimum sentence for a Class A felony is 10 years, Alabama Code 1975, § 13A-5-6. Class A felons ... are ... ineligible for good time because the legislature obviously deemed the nature of their offenses too serious to merit the benefits of good time sentence reduction. It is reasonable to assume that the legislature also concluded that anyone who received a sentence in the Class A felony range would also not merit beneficial treatment."
Thomas, 552 So.2d at 877. Based on the foregoing authorities, it is clear that the length of a prisoner's sentence indicates the seriousness of his offense and constitutes a rational basis for denying him good-time credits.
In addition to the length of sentence, the legislature may properly take into account other factors in determining which classes of inmates are eligible for good time. As the Alabama Supreme Court observed in Gaines, 581 So.2d at 448, "the drawing of lines that create distinctions is peculiarly a legislative task." If the distinctions have a rational basis, courts will not interfere with legislative line-drawing in this area. "[Good time] has become a `valuable privilege' which ... the State may grant or not to inmates as a class as it sees fit." H. Kerper & J. Kerper, Legal Rights of the Convicted 485 (1974) (emphasis and brackets in original).
Using the foregoing rationale, this Court has previously held that there is a legitimate legislative purpose for treating sex offenders differently from other inmates. See Bryant v. State, 494 So.2d 874, 875 (Ala.Cr.App.1986) (regulation permitting consideration of past sex-related crimes reasonable in determining eligibility for work release in light of legislative policy expressed in Ala.Code 1975, § 14-9-41(e) ("[n]o person may be placed in Class I [good time earning status] if he or she has been convicted of a crime involving the perpetration of sexual abuse upon the person of a child under the age of 17 years").
Following the equal protection inquiry restated by the Alabama Supreme Court in Gaines, we conclude that there is a "perceivable set of facts" under which a statutory discrimination against sex offenders is "relevant to and justified by a permissible legislative purpose." That "perceivable set of facts" includes the possibility that a convicted sex offender who is not rehabilitated might be released early.
Based on the goal of preventing the early release of unrehabilitated sex offenders, the legislature clearly could have provided, in the 1991 amendment to the Alabama Correctional Incentive Time Act, that all sex offenders were ineligible for good time, or that all sex offenders were ineligible for Class I good-time earning status.
The legislature did not, however, narrow the class of prisoners qualified for sentence reduction benefits by excluding sex offenders, as a group, from good-time eligibility. Instead, the 1991 amendment broadened the class of prisoners who could earn good-time benefits. Not only did the 1991 amendment fail to deny all sex offenders the right to earn good time, but it expanded the class of good-time eligibles to include inmates sentenced to longer prison terms for presumably more serious crimes. In addition, the 1991 amendment preserved intact the prior provision denying Class I earning status only to those inmates convicted of sexual abuse of a child under 17, *451 see Ala.Code 1975, § 14-9-41(e) (Supp. 1992), but not to other sex offenders.
It is evident that the 1991 amendment to the Alabama Correctional Incentive Time Act did not establish "sex offenders" as a class of good-time ineligibles. Instead, that amendment singled out one portion of the class of "sex offenders"those who had been convicted and sentenced, after May 19, 1980, but before October 29, 1991, to at least 10 years' but to no more than 15 years' imprisonmentfor discriminatory treatment. The difference in treatment appears to be based strictly upon the timing of a prisoner's conviction and sentencing, rather than upon any determination about the nature or seriousness of the offense. As the appellant argues in his pro se brief:
"What this means ... is that the only eligible persons convicted of sexual offenses... that will not earn good time deductions for the entire length of their sentences ... are those, like Petitioner, who were serving a ten (10) to fifteen (15) year prison sentence for a sexual offense at the time the October 29, 1991 amendment went into effect. This restriction is not based upon the nature of the crime, age of the victim, or any other rational reason, It is merely based upon the date one was convicted."
Appellant's brief at 6.
Under the amended version of § 14-9-41(e), a prisoner who was convicted of a non-Class A felony sex offense after October 29, 1991, and sentenced to 15 years or less may earn good-time credit for the entire term of his sentence. Other non-Class A felony sex offenders like the appellant, who were convicted before October 29, 1991, and sentenced to only 10 years, may not earn good-time credit for the entire terms of their sentences, but only on those portions served after October 29, 1991.
Even an inmate sentenced to 15 years for sexual abuse of a child earns good time (albeit not in Class I earning status) if he was sentenced after October 29, 1991. In contrast, an inmate sentenced to 10 years for consensual sodomy is ineligible for retroactive good time if his crime occurred before October 29, 1991.
We can discern no legitimate reason for this difference in treatment. The discrimination cannot be justified on the basis of the severity of the sentence imposed or the seriousness of the crime committed. The 1991 amendment grants good time benefits to sex offenders with longer sentences, corresponding to presumably more serious crimes, yet denies retroactive benefits to sex offenders with shorter sentences for presumably less heinous crimes. The only distinction appears to be the timing of conviction and sentencing. The chronology of conviction and sentencing alone cannot supply a rational basis for such differential treatment. See Frazier v. Manson, 703 F.2d 30 (2d Cir.), cert. denied, 464 U.S. 934, 104 S.Ct. 339, 78 L.Ed.2d 308 (1983) (statute that increased good time for inmates sentenced after October 1, 1976, discriminates against prisoners sentenced before that date and cannot be upheld in absence of rational basis for difference in treatment).
We hold that the sex offender exception to § 14-9-41(h) (Supp.1992) is without rational basis and therefore a violation of equal protection principles. When that exception is severed from the rest of the statute, see Falkner v. State, 586 So.2d 39, 46 (Ala.Cr.App.1991), the appellant is eligible to be considered for retroactive good-time deductions from his sentence.
The order of the circuit court denying the petition for writ of habeas corpus is reversed, and the cause remanded for further proceedings consistent with this opinion.
REVERSED AND REMANDED.
TAYLOR, PATTERSON and McMILLAN, JJ., concur.
MONTIEL, J., dissents without opinion.
