
969 So.2d 1228 (2007)
STATE of Louisiana
v.
Jack KING.
No. 2006-K-1903.
Supreme Court of Louisiana.
October 16, 2007.
Rehearing Denied January 7, 2008.
Charles C. Foti, Jr., Attorney General, Paul Carmouche, District Attorney, Catherine Marion Estopinal, Assistant District Attorney, for applicant.
Ellis & Ellis, Carey J. Ellis, III, Alexandria, Louisiana Appellate Project, Sherry Watters, New Orleans, for respondent.
WEIMER, Justice.
Writ was granted in this matter to resolve a split in the circuits as to whether the five-year sentence enhancement provision of LSA-R.S. 14:64.3[1] should be imposed upon a defendant convicted of armed robbery with a firearm pursuant to LSA-R.S. 14:64[2] when the defendant is adjudicated a habitual offender and sentenced under the provisions of LSA-R.S. 15:529.1.[3]
*1229 For reasons that follow, we vacate the portion of the court of appeal opinion, amending defendant's sentence, which deleted the additional five years imposed by the trial court pursuant to LSA-R.S. 14:64.3. Thus, defendant's sentence of 198 years is to be followed by a consecutive sentence of five years.[4]

FACTS AND PROCEDURAL BACKGROUND
The facts are not in dispute. On May 18, 2004, the defendant entered the customer line at a Hibernia Bank branch in Shreveport, Louisiana. He handed the teller a pillowcase, displayed a portion of his gun, and demanded money. The teller placed at least $5,000 into the pillowcase along with a dye pack which exploded after the defendant left the bank. A customer chased the defendant, forced him to the ground, and held him until the police arrived.
Defendant was charged with one count of armed robbery with a firearm pursuant to LSA-R.S. 14:64 and LSA-R.S. 14:64.3. At trial, defendant testified and admitted the facts of the crime. A unanimous jury found the defendant, Jack King, guilty as charged of armed robbery using a firearm.
The state subsequently filed a habitual offender bill of information seeking to have defendant declared a second felony offender. Defendant filed a pro se motion to quash. Following a hearing, the trial court found King to be a second felony offender and sentenced him to 203 years at hard labor with credit for time served. The trial court denied the motion to reconsider sentence.
King appealed, arguing the State failed to comply with the requirements necessary to adjudicate him a second felony offender under the habitual offender law and the trial court erred in imposing an excessive sentence.
The appellate court affirmed King's conviction and concluded the sentence was not constitutionally excessive. However, the appellate court found the sentence illegal in that the trial court imposed the five-year enhanced penalty pursuant to LSA-R.S. 14:64.3 in addition to the maximum sentence allowable under the habitual offender provision. State v. King, 41,083 (La.App. 2 Cir. 6/28/06), 935 So.2d 354.
Citing State v. White, 39,634 (La.App. 2 Cir. 6/16/05), 907 So.2d 180, writ denied, 05-2097 (La.3/10/06), 925 So.2d. 510, the court reasoned that a sentence under the *1230 habitual offender law effectively replaces the sentence for the underlying crime. The court further reasoned that once the State chose to proceed under the habitual offender law to adjudicate King a second felony offender, he could only be sentenced pursuant to the habitual offender law. Finding the imposition of the additional five years under LSA-R.S. 14:64.3 resulted in an illegal sentence, the appellate court amended the sentence to delete the additional five years.[5]
Additionally, the court of appeal noted that the sentence was illegally lenient in that the trial court failed to order the sentence be served without benefit of probation or suspension of sentence as required by LSA-R.S. 15:529.1(G). The trial court's failure to state that the sentence will be served without benefit is automatically corrected by operation of law. LSA-R.S. 15:301.1. Thus, the court reasoned, King's 198-year sentence is to be served without the benefit of probation or suspension of sentence.
The State's writ application was granted in this matter to address the split in the circuits as to whether the additional five-year sentence provided by LSA-R.S. 14:64.3 could be imposed when the defendant is sentenced pursuant to the habitual offender law. State v. King, 06-1903 (La.4/27/07), 955 So.2d 670.

