
79 P.3d 493 (2003)
2003 WY 148
Kevin Ross LACEY, Appellant (Defendant),
v.
The STATE of Wyoming, Appellee (Plaintiff).
No. 03-7.
Supreme Court of Wyoming.
November 18, 2003.
Representing Appellant: Kevin Ross Lacey, pro se, Olney Springs, Colorado.
Representing Appellee: Patrick J. Crank, Attorney General; Paul Rehurek, Deputy Attorney General; D. Michael Pauling, Senior Assistant Attorney General; and Dee Morgan, Assistant Attorney General.
Before HILL, C.J., and GOLDEN, LEHMAN, KITE, and VOIGT, JJ.
KITE, Justice.
[¶ 1] In 2002, more than ten years after being convicted and sentenced for kidnapping and two counts of aggravated assault, Kevin Lacey filed a motion to correct an illegal sentence in district court. The district court denied his motion on the basis that no showing was made pursuant to W.R.Cr.P. 35(a). This Court must decide whether Mr. Lacey's claims are barred by the doctrine of res judicata given that he challenged his sentences previously in his direct appeal. We affirm.

ISSUES
[¶ 2] The first issue as presented by the Appellee is dispositive:
Issue I: Whether appellant's current challenge to his sentence is barred by the doctrine of res judicata?

FACTS
[¶ 3] Mr. Lacey's current appeal is his second appearance before this Court. In 1990, we affirmed Mr. Lacey's conviction on one count of kidnapping and two counts of aggravated assault and battery. The relevant facts which resulted in his conviction are *494 set out in Lacey v. State, 803 P.2d 1364 (Wyo.1990).
At the trial, Appellant's wife, Diane, testified to the occurrence of the following events. On September 10, 1988, Appellant finished working and returned to the apartment where he and Diane lived. Diane was approximately six months pregnant. Appellant had consumed some alcohol, and he continued to drink throughout the evening. Between nine and ten o'clock, the couple prepared to go to bed, and Diane asked Appellant if she could read a book. Appellant got angry because he did not approve of the book's subject matter and tore the book into pieces. Diane became frightened and went into the bathroom to change clothes so she could leave. Appellant went into a fury, kicked the bathroom door open, and began to strike Diane. Appellant pushed Diane into the bathtub, continued to beat her, pulled her hair, and told her that she and the baby she was carrying had to die. Although Diane did not believe she would survive her husband's attack, the physical violence ceased after a period of thirty to forty-five minutes. At that point, Appellant became apologetic, and the couple cleaned up Diane's hair and blood. Despite the fact that Appellant's rage had subsided, he told Diane that she would have to die before the night was over. Diane asked if she could leave the apartment, but Appellant said, "No." After the bathroom was cleaned, Appellant retrieved several cans of beer and a knife, and the couple went to bed. Appellant lay beside Diane, holding the knife, and told her to go to sleep.
The next day, Appellant continued to exercise dominion over Diane by accompanying her everywhere she went and by carrying the knife or keeping it in close proximity. Appellant also poked at Diane with the knife, held it to her throat, and continued to verbally threaten her. The couple had several visitors during the day, but Diane was too afraid of Appellant to say or do anything which would alert anyone of her peril. Diane and Appellant left the apartment so Appellant could speak with a co-worker, but, once again, Diane was too scared to seek help. Finally, Diane's sister stopped by the apartment, and Diane told her that she wanted to get out. Diane's sister notified her father of Diane's plight, and he went to the apartment and liberated Diane without incident.
Lacey, 803 P.2d at 1366.
[¶ 4] On the basis of these facts, Mr. Lacey was charged with and convicted of the kidnapping and aggravated assault charges. Id. The district court sentenced him to not less than twenty nor more than twenty-five years on the kidnapping conviction, not less than ten nor more than fifteen years on the first aggravated assault and battery conviction, and not less than ten nor more than twelve years on the second aggravated assault and battery conviction. The kidnapping sentence and the first aggravated assault and battery sentence were to be served concurrently, with the final aggravated assault and battery sentence to be served consecutive to the first two sentences. The jury found him to be a habitual criminal and the aggravated assault and battery sentences were enhanced under Wyo. Stat. Ann. § 6-10-201 (Lexis-Nexis 2003).
[¶ 5] On direct appeal to this Court, Mr. Lacey questioned the propriety of his sentence enhancement. He contended his status as a habitual criminal should be used to enhance only one of his sentences. This Court held that the district court did not abuse its discretion when it enhanced two sentences for two convictions arising out of a single occurrence. Lacey, 803 P.2d at 1371.
[¶ 6] In 2002, in his motion to correct an illegal sentence, Mr. Lacey argued the imposed penalties for the aggravated assault and battery convictions exceeded the maximum sentences prescribed by statute. He also argued all three sentences should run concurrently with each other because of lack of evidence, prosecutorial misconduct, and other irregularities at trial. The district court denied Mr. Lacey's motion, holding that "no showing has been made pursuant to Rule 35(a) of the Wyoming Rules of Criminal Procedure to justify or require a modification of the Defendant's sentences." This appeal followed.


