OPINION
{1} The State appeals directly to this Court from an order of the district court granting Petitioner Robert Davis’ (Defendant) writ of habeas corpus. This Court has jurisdiction over appeals from the granting of writs of habeas corpus. See Rule 12-102(A)(3) NMRA 2003 (providing that such appeals shall be taken to this Court). On appeal, the State claims that the district court erred in holding that, under limited circumstances, NMSA 1978, § 31-18-21(A) (1977) allows for judicial discretion in sentencing inmates for crimes committed during incarceration. The trial court found the statutory language — “consecutive to the sentence being served” — to mean that the first sentence for a post-incarceration crime must be added to the end of the original sentence but trial judges may exercise discretion in determining whether to impose consecutive or concurrent sentences for subsequent crimes committed during incarceration. We reverse the trial court and hold that the Legislature removed all discretion from the trial court in determining whether to impose consecutive or concurrent sentences on inmates for felonies committed during incarceration, and as such all sentences for inmate committed crimes are to be consecutive to the total of all combined sentences.
FACTS AND PROCEDURAL BACKGROUND
{2} On June 12, 1981, Defendant was convicted of larceny and four counts of armed robbery in San Juan County and sentenced to thirteen years in prison. During this thirteen-year term of imprisonment, Defendant committed numerous crimes in different counties both as an escapee and while incarcerated. In 1982 he was convicted in Bernalillo County of various crimes including armed robbery, false imprisonment, and unlawful taking of a vehicle. He pled guilty to 33 counts and was sentenced to a nine-year term in prison. In 1984 he was convicted of possession of a deadly weapon by a prisoner and sentenced to a four-year term of imprisonment. In 1985 Defendant was convicted of the felonies of escape from the penitentiary, possession of a firearm by a felon, aggravated assault upon a peace officer, false imprisonment, and conspiracy for which he received a 17 year sentence. Then, in 1988 Defendant was convicted in Bernalillo County of aggravated assault with a deadly weapon and sentenced to 6$ years in prison. Also, in 1988 Defendant was convicted in Santa Fe County of escape from the penitentiary and sentenced to thirteen years in prison.
{3} The six judgment and sentencing orders addressed in this opinion are labeled alphabetically for ease of reference and track the scheme developed by the trial court.
San Juan County, No. CR 81-88. Sentenced to 13 years in prison beginning on June 12,1981.
Bernalillo County, Nos. 34739 and 34906. Sentenced to nine years on August 10, 1982, with the sentence to run “consecutive to the time the Defendant is presently serving in San Juan County Cause No. CR-81-88.”
Torrance County, No. CR-82-44. Sentenced to four years on May 31, 1984, with the sentence “to run consecutive to the thirteen year sentence being served by the Defendant under San Juan County Criminal Cause No. 81-88.”
Valencia County, No. VA-85-007-CR. Sentenced to a total of 17 Hi years on October 9, 1985, with the total sentence to run “consecutive to the sentences he is presently serving in the Department of Corrections in cause numbers 34739, and 34906, Bernalillo County, New Mexico and cause number CR-82-44, Torrance County, New Mexico.”
Bernalillo County, No. CR. 42630. Sentenced to 6/4 years on February 17, 1988, with the sentence “to run consecutive to the sentence the defendant is currently serving. Defendant is to receive credit for 925 days pre-sentence confinement and for post-sentence confinement until delivery to the place of incarceration.”
Santa Fe County, No. SF 87-664 CR. Sentenced to 13 years on August 23, 1988. The Judgment, Sentence and Order of Commitment is silent regarding whether the sentence is to be consecutive or concurrent.
{4} The question raised by this appeal is whether the sentences were required to be stacked under Section 31-18-21(A) or whether, with the exception of Sentence B, the remaining sentences could run concurrently at the discretion of the sentencing judge. The Department of Corrections (Department) interpreted Section 31-18-2(A) to mandate the stacking of all sentences for crimes committed by Defendant while incarcerated. Defendant disagrees with the Department and argues that, with the exception of the 1982 sentence, the remaining sentences could run concurrently at the discretion of the sentencing judge. Under the Department’s analysis Defendant must serve 63 years. Under Defendant’s analysis, he should only be required to serve 39 Hi years. Neither analysis takes into consideration good-time credits.
{5} The trial court agreed with Defendant, granting his writ of habeas corpus and holding that the first conviction and sentence for a crime while Defendant was a prisoner had to run consecutive to the thirteen-year sentence Defendant was serving. However, the sentences after Defendant’s first conviction could run either consecutive or concurrent depending on the discretion of the sentencing judge. The trial court held that Sentence B had to be served consecutive to Sentence A. As such, Defendant would have to serve the original thirteen-year sentence plus an additional nine years. However, since the sentencing judge in the Sentence C judgment specified that the sentence imposed on Defendant was to be served consecutive to Sentence A, the trial court held that Sentence C was to be served concurrent with Sentence B. Therefore, Defendant would not serve any additional time for his crimes in Torrance County. Again relying on the language in the sentencing judgment, the trial court held that since the sentencing judge in the Sentence D judgment specified that Sentence D was to be served consecutive to the sentences Defendant was serving in Bernalillo County cause numbers 34739 and 34906, and Torrance County cause number CR-82^44, Sentence D was to be served consecutive to Sentence B. Under this ruling Defendant’s new sentence would be increased as follows: thirteen years under Sentence A, plus nine years under Sentence B, plus 17 Hi years under Sentence D — for a total of 39 Hi years. Because the sentencing judge in Sentence E specified that Sentence E was to be served consecutive to the sentence Defendant was serving at the time Sentence E was imposed, the trial court held that Sentence E was to be served consecutive to Sentence A and concurrent with the other sentences. Thus, Defendant would not serve any additional time for the Bernalillo County convictions in 1988. Finally, the trial court held that Sentence F was to run consecutive to Sentence A and concurrent with the other sentences because the sentencing judge was silent in Sentence F with regard to whether the sentence was to be concurrent or consecutive to the other sentences. Therefore, Defendant would not serve any additional time for the crimes he committed in Santa Fe County. Defendant was to serve a total of 39 % years under the trial court’s ruling.
STATUTORY CONSTRUCTION
{6} The issue before this Court is the interpretation of Section 31-18-21(A). Statutory interpretation is an issue of law, which we review de novo. State v. Rowell,
{7} We apply the above statutory construction principles to discern the legislative intent in enacting Section 31-18-21(A), which provides:
Whenever an inmate in a penal institution of this state or of any county therein is sentenced for committing any felony while he is an inmate, the sentence imposed shall be consecutive to the sentence being served, and his period of parole shall be that set according to the provisions of Section 31-21-10 NMSA1978.
Here, it is undisputed that Sentences B through F were for felonies Defendant committed while he was incarcerated. The crux of the appeal concerns what the Legislature meant when it wrote that the sentence imposed on Defendant for crimes committed while incarcerated “shall be consecutive’ to the sentence being served.” The trial court held that the plain meaning of “consecutive to the sentence being served” meant that the sentence imposed on Defendant for crimes Defendant committed while incarcerated was to be consecutive to the particular sentence he was serving at the time of sentencing. The matter would have been simple had Defendant only committed one crime while incarcerated because his sentence for that one crime would simply run consecutive to the sentence he was serving. However, while incarcerated Defendant committed multiple crimes at different times. Under these circumstances the trial court concluded that the language of Section 31-18-21(A) permits the sentencing court to exercise discretion in deciding whether the sentences for the multiple offenses committed at different times are to run consecutively or concurrently. We disagree with the trial court’s analysis. Section 31-18-21(A) does not allow a sentencing judge any discretion regarding whether a sentence is to be served consecutively or concurrently. The Legislature’s use of the word “shall” in Section 31-18-21 (A) makes consecutive sentencing mandatory. See State v. Guerra,
{8} The legislative history of Section 31-18-21(A) buttresses our conclusion that the Legislature did not want a sentencing court to exercise discretion in determining whether to impose consecutive or concurrent sentences on an inmate for crimes committed while incarcerated. In 1977 the Legislature passed the Criminal Sentencing Act and in-eluded what is now Section 31-18-21(A) as part of the Act. 1 See 1977 N.M. Laws, ch. 216, § 10. When the Legislature added Section 31-18-21(A) to the Criminal Sentencing Act, it modified NMSA 1953, § 40A-29-9 (1963), which stated:
Whenever an inmate in a penal institution of this state or of any county shall be sentenced for committing any crime while an inmate, such sentence imposed shall be consecutive to the sentence being served unless the court specifies otherwise. (Emphasis added).
The 1977 omission of the phrase “unless the court specifies otherwise” convinces us that the Legislature intended to remove discretion from the sentencing court. 2
{9} The Legislature’s intent to remove discretion is also demonstrated by a comparison of Section 31-18-21(A) and Section 31-18-21(B). Under subsection B the Legislature left intact the sentencing court’s discretion regarding the sentencing of individuals who commit crimes while on parole. Section 31-18-21(B) provides:
Any person, who commits a crime while at large under a suspended or deferred sentence or probation or parole, and who is convicted and sentenced therefor, shall serve the sentence consecutive to the remainder of the term, including remaining parole time, under which he was released unless otherwise ordered by the court in sentencing for the new crime. (Emphasis added).
The Legislature distinguished between crimes committed by persons while they are in a penal institution versus crimes committed while they are outside of a penal institution on parole. State v. Irvin,
{10} Having concluded that sentencing courts do not have discretion, we next discuss what the Legislature meant by the words “sentence being served.” Defendant, to support his argument that those words refer to Sentence A, relies on Deats v. State,
{11} Since the Legislature removed discretion from the sentencing court, the natural result of Defendant’s argument is that Sentences B through F would have to be consecutive to Sentence A, in which case Sentences B through F would have to be concurrent sentences. Under this approach Defendant would avoid punishment for his crime sprees in Torrance, Bernalillo, and Santa Fe counties. This is because the 17 % year sentence in Valencia County was the longest sentence Defendant received for crimes committed while incarcerated. We question whether the Legislature could have intended to allow an inmate to commit numerous crimes with impunity and suffer no consequences. Indeed, we are persuaded that when the Legislature made Section 31-18-21(A) a part of the Criminal Sentencing Act, the Legislature intended sentencing courts to stack the sentences of inmates who were convicted of crimes while incarcerated.
{12} All of the provisions of a statute, together with other statutes in pari materia, must be read together to ascertain legislative intent. Quintana v. N.M. Dep’t of Corr.,
{13} Adding support to our decision that “sentence being served” means the aggregate of the sentences imposed is United States v. Brown,
{14} Defendant invokes State v. Anaya,
{15} Based on the principles of statutory construction — including the plain meaning rule and a review of legislative history — we find that Section 31-18-21(A) removed all discretion from the trial court in determining whether to impose consecutive or concurrent sentences on inmates for felonies committed during periods of incarceration. The phrase “sentence being served” means sentences in the aggregate, and, pursuant to statute, all sentences imposed upon Defendant must run consecutive to the total of his combined sentences.
CONCLUSION
{16} We reverse and remand to the trial court to enter judgment denying Defendant’s writ of habeas corpus consistent with this opinion.
{17} IT IS SO ORDERED.
Notes
. In 1977 the present Section 31-18-21(A) was codified as NMSA 1953, § 40A-29-34 (1977) which modified NMSA 1953 § 40A-29-9 (1963).
. The sentencing court still has discretion with regard to the length of sentence it wants to impose, suspend, or defer consistent with applicable criminal statutes violated by an inmate.