DISCUSSION
The State contends the court of appeal erred by amending defendant's sentence to delete the five-year sentencing enhancement provision imposed by the trial court pursuant to LSA-R.S. 14:64.3. The State further argues the White decision relied on by the second circuit conflicts with decisions of other circuits, specifically State v. Bonit, 05-0795 (La.App.1Cir.2/10/06), 928 So.2d 633, writ denied, 06-1211 (La.3/16/07), 952 So.2d 688, and State v. Lewis, 03-1234 (La.App. 4 Cir. 6/2/04) 876 So.2d 912, writ denied, 04-1855 (La.11/24/04), 888 So.2d 229.[6] The State contends Judge Williams' dissent in White is correct and the trial court's sentence should be affirmed.
The majority in White found error patent regarding the sentence imposed. The court reasoned the applicable sentence under the habitual offender law effectively replaces the sentence for the underlying crime under LSA-R.S 14:64 and 14:64.3. The court found the imposition of the additional five years under LSA-R.S. 14:64.3 was erroneous and resulted in an illegal sentence. The court amended the sentence to delete the additional five years. White, 39,634 at 6, 907 So.2d at 183.
In dissent, Judge Williams noted the lack of authority cited by the majority to support its conclusion that the five-year penalty is "replaced" by a habitual offender sentence. Citing Lewis and State v. *1231 Williams, 34,369 (La.App. 2 Cir. 2/28/01), 781 So.2d 673,[7] Judge Williams further noted "our courts have affirmed the district courts' imposition of the five-year penalty in addition to a habitual offender sentence." White, 39,634 at 1, 907 So.2d at 184.
In Bonit, the first circuit declined to follow the reasoning of the majority in White. The court noted it is not a crime to be a habitual offender and the purpose of the habitual offender statute is to increase the sentence for a recidivist. Following a finding that a defendant is a habitual offender, the penalty increase is computed by reference to the sentencing provisions of the underlying offense. Because the dangerous weapon used in the commission of the armed robbery was a firearm, the court found that Bonit violated two statutes, LSA-R.S. 14:64 and LSA-R.S. 14:64.3. Therefore, the court reasoned the defendant's sentence was subject to an additional period of five years without benefit of parole, probation, or suspension of sentence to be served consecutively to the sentence imposed under the provisions of LSA-R.S. 14:64 as enhanced by the habitual offender law. Bonit, 05-0795 at 13-15, 928 So.2d at 641-643.
In Lewis, the fourth circuit affirmed defendant's convictions and sentences. Defendant was charged with one count of attempted armed robbery and one count of attempted second degree murder in connection with crimes perpetrated against one individual. He was also charged with one count of armed robbery and a second count of attempted second degree murder in connection with crimes perpetrated against another individual. Lewis was tried and found guilty on all counts charged. He was found to be a second felony offender in connection with his armed robbery conviction. The State also filed a motion to invoke the firearm sentencing provisions of LSA-R.S. 14:64.3. The trial court sentenced defendant to 198 years at hard labor on the conviction of armed robbery as a second felony offender under LSA-R.S. 15:529.1 and added a five-year sentence at hard labor under the provisions of LSA-R.S. 14:64.3 because a firearm was used in connection with the crimes of armed robbery and attempted armed robbery. The five-year sentence was to be served consecutively to the one hundred ninety-eight year sentence. Defendant appealed the severity of the sentences contending imprisonment for 203 years was the equivalent of a life sentence. The court of appeal found the trial judge had not abused his discretion in imposing a sentence of 203 years and affirmed the sentence imposed. Lewis, 03-1234 at 18-19, 876 So.2d at 922.
Review of the statute in question indicates the legislature added LSA-R.S. 14:64.3 in 1999 to provide imprisonment for "an additional period of five years" for an offender convicted of the crime of armed robbery when the dangerous weapon used in commission of the crime is a firearm. The statute provided the penalty imposed "shall be served consecutively to the sentence imposed under the provisions of R.S. 14:64." (Emphasis added.)
In 2003, the legislature amended the statute to add attempted armed robbery when the dangerous weapon used in the commission of the crime is a firearm. The statute provided an additional penalty of five years "shall be served consecutively to the sentence imposed under the provisions of R.S. 14:27 and 64."
*1232 Then, in 2006, the legislature amended the statute to provide the sentence is to be served "at hard labor."
The addition of the penalty for use of a firearm in the commission of an armed robbery, as well as the subsequent amendments to the statute, indicates the legislature's intent to enhance the penalty when a firearm is used in the commission of the armed robbery or attempted armed robbery by providing the additional five-year penalty to be served consecutively to the sentence imposed under the provisions of LSA-R.S. 14:64.
Penalties provided by LSA-R.S. 14:64.3 and LSA-R.S. 15:529.1 are clearly directed at deterring different criminal behavior. Louisiana Revised Statutes 14:64.3 punishes an offender for increasing the danger of the already high-risk offenses of attempted armed robbery or armed robbery by use of a firearm. The potential additional five-year sentence addresses the separate and distinct behavior of using a firearm as opposed to using some other dangerous weapon (for example, a knife). The statute specifically states the use of a firearm shall result in imprisonment "for an additional period of five years" and "shall be served consecutively." Louisiana Revised Statute 15:529.1 punishes an offender's persistent and felonious defiance of the state's criminal laws. This court has consistently held that the purpose of the habitual offender law is to deter and punish recidivism. State v. Johnson, 03-2993, p. 18 (La.10/19/04), 884 So.2d 568, 579; State v. Everett, 2000-2998, p. 7 (La.5/14/02), 816 So.2d 1272, 1276; State v. Johnson, 97-1906, p. 8 (La.3/4/98), 709 So.2d 672, 677. This court has long recognized that statutes providing for increased punishment for repeat offenders serve a valid state interest in protecting society "by attempting to remove recidivists from its midst." State v. Dorthey, 623 So.2d 1276, 1278 (La.1993).
We agree with the position taken by the first and fourth circuits and find that a defendant convicted of armed robbery and sentenced under the habitual offender law can be sentenced to an additional five years under LSA-R.S. 14:64.3 when the dangerous weapon used in commission of the armed robbery is a firearm.
During the sentencing proceeding in this matter, the trial judge made the following observation:
Certainly it is established without any doubt that Mr. King has earned the maximum possible penalty which I can impose in this case. Again, I note the age of Mr. King, and I note the maximum possible penalty as being, of course, beyond the life span of any person.
However, it is just so clear to me that with Mr. King's history of criminality over the past four decades, I'm led to the conclusion that a lesser sentence than the one I'm going to impose would deprecate the seriousness of this crime.
We find the trial court was correct in sentencing the defendant to an additional five-year term for violation of LSA-R.S. 14:64.3. However, we note at the time of the commission of the crime, the statute did not include the proviso "at hard labor." Thus, the defendant's sentence should be 198 years at hard labor plus an additional 5 years to be served consecutively.

