
422 So.2d 1121 (1982)
STATE ex rel. Rudolph WILSON
v.
Ross MAGGIO, Jr., Warden, Louisiana State Penitentiary.
No. 82-KH-0415.
Supreme Court of Louisiana.
November 29, 1982.
*1122 William J. Guste, Jr., Atty. Gen., Barbara Rutledge, Asst. Atty. Gen., Harry F. Connick, Dist. Atty., John H. Craft, Mary C. McMullan, Asst. Dist. Attys., for respondent.
Calvin Johnson, New Orleans, Supervising Atty., Loyola Law School Clinic.
CALOGERO, Justice.
Relator contends that his adjudication in 1975 as a third offender was erroneous and his fifteen year sentence illegal. Pertinent to resolution of this question, relator claims that the trial judge mistakenly took into account a 1974 Federal conviction. Had he not done so, the statutory five year cleansing period of La.R.S. 15:529.1 would have precluded the use of a 1967 conviction and his being found a multiple offender for the 1975 crime for which he was sentenced.
We find merit in his contention, upset the multiple offender adjudication, vacate his fifteen year sentence and remand the case to the trial court for resentencing.
On March 6, 1975, defendant committed an aggravated battery upon one Geneva Poche, a violation of R.S. 14:34. By amended bill of information he was so charged on April 3, 1975. He was tried before a six person jury on May 2, 1975, and found guilty. Thereafter, billed as a multiple offender under La. 15:529.1, defendant admitted being the same person named in each of three cited prior offenses. He was then found by the trial judge to be a third felony offender and sentenced to fifteen years at hard labor. Sentenced other than as a multiple offender, defendant's maximum exposure would have been ten years at hard labor under La.R.S. 14:34. On appeal to this Court, defendant merely requested a review for patent errors. We affirmed his conviction and sentence summarily. 356 So.2d 422 (La.1978).
We granted this writ upon relator's pro se application.
The multiple offender bill coupled with other pertinent information of record establishes the following:
October 10, 1950-20 year sentence for attempted murder. Following commutation to 10 years, defendant earned a good time release on April 24, 1957.
September 22, 1967-3 year sentence for negligent homicide. Defendant earned a good time release on August 28, 1969.
July 31, 1974-4 years, suspended, with 4 years active probation, for violation of 26 U.S.C. § 5861(d), a provision of the Federal Gun Control Act which prohibits receipt or possession of an unregistered firearm.
On March 6, 1975, defendant committed the aggravated battery which prompted the third felony offender adjudication and fifteen year sentence we are now reviewing.
There are two relevant legal propositions which dictate our result here. First, La. R.S. 15:529.1, the multiple offender statute, specifically provides that for an out of state *1123 or federal conviction to be used to support a multiple offender adjudication, the crime upon which the conviction is based must be a felony under the laws of Louisiana.[1]
The second proposition is that in order to use a prior felony offense to support a multiple offender adjudication there must not have intervened, before commission of another felony, a five year "cleansing" period, that is, five years between the end of the previous sentence and the commission of another felony.[2] In determining the expiration of a given sentence, it is not the imposed sentence which governs, but the date of the person's actual discharge from supervision by the department of corrections. Discharge from supervision can take place earlier than the theoretical date on which the initial sentence would have terminated, because of a pardon, commutation or good time credit. Or it can take place later because of parole revocation. State v. Anderson, 349 So.2d 311 (La.1977).
In Anderson, we held:
Construing the act as a whole, the expiration of the sentence intended to fix the commencement of the five-year "cleansing" period is the date of the individual's actual "discharge" from being subject to penitentiary confinement under the earlier conviction relied upon.
* * * * * *
The statutory intent, thus, is that a sentence expires when the prisoner is discharged from state custody and supervision, not when the theoretical date arrives on which the initial sentence would have terminated. Thus, when the convicted person is discharged earlier (as well as later) than the expiration date of the sentence initially sentenced, then the actual maximum sentence is that determined by his date of legal discharge, whether extended through revocation of parole or shortened by law due to `good time' diminution of the initial sentence. It is not until the date of actual discharge that the individual has fully paid his debt to society, insofar as owed because of an offense for which he has been convicted.
Applying these principles to the present case, we find that relator was erroneously adjudicated a multiple offender because the July 31, 1974, federal conviction does not qualify under La.R.S. 15:529.1(A); and, in its absence, more than five years have elapsed between the expiration of the 1967 sentence and the commission of the instant offense.
United States Code, Title 26, § 5861(d), the federal statute under which defendant was convicted on July 31, 1974, provides:
It shall be unlawful for any person
(d) to receive or possess a firearm which is not registered to him in the National Firearms Registration and Transfer Record.
The penalty for violation of that offense, as set forth in 26 U.S.C. § 5871, is a fine of not more than $10,000.00, a prison sentence of not more than ten years, or both. Under federal law, this crime would be classified as a felony. 18 U.S.C. § 1.
However, under La.R.S. 15:529.1, a federal or out of state conviction can only be used to support a multiple offender adjudication where the crime upon which it was based, at the time of the commission, was a *1124 felony under the analogous Louisiana statute.
The Louisiana statute, analogous to the federal statute which defendant violated, is La.R.S. 40:1785, which provides:
No person shall receive, possess, carry, conceal, buy, sell, or transport any firearm which has not been registered or transferred in accordance with this Part.
The penalty provided for violation of this statute, in 1974, at the time relator committed the offense, was a fine of "not less than one hundred dollars nor more than one thousand dollars and imprison[ment] for not less than three months nor more than twelve months."[3] Since Louisiana defines a felony as a "crime for which an offender may be sentenced to death or imprisonment at hard labor" [La.R.S. 14:2(4)], this offense was not a felony in 1974. Consequently, the federal crime for which relator was convicted was not "a crime which, if committed in this state would be a felony" and it therefore could not be used to enhance relator's sentence under La.R.S. 15:529.1. State v. Singleton, 352 So.2d 191 (La.1977).
Once we exclude consideration of the July 31, 1974, federal offense, we find that the September 22,1967, conviction cannot be used to support a habitual offender adjudication because more than five years elapsed between August 28, 1969, the date of relator's release upon completion of the 1967 sentence (with credit for good time), and the commission of the March 6, 1975 offense. Accordingly, relator should not have been adjudicated a multiple offender and the resulting fifteen year sentence was illegal. He must be resentenced in accordance with law. Resentencing is to take place as soon as is practically possible inasmuch as relator may be entitled to be released with consideration of good time credits. He was sentenced on January 5, 1976, with credit for time served from March 15, 1975, a full 7 and ½ years ago, and the maximum sentence he can receive upon resentencing is 10 years.
It has been suggested that relator should be denied the relief he seeks because he may have pled guilty at the multiple offender adjudication. The minutes do not indicate that relator pled guilty to the multiple offender charge. The minutes merely state that the relator "admitted to being the same person charged in the Bill of Information R.S. 15:529.1," and that in this case the "court found the defendant a third offender." Therefore we need not determine whether a "guilty plea" in a multiple offender proceeding bars review of a sentence illegal because of underlying error, whether of a legal or factual nature.[4]
*1125 Finally, this Court earlier denied a writ application by this relator presenting these same contentions, State ex rel Wilson v. Blackburn, 399 So.2d 595 (La.1981), with the notation "Writ Denied." This is of no moment, however, for an illegal sentence may be corrected at any time. La.C.Cr.P. art. 882.

Decree
For the foregoing reasons we vacate relator's illegal fifteen year sentence, imposed following his erroneous adjudication as a third felony offender, and remand the case to the trial court for resentencing in conformity with law.
SENTENCE VACATED; REMANDED FOR RESENTENCING.
NOTES
[1]  La.R.S. 15:529.1(A) provides:

A. Any person who, after having been convicted within this state of a felony, or who, after having been convicted under the laws of any other state or of the United States or any foreign government or country of a crime which, if committed in this state would be a felony, thereafter commits any subsequent felony within this state, upon conviction of said felony, shall be punished as follows:
* * * * * *
(emphasis provided)
[2]  La.R.S. 15:529.1(C) provides:

C. This Section shall not be applicable in cases where more than five years have elapsed since the expiration of the maximum sentence, or sentences, of the previous conviction, or convictions, and the time of the commission of the last felony for which he has been convicted. In computing the period of time as provided herein, any period of servitude by a person in a penal institution, within or without the state, shall not be included in the computation of any of said five year periods. (emphasis provided)
[3]  La.R.S. 40:1791 provides the penalty for the violation of La.R.S. 40:1785. At the time relator committed the federal offense, violation of La.R.S. 40:1791 constituted only a misdemeanor. However, La.R.S. 40:1791 was amended by Act No. 491 of 1975 to make it a felony. The penalty for the first violation of La.R.S. 40:1785 is now "a fine of not less than five hundred dollars nor more than two thousand dollars and imprisonment with or without hard labor for not less than one or nor more than five years."
[4]  It may well be that a defendant's guilty plea at a multiple offender adjudication is not the equivalent of a guilty plea to a charged crime, such that later review is precluded, absent a Crosby reservation.

La.R.S. 15:529.1(D) provides:
D. If, at any time, either after conviction or sentence, it shall appear that a person convicted of a felony has previously been convicted of a felony under the laws of this state, or has been convicted under the laws of any other state or of the United States; or any foreign government or country of a crime, which, if committed in this state would be a felony, the district attorney of the parish in which subsequent conviction was had may file an information accusing the person of a previous conviction. Whereupon the court in which the subsequent conviction was had shall cause the person, whether confined in prison or otherwise, to be brought before it and shall inform him of the allegation contained in the information and of his right to be tried as to the truth thereof according to law and shall require the offender to say whether the allegations are true. If he denies the allegation of the information or refuses to answer or remains silent, his plea or the fact of his silence shall be entered on the record and the judge shall fix a day to inquire whether the offender has been convicted of a prior felony or felonies, as set forth in the information. If the judge finds that he has been convicted of a prior felony or felonies, or if he acknowledges or confesses in open court, after being duly cautioned as to his rights, that he has been so convicted, the court shall sentence him to the punishment prescribed in this Section, and shall vacate the previous sentence if already imposed, deducting from the new sentence the time actually served under the sentence so vacated. (emphasis provided)
