
359 So.2d 976 (1978)
STATE of Louisiana
v.
Aaron DELANEY.
No. 61227.
Supreme Court of Louisiana.
June 19, 1978.
Brian M. Begue, Orleans Indigent Defender Program, New Orleans, for defendant-appellant.
*977 William J. Guste, Jr., Atty. Gen., Barbara Rutledge, Asst. Atty. Gen., Harry F. Connick, Dist. Atty., Nick F. Noriea, Jr., Asst. Dist. Atty., for plaintiff-appellee.
MARCUS, Justice.
Aaron Delaney was charged by bill of information with armed robbery in violation of La.R.S. 14:64. After trial by jury, defendant was found guilty as charged. After conviction, but prior to sentencing, the district attorney filed an information accusing defendant of previous felony convictions under La.R.S. 15:529.1 (Habitual Offender Law). After hearing, the trial judge found defendant to be a fourth offender and sentenced him to serve ninety-nine years at hard labor with credit toward service of his sentence for time spent in actual custody prior to imposition of sentence. On appeal, defendant does not rely upon any assignment of errors but urges this court to review the record for errors "discoverable by a mere inspection of the pleadings and proceedings and without inspection of the evidence." La.Code Crim.P. art. 920(2).
Imposition of an illegal sentence is such an error, which we may note ex proprio motu under authority of La.Code Crim.P. art. 920(2). State v. Lindsey, 351 So.2d 1178 (La.1977); State v. Jones, 341 So.2d 3 (La.1976).
We note possible error in the fact that the ninety-nine year prison sentence imposed on defendant, which is the longest term prescribed for defendant's conviction for armed robbery, exceeds his natural life, in contravention of La.R.S. 15:529.1 A(3), which provides:
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:
. . . . .
If the fourth or subsequent felony is such that, upon a first conviction, the offender would be punishable by imprisonment for any term less than his natural life, then the person shall be sentenced to imprisonment for the fourth subsequent felony for a determinate term not less than the longest term prescribed for a first conviction and not more than his natural life and in no case less than twenty years.
At the outset, we note that enhanced sentencing under this provision is not authorized if, upon a first conviction, the offender would be subject to life imprisonment. The provision further provides that the sentence for the fourth subsequent felony shall be for a determinate term of not less than the longest term prescribed for a first conviction and not more than his natural life and in no case less than twenty years.
The issue is whether a sentence for a determinate number of years which is the longest term prescribed for the first conviction violates the prohibition in the statute that the sentence be "not more than his natural life." We think not. The provision must be read as a whole to give effect to all of its parts. Hence, if the sentence of imprisonment is for a determinate term which is not less than twenty years and which represents the longest term prescribed for a first conviction, then it constitutes the minimum sentence authorized for a fourth subsequent felony conviction and does not violate the prohibition in the statute that the sentence be "not more than his natural life."
In the instant case, after having been convicted for armed robbery, defendant was found to be a fourth offender under the Habitual Offender Law. The ninety-nine year sentence imposed on defendant is the longest term prescribed for armed robbery. La.R.S. 14:64. Moreover, it is not less than twenty years. Hence, it does not violate the prohibition in the statute that the sentence be "not more than his natural life." Hence, the sentence complies with *978 La.R.S. 15:529.1 A(3). It is not an illegal sentence.
Having reviewed the record, we find no errors "discoverable by a mere inspection of the pleadings and proceedings and without inspection of the evidence." La.Code Crim.P. art. 920(2). Accordingly, we affirm defendant's conviction and sentence.

DECREE
For the reasons assigned, the conviction and sentence are affirmed.
DIXON, J., dissents.