CONCLUSION
For the foregoing reasons, defendant's sentence of 203 years is amended to reflect that 198 years are to be served at hard labor followed by an additional five-year term to be served consecutively. The ruling of the court of appeal is vacated. Defendant's *1233 sentence is reinstated as amended by this court.
COURT OF APPEAL DECISION VACATED; SENTENCE AS AMENDED, REINSTATED.
JOHNSON, J., concurs.
NOTES
[1]  LSA-R.S. 14:64.3 currently provides, in part:

A. When the dangerous weapon used in the commission of the crime of armed robbery is a firearm, the offender shall be imprisoned at hard labor for an additional period of five years without benefit of parole, probation, or suspension of sentence. The additional penalty imposed pursuant to this Subsection shall be served consecutively to the sentence imposed under the provisions of R.S. 14:64.
[2]  LSA-R.S. 14:64 provides:

A. Armed robbery is the taking of anything of value belonging to another from the person of another or that is in the immediate control of another, by use of force or intimidation, while armed with a dangerous weapon.
B. Whoever commits the crime of armed robbery shall be imprisoned at hard labor for not less than ten years and for not more than ninety-nine years, without benefit of parole, probation, or suspension of sentence.
[3]  LSA-R.S. 15:529.1 provides, in part:

A. (1) Any person who, after having been convicted within this state of a felony or adjudicated a delinquent under Title VIII of the Louisiana Children's Code for the commission of a felony-grade violation of either the Louisiana Controlled Dangerous Substances Law involving the manufacture, distribution, or possession with intent to distribute a controlled dangerous substance or a crime of violence as listed in Paragraph (2) of this Subsection, or who, after having been convicted under the laws of any other state or of the United States, or any foreign government 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:
(a) If the second 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 sentence to imprisonment shall be for a determinate term not less than one-half the longest term and not more than twice the longest term prescribed for a first conviction.
[4]  Though the court's resolution of this matter will have no practical effect on the current defendant, the decision will serve to resolve a split in the circuits and provide guidance for future cases. At the time defendant committed the offense, LSA-R.S. 14:64.3 provided "the offender shall be imprisoned for an additional period of five years without benefit of parole, probation, or suspension of sentence." By 2006 La. Acts No. 208, the legislature added the provision that an offender must serve the additional five years at hard labor.
[5]  In White, the State did not file a cross application for writ of certiorari contesting the second circuit's decision to delete the five year enhancement portion; therefore, when the case arrived in this court on defendant's writ application, the present issue was not before this court.
[6]  For the sake of completeness, we note the first and second circuits decided cases involving application of LSA-R.S. 14:64.3 after this matter was decided in the court of appeal. The second circuit in State v. Smith, 40,894 (La.App. 2 Cir. 7/26/06), 936 So.2d 255, writ not considered, 06-2179 (La.4/5/07), 954 So.2d 131, relying on White, on an error patent review, deleted the additional five years for violating LSA-R.S. 14:64.3 from defendant's sentence.

The first circuit in an unpublished opinion, State v. Anderson, 06-0590 (La.App. 1 Cir. 11/3/06) 2006 WL 3110872, amended the firearm enhancement sentence to delete the requirement that it be served at hard labor, and as amended, affirmed the five-year penalty.
[7]  In State v. Williams, the court affirmed defendant's conviction and sentence of sixty years as a habitual offender plus the mandatory consecutive term of five years provided by LSA-R.S. 14:64.3.