*495 STANDARD OF REVIEW
[¶ 7] Mr. Lacey's current appeal is governed by W.R.Cr.P 35(a). We recently stated:
W.R.Cr.P. 35(a) governs motions to correct illegal sentences. "A motion to correct an illegal sentence under W.R.Cr.P. 35(a) is addressed to the sound discretion of the sentencing court." Mead v. State, 2 P.3d 564, 566 (Wyo.2000). We, therefore, apply our abuse-of-discretion standard in reviewing a denial of a motion to correct an illegal sentence. Cardenas v. State, 925 P.2d 239, 240 (Wyo.1996). The abuse-of-discretion standard of review reaches the question of the reasonableness of the trial court's choice. Griswold v. State, 2001 WY 14, ¶ 7, 17 P.3d 728, 731 (Wyo.2001). Judicial discretion is a composite of many things, among which are conclusions drawn from objective criteria; it means exercising sound judgment with regard to what is right under the circumstances and without doing so arbitrarily and capriciously. Id. Martinez v. State, 2002 WY 10, ¶ 7, 39 P.3d 394, ¶ 7 (Wyo.2002). W.R.Cr.P. 35(a) gives district courts the authority to correct illegal sentences at any time. Id. at ¶ 9. An illegal sentence is one that exceeds statutory limits, imposes multiple terms of imprisonment for the same offense, or otherwise violates the constitution or other law. Id.


DISCUSSION
[¶ 8] In contending the district court erred in denying his motion to correct an illegal sentence under W.R.Cr.P. 35(a), Mr. Lacey argues the oral pronouncement of his sentences did not include a finding that he was a habitual criminal, and thus his aggravated assault sentences exceeded the maximum penalty allowed by law. Further, Mr. Lacey contends the district court should have ordered his aggravated assault sentences to run concurrently because those charges were based on the same acts. And finally, Mr. Lacey contends the district court should have imposed an enhanced sentence on only one of the aggravated assault charges, because it was the only "principal charge" capable of enhancement pursuant to the habitual criminal statute.
[¶ 9] The State, on the other hand, contends Mr. Lacey's claims should be denied altogether because they are barred by res judicata. Because Mr. Lacey challenged the legality of his sentence when he appealed from the district court's initial judgment and sentence, the State argues Mr. Lacey did raise or could have raised all of his current arguments in his direct appeal.
[¶ 10] The district court denied Mr. Lacey's motion on the basis that no showing was made pursuant to W.R.Cr.P. 35(a) to justify or require a modification of the sentences. However, we need not reach that threshold because the doctrine of res judicata completely bars Mr. Lacey's motion. It is well settled we may affirm the district court's decision on any legal ground appearing in the record. Daniels v. Carpenter, 2003 WY 11, ¶ 30, 62 P.3d 555, ¶ 30 (Wyo.2003).
[¶ 11] In determining whether the doctrine of res judicata applies, we examine four factors: (1) identity in parties; (2) identity in subject matter; (3) the issues are the same and relate to the subject matter; and (4) the capacities of the persons are identical in reference to both the subject matter and the issues between them. Markstein v. Countryside I, LLC, 2003 WY 122, ¶ 15, 77 P.3d 389. This court has repeatedly held that issues raised and considered in a prior criminal appeal are res judicata, and cannot be relitigated by a defendant in a subsequent collateral attack. McCarty v. State, 929 P.2d 524, 525 (Wyo.1996). We have said:
It is a longstanding rule that issues which could have been raised in an earlier proceeding are foreclosed from subsequent consideration. Kallas v. State, 776 P.2d 198, 199 (Wyo.1989); Cutbirth v. State, 751 P.2d 1257, 1261 (Wyo.1988). Unless [the appellant] can show good cause why the issue was not raised at an earlier opportunity, the court may decline to consider the issue. Kallas, 776 P.2d at 199; Cutbirth, 751 P.2d at 1261.
Hamill v. State, 948 P.2d 1356, 1358 (Wyo. 1997).
[¶ 12] In Hamill, the defendant did not raise the issue of his consolidated sentence *496 when he appealed his 1979 conviction. Eleven years later, Mr. Hamill filed his first motion to correct an illegal sentence. Again, the motion contained no mention of his consolidated sentence. That motion was denied. Sixteen years after his conviction, he filed yet another motion to correct an illegal sentence, this time contending his sentence was illegally consolidated. Finding res judicata applied, we said:
Hamill fails to articulate any reason why this issue was not raised in his earlier petitions regarding his sentencing.... Hamill makes no attempt to explain why he did not challenge his consolidated sentence in his petition filed in 1990....
Neither do the interests of justice require consideration of Hamill's claim.
Hamill, 948 P.2d at 1359.
[¶ 13] Similarly, in Mead v. State, 2 P.3d 564, 566 (Wyo.2000), we held Mr. Mead's appeal of his motion to correct an illegal sentence was barred by res judicata. "The issue ... could have been raised in that appeal, but it was not.... [W]e ground our decision in this case on the doctrine of res judicata, and we hold that this Court is foreclosed from considering Mead's appeal on its merits." Id.
[¶ 14] Unlike the defendants in Hamill and Mead, Mr. Lacey did challenge his sentences in his direct appeal:
Appellant's final argument challenges the propriety of the district court's decision to increase both aggravated assault and battery sentences to greater amounts of time than provided for by statute as a result of the jury finding him to be a habitual criminal. Appellant does not contest the jury's finding that he is a habitual criminal. Instead, he contends his status as a habitual criminal should be used to enhance only one of his sentences.
Lacey, 803 P.2d at 1371. Mr. Lacey's complaints in this appeal, likewise, focus on his sentences. Here, he argues the district court erred "by not imposing one (1) sentence for the principal charge to be enhanced pursuant to the Wyoming Statute § 6-10-201, habitual criminal." As in the prior appeal, Mr. Lacey's argument centered around his status as a habitual criminal and its effect on his sentences. Although his argument differs slightly from that presented on direct appeal, the distinction is insufficient to avoid the application of res judicata. Mr. Lacey offers no showing of why the issues raised in the current appeal could not have been raised in his direct appeal and absent such a showing his claims in the present appeal are barred by the doctrine of res judicata.
[¶ 15] Affirmed.
