This case is the latest in a series of cases involving NMSA 1978, Section 31-20-12 (Repl.Pamp.1994). Section 31-20-12 requires a trial court to give presentence confinement credit to a “person held in official confinement on suspicion or charges of the commission of a felony[.]” Previous eases have held that, as long as the confinement is related to the charges for which the defendant is ultimately sentenced, credit must be given, even if the confinement is not exclusively related to those charges. State v. Irvin, 114 N.M. 597, 599, 844 P.2d 847, 849 (Ct.App.1992), and cases cited therein; see also State v. Wittgenstein, 119 N.M. 565, 571-72, 893 P.2d 461, 467-68 (Ct.App.), cert. denied, 119 N.M. 389, 890 P.2d 1321 (1995); *421 State v. Barrios, 116 N.M. 580, 581, 865 P.2d 1224, 1225 (Ct.App.1993). This ease requires us to decide what “confinement” means, i.e., whether the operation of Section 31-20-12 is triggered only by the fact of confinement or whether it is triggered by anything relating to the confinement. We hold that it is the fact of confinement. Accordingly, we affirm the trial court’s denial of credit.
Defendant was charged with a felony and pleaded guilty to a lesser offense. He did not appear for sentencing and was later found in California custody, serving a California sentence for another crime. A New Mexico detainer was lodged against him, as a result of which his conditions of confinement became more onerous. When he was released from California custody, Defendant was returned to New Mexico. Upon sentencing, the trial court granted credit for the time spent in New Mexico after release from California, but not for the time spent in California custody after the lodging of the New Mexico detainer. There was no evidence offered to prove that the fact of Defendant’s incarceration in California was in any way related to or caused by the New Mexico charge.
A review of our prior cases shows that, in each of them requiring that credit be given, there was something about the fact of incarceration that was either caused by or related to the charges for which credit was sought. In Wittgenstein, the incarceration was caused by a plea bargain that included the charges for which credit was sought, although defendant there pleaded guilty to other charges and the actual charges for which credit was sought were dismissed as part of the bargain. 119 N.M. at 572, 893 P.2d at 468. In Barrios, the incarceration was related to the New Mexico charges because New Mexico put a “no bond” hold on defendant, who was being held in pretrial confinement on a Texas charge for which bond was set, even though defendant could not make that bond. 116 N.M. at 581, 865 P.2d at 1225. In Irvin, the charges in one case triggered the confinement in both cases. 114 N.M. at 598, 844 P.2d at 848. Similar facts were present in State v. Ramzy, 98 N.M. 436, 649 P.2d 504 (Ct.App.1982).
Conversely, in each case not requiring the giving of credit, there was nothing about the fact of incarceration that was either caused by or related to the charges for which credit was sought. In State v. Facteau, 109 N.M. 748, 749-50, 790 P.2d 1029, 1030-31 (1990), the confinement was for a previous, unfulfilled sentence on a different charge and was not related to the charge for which the credit was sought. See also State v. Orona, 98 N.M. 668, 669-70, 651 P.2d 1312, 1313-14 (Ct.App.1982) (defendant serving sentence for one crime when he was charged with perjury and transferred from penitentiary to jail to answer perjury charge; held: credit not required); State v. Brewton, 83 N.M. 50, 51, 487 P.2d 1355, 1356 (Ct.App.1971) (defendant serving sentence for one crime when he pleaded guilty to another; held: credit not required). In State v. Miranda, 108 N.M. 789, 791, 794, 779 P.2d 976, 978, 981 (Ct.App.), cert. denied, 108 N.M. 771, 779 P.2d 549 (1989), the confinement was based on different charges in a different case upon which there were never any convictions.
Thus, in all of these cases, it was the fact of confinement that was relevant to the issue of credit, and not anything related merely to the conditions of confinement, including an increase in the onerousness of those conditions. In the cases in which credit was required, it could be said that the confinement was due to the charges for which credit was sought. In the cases in which credit was denied, the same could not be said. In this case, it cannot be said that the California confinement itself was due to the New Mexico charges. For these reasons, credit for the time spent in California was properly denied.
The judgment and sentence are affirmed.
IT IS SO ORDERED.
ALARID and FLORES, JJ., concur.