
805 P.2d 584 (1991)
STATE of Montana, Plaintiff and Respondent,
v.
Bernard James FITZPATRICK, Defendant and Appellant.
No. 90-356.
Supreme Court of Montana.
Submitted on Briefs October 19, 1990.
Decided February 12, 1991.
*585 Arthur J. Thompson, Thompson & Sessions, Billings, for defendant and appellant.
Marc Racicot, Atty. Gen., Kathy Seeley, Asst. Atty. Gen., Helena, Harold Hanser, Yellowstone County Atty., Curtis L. Bevolden, Deputy Yellowstone County Atty., John P. Connor, Jr. and Mark J. Murphy, Sp. Deputy Yellowstone County Attys., Asst. Attys. Gen., Billings, for plaintiff and respondent.
HUNT, Justice.
The defendant Bernard James Fitzpatrick appeals from the sentences imposed by the Thirteenth Judicial District Court, Yellowstone County. We vacate the sentences and remand for resentencing.
On March 30, 1990, an inmate or inmates cut a hole in the chain link fence in the recreation yard of the Yellowstone County detention facility. Seven inmates escaped through the hole, including Bernard Fitzpatrick, who was being held pending sentencing following a plea of guilty to deliberate homicide, aggravated kidnapping and robbery. Following the escape, Fitzpatrick and another inmate broke into Billings Senior High School. They stole some clothing and other small items. The authorities recaptured Fitzpatrick the next morning.
The State charged Fitzpatrick with the felony offenses of burglary and escape. Fitzpatrick entered guilty pleas to both counts. In exchange for the guilty pleas, the State agreed to recommend sentences on the escape and burglary convictions concurrent to each other, but consecutive to Fitzpatrick's other sentences.
At the sentencing hearing, all parties stipulated that the procedural requirements for persistent felony offender designations had been met. The State then recommended that the court designate Fitzpatrick a persistent felony offender and requested that the court impose a sentence of 100 years on each of the charges. Fitzpatrick requested a ten-year sentence on each count.
The District Court found that Fitzpatrick was a persistent felony offender. The court sentenced Fitzpatrick to serve ten years for the escape plus an additional 100 years as a persistent felony offender and to serve five years for burglary plus an additional 100 years as a persistent felony offender. Fitzpatrick appeals from these sentences.
The only issue is whether the District Court sentenced Fitzpatrick to terms exceeding the statutory maximum for a persistent felony offender.
A persistent felony offender is sentenced under § 46-18-502, MCA, which states in pertinent part:
(1) Except as provided in subsection (2), a persistent felony offender shall be imprisoned in the state prison for a term of not less than 5 years or more than 100 years or shall be fined an amount not to exceed $50,000, or both, if he was 21 years of age or older at the time of the commission of the present offense.
(2) If the offender was a persistent felony offender, as defined in XX-XX-XXX, at the time of his previous felony conviction, *586 less than 5 years have elapsed between the commission of the present offense and either the previous felony conviction or the offender's release on parole or otherwise from prison or other commitment imposed as a result of the previous felony conviction, and he was 21 years of age or older at the time of the commission of the present offense, he shall be imprisoned in the state prison for a term of not less than 10 years or more than 100 years or shall be fined an amount not to exceed $50,000, or both.
Clearly, § 46-18-502, MCA, provides for a maximum term of 100 years for a persistent felony offender, not an additional term of 100 years, as imposed by the District Court in this case. The sentencing parameters of § 46-18-502, MCA, replace the maximum sentence prescribed for the offense. It is not a sentence in addition to the sentence for the offense.
This Court has interpreted § 46-18-502, MCA, as increasing the maximum penalty for the underlying felony to 100 years. In State v. Metz, 184 Mont. 533, 604 P.2d 102 (1979), defendant was convicted of sexual intercourse without consent and sentenced to 100 years in prison as a persistent felony offender. In Metz, we explained that "[d]efendant's sentence is within the maximum allowable by the persistent felony offender statute. Section 46-18-502(1), MCA." Metz, 184 Mont. at 536, 604 P.2d at 104. In State v. Tracy, 233 Mont. 529, 761 P.2d 398 (1988), the defendant was convicted of felony theft, and sentenced to a term of 50 years as a persistent felony offender, with 40 years suspended. In reviewing the sentence on appeal, we stated:
Section 46-18-502(1), MCA, grants the judge discretion to sentence a persistent felony offender to not less than 5 or more than 100 years in prison.
Tracy, 233 Mont. at 533-34, 761 P.2d at 401.
Here, the District Court could have properly sentenced Fitzpatrick to serve a maximum of 100 years for escape and 100 years for burglary under § 46-18-502, MCA. The District Court, however, imposed sentences exceeding the statutory maximum limits under the statute. We therefore vacate the sentences and remand to the District Court for resentencing.
In addition, we note that § 46-18-502(2), MCA, applies when a defendant has previously been sentenced as a persistent felony offender and less than 5 years have elapsed between the commission of the offense for which the defendant is presently being sentenced and the previous felony conviction and sentence as a persistent felony offender. Section 45-2-101(15), MCA, defines conviction as a "judgment of conviction or sentence entered upon a plea of guilty...."
In this case, the District Court first entered judgment and sentenced Fitzpatrick on the escape charge, designating him a persistent felony offender on that charge. It then entered judgment and sentenced him on the burglary charge, designating him a persistent felony offender on that charge. Therefore, even though only a number of minutes had elapsed between the two convictions, Fitzpatrick was a persistent felony offender at the time he was sentenced on the burglary charge, bringing him under subsection (2) of the persistent felony offender statute. When a defendant is sentenced under subsection (2), the sentence imposed must run consecutively to any other sentence. Section 46-18-502(4), MCA. Thus, subsection (4) requires that any sentences imposed by the District Court on remand run consecutively.
Vacated and remanded to the District Court for resentencing consistent with this Opinion.
TURNAGE, C.J., and HARRISON, WEBER and McDONOUGH, JJ., concur.

ORDER
Defendant and appellant, Bernard James Fitzpatrick, has petitioned for a rehearing of the Opinion rendered by this Court on January 4, 1991. After consideration of the petition and the response by the State of Montana, we conclude that it is advisable to revise our original Opinion.
*587 IT IS ORDERED that the original Opinion in this cause shown to have been submitted on October 19, 1990 and decided on January 4, 1991 is withdrawn. In place of that Opinion, we have issued a replacement Opinion that is shown to have been submitted on briefs on October 19, 1990 and decided on February 12, 1991.
The petition for rehearing is denied.
/s/ J.A. Turnaee
    Chief Justice
/s/ John Conway Harrison
/s/ William E. Hunt, Jr.
/s/ R.C. McDonough
/s/ Terry Trieweiler
/s/ Fred J. Weber
    Justices
