
700 P.2d 74 (1985)
108 Idaho 452
STATE of Idaho, Plaintiff-Respondent,
v.
Randall W. McKEOWN, Defendant-Appellant.
No. 15061.
Court of Appeals of Idaho.
April 16, 1985.
David Z. Nevin, Boise, for defendant-appellant.
Jim Jones, Atty. Gen., Lynn E. Thomas, Sol. Gen., Boise, for plaintiff-respondent.
WALTERS, Chief Judge.
This is a companion case to State v. Anderson, 108 Idaho 454, 700 P.2d 76 (1985). Anderson and Randall McKeown were convicted, upon pleas of guilty, of second degree murder in connection with the death of Christopher Peterman. Peterman died as the result of a prolonged beating he received while incarcerated with five other youths in the Ada County Jail.
*75 On this appeal, McKeown contends the charge against him should have been transfered to juvenile court or dismissed. McKeown believes I.C. § 16-1806A, the statute excluding certain crimes from the jurisdiction of the juvenile court, violates his due process and equal protection rights guaranteed by the United States Constitution. Alternatively, McKeown asserts section 16-1806A conflicts with I.C. § 16-1804, another provision of Idaho's Youth Rehabilition Act (YRA). McKeown argues that I.C. § 16-1804 should have controlled the jurisdiction of the charge against him. McKeown also contends the sentence imposed  an indeterminate term not to exceed twenty-five years  constitutes an abuse of sentencing discretion. We affirm.
In State v. Anderson, supra, we held that I.C. § 16-1806A did not violate any constitutional rights of the defendant. Nor did we find an irreconcilable conflict between section 16-1806A and other provisions of the YRA. Likewise, on a nearly identical record in this case, we hold that McKeown's constitutional rights of due process and equal protection were not infringed when he was charged as an adult. We also hold that McKeown did not have a right under the YRA to be proceeded against as a juvenile. It remains for us to determine whether imposition of an indeterminate twenty-five year sentence in this case constitutes an abuse of discretion.
The mitigating factors presented by McKeown that arguably support a lesser sentence  his relatively young age and the conditions in which the crime occurred  were also present in State v. Anderson, supra. The sentencing judge imposed the twenty-five year sentence because a previous "pattern of criminal activity" indicated a need to protect society from McKeown's future criminal conduct. Previous rehabilitative efforts had met with little success. In short, the judge imposed the term of confinement because it appeared necessary to accomplish the primary objective of protecting society and to achieve the related goals of deterrence, rehabilitation and retribution. See State v. Toohill, 103 Idaho 565, 650 P.2d 707 (Ct.App. 1982). We have reviewed the sentence under the criteria announced in Toohill and find no abuse of discretion.
The judgment of conviction and the sentence are affirmed.
SWANSTROM, J., concurs.
BURNETT, J., concurs in the result.
