The Wyoming Supreme Court ordered the case of a teenager convicted of murder and other crimes be sent back to a state district court for resentencing in a decision it handed down Thursday.

Phillip Sam appealed his sentence -- which he claimed was essentially a life sentence -- on a number of grounds, including the objection that, as a juvenile, it violated the U.S. Constitution's prohibition of cruel and unusual punishment.

According to the Supreme Court's discussion in its opinion, the then-16-year-old Sam took his mother's boyfriend's pistol and joined other teens in a Cheyenne park on Oct. 4, 2014, and awaited a rival group. Tensions escalated. When the rival group approached, Sam and another youth stepped from behind a tree and began shooting. One bullet from Sam's gun hit Tyler Burns in the chest. Burns fell to the ground. Sam went to him and shot him point-blank in the hand and in the head.

Sam was charged with 12 counts of aggravated assault and one count of first-degree murder.

During the legal proceedings, Sam unsuccessfully asked the case be transferred to juvenile court.

A six-person jury convicted him on all counts. He was sentenced to 25 years on the murder charge and 27 years on the aggravated assault charges. He would be eligible for parole when he is 70.

In his appeal, the central issue concerned the Eighth Amendment. The sentence handed down to Sam was essentially life without parole, according to his attorneys

The Supreme Court justices -- Chief Justice E. James Burke, William Hill, Michael Davis, Kate Fox, and Keith Kautz -- agreed with attorneys for the state who argued there is not a categorical rule against life-without-parole sentences for juvenile homicide offenders.

But for one dissenting judge, they agreed with the defense that the district court violated the guidelines of other cases involving juveniles who commit murder. For that, the Wyoming Supreme Court remanded the case back to the district court for resentencing.

In a partial dissent, Kautz wrote the Wyoming Supreme Court went beyond what the U.S. Supreme Court has ruled on violations of the Eighth Amendment about defendants who were appropriately tried in adult court; were under the age of 18 at the time they committed the crimes; and committed multiple crimes, including murder. "The U.S. Supreme Court held that the imposition of a life without parole sentence on a defendant who committed crimes other than murder when under the age of 18 violates the Eighth Amendment’s prohibition of excessive punishment," Kautz wrote.

The U.S. Supreme Court allows sentencing based on an individual juvenile's background including maturity, the possibility of rehabilitation, or whether the defendant is "'the rare juvenile offender whose crime reflects irreparable corruption,'” Kautz wrote.

Sam belongs in the latter category, and the district court's sentence was appropriate, he wrote.

"Mr. Sam did not act from impulse, immaturity, or at the invitation or inducement of others. He intentionally prepared for his crimes, baited the victims into an ambush, committed multiple aggravated assaults on numerous victims, and culminated the spree with an execution-style murder," Kautz wrote.