
790 P.2d 1029 (1990)
STATE of New Mexico, Plaintiff-Appellant,
v.
Arthur R. FACTEAU, Defendant-Appellee.
No. 18703.
Supreme Court of New Mexico.
April 18, 1990.
*1030 Hal Stratton, Atty. Gen., Anthony Tupler, Asst. Atty. Gen., Santa Fe, for plaintiff-appellant.
Arthur R. Facteau, Santa Fe, pro se.

OPINION
BACA, Justice.
This matter is before the court on an appeal by the state from an order granting defendant eleven months of presentence confinement credit against his sentence for escape from the penitentiary. Defendant was serving time on a burglary charge when he escaped. When he was captured, he was immediately incarcerated to continue to serve time on his burglary charge. He was later sentenced to an additional nine years for the escape to run consecutively to his original charge. He is therefore not entitled to presentence confinement credit. We reverse.
FACTS
Defendant Facteau was serving a burglary sentence at the Central New Mexico Correctional Facility when he escaped on January 7, 1985. He was apprehended and returned to jail on January 10, 1985. Defendant pled guilty to escape from the penitentiary on August 5, 1985, and was sentenced on December 10, 1985, for nine years to run consecutively to the sentence he was then serving for burglary, a sentence which he had not completed serving. Defendant then filed a pro se motion for presentence confinement credit for the period of eleven months between his apprehension and his sentencing. The district judge granted this credit.
Presentence confinement was erroneously granted in this case. When defendant escaped from jail, he had not completed serving his sentence for burglary. When he was apprehended and returned to jail it was to continue serving time on that prior sentence. The eleven months of incarceration were not a direct result of defendant's escape. He was returned to jail due to the unfulfilled sentence for burglary. NMSA 1978, Section 31-20-12 (Repl. Pamp. 1987) allows for presentence confinement credit only if the sentence was a direct result of the felony committed. This was not the case for defendant Facteau. The eleven months of confinement were not "presentence" because defendant had been previously sentenced and was serving time for burglary. NMSA 1978, Section 31-18-21 (Repl. Pamp. 1987) mandates that a sentence for a felony committed while serving a sentence in a penal institution run consecutive to the prior sentence. It is impossible to grant "presentence" confinement credit concurrent with time served on the prior sentence and comply with Section 31-18-21 which requires that the sentences run consecutively.
Defendant claims that because a codefendant in this case received credit for time served prior to the sentence, defendant must also be awarded credit. This is not a correct assumption. The codefendant was not incarcerated at the time of the escape, but out on parole. He was then arrested and served time as a direct result of the escape charges. Defendant was confined for a pre-existing and unrelated conviction and would have been in custody irrespective of the escape charge, serving time on the *1031 prior conviction during the contested period of time. Defendant was treated differently because his legal status was different than his codefendant.
The trial court erroneously awarded presentence confinement credit to defendant, apparently based on State v. Ramzy, 98 N.M. 436, 649 P.2d 504 (Ct.App. 1982). In Ramzy, the defendant, while free on an appeal bond after being sentenced for aggravated burglary and aggravated assault (Case One), was arrested and incarcerated on a second charge (Case Two). The appeal bond in Case One was revoked because of the charges in Case Two. The court of appeals held in Ramzy that there was enough of a connection with Case Two to the ensuing incarceration that the defendant should be granted credit for presentence confinement on Case Two, despite the appearance that he was serving time on Case One because his Case One bond was revoked. Defendant's incarceration was directly attributable to both Case One and Case Two charges. In allowing presentence credit, the court in Ramzy held that the decisive factor was whether the confinement was actually related to the particular charges; the confinement need not be the exclusive result of the charges in order for a defendant to be credited for presentence time served. The court in Ramzy found a "sufficient connection" between the second case and the incarceration for presentence credit to be awarded. There is no such connection in this case.
In State v. Brewton, 83 N.M. 50, 487 P.2d 1355 (Ct.App. 1971), the court of appeals held that credit was possible only if the confinement was a direct result of the offense, and not for a prior, unfulfilled sentence. In State v. Orona, 98 N.M. 668, 651 P.2d 1312 (Ct.App. 1982), the court of appeals held that, despite the precedent set in Ramzy, an inmate temporarily transferred from the penitentiary to the county jail to answer a perjury charge was not entitled to presentence confinement credit on the perjury charge.
Orona distinguishes Ramzy and sets out a three-part test for determining if presentence credit is appropriate: 1) Was defendant confined in either case? 2) Did the second charge trigger the incarceration (such as the bond revocation in Ramzy)? and 3) Was bond set for the escape? 98 N.M. at 670, 651 P.2d at 1314. In this case the defendant, as in Orona, was already confined. The second charge did not trigger incarceration because the authorities returned him to jail on the burglary charge, and no bond was set on the escape. There is not a sufficient connection between the circumstances underlying defendant's incarceration on the burglary charge and those giving rise to his sentence for the escape to claim that the latter was the reason for the presentence incarceration, as in Ramzy. The facts in this case are much closer to the Orona scenario, and therefore presentence credit is inappropriate. It is also impossible to grant "presentence" credit concurrent with credit for time served on the prior sentence and follow the mandate in Section 31-18-21, which demands consecutive sentences for a felony committed while serving a sentence in the penitentiary. We therefore REVERSE.
IT IS SO ORDERED.
SOSA, C.J., and MONTGOMERY, J., concur.
